Charging and discharging energy optimization algorithm of energy storage battery
Through LR-MC hybrid algorithm and charging and discharging optimization mathematical model, the charging and discharging strategies of energy storage batteries are dynamically adjusted, which solves the problems of low energy utilization efficiency and short battery life in traditional technologies, and achieves more efficient energy management and battery health monitoring .
Patent Information
- Application Number
- CN202411248535.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional energy storage battery charge and discharge management technology lacks flexibility and adaptability, and cannot effectively deal with the uncertainty of electricity demand and the random decline of battery performance, resulting in low energy utilization efficiency, shortened battery life, and difficult to meet complexity and diversity. energy storage needs.
The LR-MC hybrid algorithm is used to build a charging and discharging optimization mathematical model with real-time data, collect data through sensors and monitoring equipment, predict power consumption demand and battery performance, dynamically adjust the charging and discharging strategy, and confirm the charging priority and health status of the battery. order.
It improves energy utilization, extends battery life, enhances the adaptability and flexibility of charging and discharging strategies, can more accurately predict and respond to electricity demand and environmental changes, and improves the overall performance of energy storage batteries.
Smart Images

Figure CN119294225A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of charge and discharge energy optimization algorithms, and more specifically to a charge and discharge energy optimization algorithm for an energy storage battery. Background Art
[0002] In traditional energy storage battery charging and discharging energy management, relatively simple and fixed strategies are usually used to control the battery charging and discharging process. These strategies are often based on empirical rules, fixed threshold settings or single optimization goals. For example, some traditional methods may only decide whether to charge or discharge based on the current state of charge (SOC) of the battery, without fully considering the dynamic changes in battery performance, the uncertainty of power demand, and the influence of external environmental factors. This simple decision-making method may lead to inefficient energy utilization and fail to fully utilize the battery's energy storage potential. In addition, traditional methods often only focus on one aspect of the optimization goal, such as maximizing energy efficiency or minimizing costs, but ignore the protection of battery life. Long-term use of such a strategy may accelerate battery aging, shorten battery life, and increase the frequency and cost of battery replacement. In terms of dealing with uncertainty, traditional technologies lack effective means. They are unable to accurately predict and respond to uncertain factors such as sudden changes in electricity demand, fluctuations in the external environment, and random degradation of battery performance, resulting in poor adaptability of charging and discharging strategies. In actual applications, energy supply may be insufficient or excessive. Moreover, traditional charging and discharging management algorithms usually lack flexibility and adaptability, and cannot adjust strategies in a timely manner according to real-time data and system changes, making it difficult to meet increasingly complex and diverse energy storage needs. In summary, traditional energy storage battery charging and discharging energy management technology has many limitations and cannot achieve comprehensive, efficient and sustainable charging and discharging optimization. Summary of the invention
[0003] In view of the deficiencies of the above-mentioned technologies, the present invention discloses a charging and discharging energy optimization algorithm for an energy storage battery. A charging and discharging optimization mathematical model is constructed by combining the collected original data with the LR-MC hybrid algorithm. An initial charging and discharging strategy is formulated based on a preliminary prediction of the current state of the energy storage battery, the external environment, and the power demand. Real-time data is input into the trained charging and discharging optimization mathematical model to obtain updated power demand and battery performance predictions, and the charging and discharging strategy is dynamically adjusted. The SOC and health status of each single cell in the battery pack are detected every other day, and the charging priority is confirmed and the charging sequence is arranged according to the detection results. The present invention can adaptively adjust the charging and discharging strategy, improve energy utilization, and increase battery life.
[0004] In order to achieve the above technical effects, the present invention adopts the following technical solutions: An energy storage battery charging and discharging energy optimization algorithm comprises the following steps: Step 1: Use sensors and monitoring equipment to collect energy storage battery data and external environment data in real time, and clean and pre-process the collected data to remove outliers and noise; The sensors and monitoring equipment include at least a voltage sensor, a current sensor, a temperature sensor, a SOC sensor, an internal resistance sensor, a light sensor, an ambient temperature sensor and a wind speed sensor; the energy storage battery data includes at least voltage, current, temperature, SOC, internal resistance change and self-discharge rate; the external environment data includes at least light intensity, temperature, wind speed and grid load fluctuation; Step 2: Construct a charge-discharge optimization mathematical model by combining the collected raw data with the LR-MC hybrid algorithm. The charge-discharge optimization mathematical model uses the pre-processed historical charge-discharge data and the multi-dimensional fusion data as inputs to train the model to learn the change pattern of power demand and battery performance. The LR-MC hybrid algorithm runs in the battery management system and the power conversion system. The charge-discharge optimization mathematical model includes a data input module, a feature engineering module, a multi-dimensional fusion module, a hardware acceleration module, a logistic regression LR module, a Monte Carlo MC simulation module, a model training module, a model output module, a deviation monitoring module, a dynamic adjustment module and an evaluation and optimization module, wherein the output end of the data input module is connected to the input end of the feature engineering module, the output ends of the feature engineering module and the hardware acceleration module are connected to the input end of the multi-dimensional fusion module, the output end of the multi-dimensional fusion module is connected to the input end of the logistic regression LR module, the output end of the logistic regression LR module is connected to the input end of the Monte Carlo MC simulation module, the output end of the Monte Carlo MC simulation module is connected to the input end of the model training module, the output end of the model training module is connected to the input end of the model output module, the output end of the model output module is connected to the input end of the deviation monitoring module, the output end of the deviation monitoring module is connected to the input end of the dynamic adjustment module, and the output end of the dynamic adjustment module is connected to the input end of the evaluation and optimization module; Step 3: Formulate an initial charging and discharging strategy based on the current state of the energy storage battery, the external environment, and a preliminary forecast of power demand; Step 4: monitor the energy storage battery data, external environment changes and actual power consumption in real time, input the real-time data into the trained prediction model, obtain updated power demand and battery performance prediction, and dynamically adjust the charging and discharging strategy according to the deviation between the prediction result and the actual situation; Step 5: Detect the SOC and health status of each single cell in the battery pack every other day, confirm the charging priority according to the detection result and arrange the charging sequence according to the charging priority, wherein the health status is determined by the internal resistance value and energy decay.
[0005] As a further technical solution of the present invention, the working principle of the internal resistance sensor is: injecting an AC pulse current with a frequency of 1kHz, an amplitude of 0.5A, and a duration of 100 milliseconds into the energy storage battery, and then measuring the voltage response of the battery during the pulse. According to Ohm's law, the internal resistance of the energy storage battery is calculated by the ratio of the difference between the initial voltage and the final voltage to the measured current.
[0006] As a further technical solution of the present invention, the working principle of the charge-discharge optimization mathematical model is: (1) Store the collected raw data in the hard disk of the local server terminal; (2) filtering and denoising the raw data in the hard disk of the local server terminal through the digital signal processing unit in the feature engineering module, and then performing feature extraction operation using the microprocessor GPU, wherein the extracted features include at least average voltage, voltage change rate, voltage peak and valley values, voltage fluctuation amplitude, average current, current change rate, ratio of charging current to discharging current, instantaneous current peak value, average temperature, maximum temperature and minimum temperature, average value of SOC, change rate of SOC, average internal resistance, change amount of internal resistance, duration of charging or discharging, time interval of the last charging or discharging, average power, maximum power and minimum power, frequency of power change, accumulated charging energy and discharging energy, difference between ambient temperature and battery temperature, relationship characteristics between light intensity and charging amount, and correlation characteristics between wind speed and discharge demand; (3) fusing the extracted features through a topological data analysis method, wherein the fusion processing accelerates the operation speed through the hardware acceleration module; (4) Establishing a nonlinear relationship model based on the fused features through the logistic regression LR module to preliminarily predict power demand and battery performance; (5) The Monte Carlo (MC) simulation module combines uncertainty factors, generates usage scenarios through random sampling and simulation, and then combines the output results of the logistic regression (LR) module to supplement and optimize the prediction results. The uncertainty factors include battery performance, power demand, external environment and market factors; (6) using historical data to train the charge-discharge optimization mathematical model, and then applying the trained model to updated data to output predicted charge-discharge strategies and battery performance change trends; (7) comparing the prediction results of the model with the actual charge and discharge data and battery performance in real time through the deviation monitoring module, and dynamically adjusting the parameters and strategies of the charge and discharge optimization mathematical model according to the results of the deviation monitoring; (8) The charging and discharging optimization mathematical model is evaluated by using performance indicators through the evaluation and optimization module, and the parameters of the LR-MC hybrid algorithm are adjusted according to the evaluation results. The performance indicators include energy efficiency deviation index, battery life impact factor, dynamic adaptability score, comprehensive cost-effectiveness ratio, prediction stability index and optimization efficiency improvement rate.
[0007] As a further technical solution of the present invention, the hardware acceleration module introduces a memristor combined with a tensor processing unit to accelerate the topological data analysis method to fuse feature calculations. In the input stage of topological data and feature data, the topological data and feature data are allocated and stored in a memristor array, and the data is directly represented by the resistance value of the memristor. In the topological data analysis stage, the memristor array screens and compares data points through parallel calculations, and determines the topological structure by calculating the similarity through the resistance change of the memristor. In the feature calculation fusion stage, data with different features are weighted and merged in the memristor array at the same time; the tensor processing unit is used to control the memristor array, and the memristor array is used to perform calculations and store data and feed back the calculation results to the tensor processing unit.
[0008] As a further technical solution of the present invention, the working principle of the logistic regression LR module is: (1) dividing the fused data output by the multi-dimensional fusion module into a training set and a validation set; (2) randomly initializing the parameters of the charge-discharge optimization mathematical model, wherein the parameters include at least the number of neurons, regularization parameters, weights, and biases; (3) Construct the features after fitting and fusion of the charge-discharge optimization mathematical model, define the charge-discharge optimization mathematical model as a nonlinear hypothesis function of the Lth layer, and the output of the Lth layer is: (6) Evaluating the charge-discharge optimization mathematical model using a validation set, with evaluation indicators including accuracy, area under the receiver operating characteristic curve (AUC-ROC), area under the precision-recall curve (AUPRC), F1 score, mean square error, and mean absolute error; (7) Training the charge-discharge optimization mathematical model using the training set, and stopping the training when a termination condition is reached, wherein the termination condition is that after 5 consecutive iterations, the accuracy of the validation set changes by less than 0.1% or the number of iterations reaches 5000; (8) Outputting the prediction results of power demand and battery performance based on the real-time updated data through the trained charge-discharge optimization mathematical model.
[0009] As a further technical solution of the present invention, the working principle of the Monte Carlo MC simulation module is: (1) Determine the key random variables that affect the charging and discharging of energy storage batteries, including the random decay of battery capacity, the random fluctuation of electricity demand, and the uncertainty of external environmental factors; (2) For the random decay of the battery capacity, select Weibull distribution, for the random fluctuation of the power demand, select Gamma distribution, and for the uncertainty of the external environmental factors, select extreme value distribution; (3) generating a random sample by a random number generator according to the probability distribution of each key random variable, and bringing the variable value of the random sample into the charge-discharge optimization mathematical model, wherein the random sample represents a scenario combination; (4) The charging and discharging strategy, energy efficiency and battery life loss of each scenario combination are calculated by the charging and discharging optimization mathematical model. The formula is:
[0010] As a further technical solution of the present invention, the working principle of the dynamic adjustment module is: the charging and discharging system of the energy storage battery is defined as a dynamically adjusted environment, the state of the environment includes the charging and discharging strategy, energy efficiency and battery life loss, and the reward function is designed by integrating the charging and discharging strategy, energy efficiency and battery life loss and setting constraints. The reward of the reward function is proportional to the comprehensive charging and discharging strategy, energy efficiency and battery life loss, respectively. The constraints are the minimum threshold of battery life, the upper limit of cost, the charging current limit, the charging voltage limit, the discharge current limit, and the discharge voltage limit. The reward function formula is:
[0011]
[0012] As a further technical solution of the present invention, the confirmation principle of the charging priority is as follows: the charging priority is divided into level one, level two, level three, level four and level five from high to low. When the SOC is lower than 20%, the charging priority is set to level one; when the SOC is between 20% and 40%, the charging priority is set to level two; when the SOC is between 40% and 60%, the charging priority is set to level three; when the SOC is between 60% and 80%, the charging priority is set to level four; when the SOC is higher than 80%, the charging priority is set to level five; when the internal resistance increases by less than 20% and the capacity decays by less than 10%, the priority of the SOC division is not adjusted; when the internal resistance increases by 20% to 50% and the capacity decays by 10% to 20%, the priority of the SOC division is increased by one level; when the internal resistance increases by more than 50% and the capacity decays by more than 20%, the priority of the SOC division is increased by two levels. Beneficial Effects
[0013] The present invention discloses a charge and discharge energy optimization algorithm for an energy storage battery. A charge and discharge optimization mathematical model is constructed by combining the collected original data with the LR-MC hybrid algorithm. An initial charge and discharge strategy is formulated according to a preliminary prediction of the current state of the energy storage battery, the external environment and the power demand. Real-time data is input into the trained charge and discharge optimization mathematical model to obtain updated power demand and battery performance prediction. The charge and discharge strategy is dynamically adjusted. The SOC and health status of each single cell in the battery pack are detected every other day. The charging priority is confirmed and the charging sequence is arranged according to the detection result. The present invention can adaptively adjust the charge and discharge strategy, improve energy utilization and increase battery life. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] 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 description of the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 A schematic diagram of the working steps of a charging and discharging energy optimization algorithm for an energy storage battery of the present invention; Figure 2 A schematic diagram of a charging and discharging optimization mathematical model architecture of a charging and discharging energy optimization algorithm for an energy storage battery of the present invention; Figure 3 A schematic diagram of the working steps of a charge and discharge optimization mathematical model of a charge and discharge energy optimization algorithm for an energy storage battery in the present invention; Figure 4This is a workflow diagram of a logistic regression LR module of a charge and discharge energy optimization algorithm for an energy storage battery of the present invention; Figure 5 This is a working principle diagram of a logistic regression LR module of a charging and discharging energy optimization algorithm for an energy storage battery of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0016] An energy storage battery charging and discharging energy optimization algorithm, comprising: Step 1: Use sensors and monitoring equipment to collect energy storage battery data and external environment data in real time, and clean and pre-process the collected data to remove outliers and noise; The sensors and monitoring equipment include at least a voltage sensor, a current sensor, a temperature sensor, a SOC sensor, an internal resistance sensor, a light sensor, an ambient temperature sensor and a wind speed sensor; the energy storage battery data includes at least voltage, current, temperature, SOC, internal resistance change and self-discharge rate; the external environment data includes at least light intensity, temperature, wind speed and grid load fluctuation; Step 2: Construct a charge-discharge optimization mathematical model by combining the collected raw data with the LR-MC hybrid algorithm. The charge-discharge optimization mathematical model uses the pre-processed historical charge-discharge data and the multi-dimensional fusion data as inputs to train the model to learn the change pattern of power demand and battery performance. The LR-MC hybrid algorithm runs in the battery management system and the power conversion system. The charge-discharge optimization mathematical model includes a data input module, a feature engineering module, a multi-dimensional fusion module, a hardware acceleration module, a logistic regression LR module, a Monte Carlo MC simulation module, a model training module, a model output module, a deviation monitoring module, a dynamic adjustment module and an evaluation and optimization module, wherein the output end of the data input module is connected to the input end of the feature engineering module, the output ends of the feature engineering module and the hardware acceleration module are connected to the input end of the multi-dimensional fusion module, the output end of the multi-dimensional fusion module is connected to the input end of the logistic regression LR module, the output end of the logistic regression LR module is connected to the input end of the Monte Carlo MC simulation module, the output end of the Monte Carlo MC simulation module is connected to the input end of the model training module, the output end of the model training module is connected to the input end of the model output module, the output end of the model output module is connected to the input end of the deviation monitoring module, the output end of the deviation monitoring module is connected to the input end of the dynamic adjustment module, and the output end of the dynamic adjustment module is connected to the input end of the evaluation and optimization module; Step 3: Formulate an initial charging and discharging strategy based on the current state of the energy storage battery, the external environment, and a preliminary forecast of power demand; Step 4: monitor the energy storage battery data, external environment changes and actual power consumption in real time, input the real-time data into the trained prediction model, obtain updated power demand and battery performance prediction, and dynamically adjust the charging and discharging strategy according to the deviation between the prediction result and the actual situation; Step 5: Detect the SOC and health status of each single cell in the battery pack every other day, confirm the charging priority according to the detection result and arrange the charging sequence according to the charging priority, wherein the health status is determined by the internal resistance value and energy decay.
[0017] In a specific embodiment, a voltage sensor is installed between the positive and negative electrodes of a battery to accurately measure the voltage across the battery, monitor the charging and discharging status of the battery, and determine whether there is an overvoltage or undervoltage condition; a current sensor is installed in a circuit between the battery and the load and the charging device to measure the charging and discharging current of the battery, which helps to calculate the input and output energy of the battery and monitor abnormal fluctuations in the current; a temperature sensor is installed in a heat dissipation channel of the battery to monitor the temperature change of the battery in real time; a SOC sensor is installed in a battery management system to measure the open circuit voltage and current integral of the battery to estimate the charge state of the battery; an internal resistance sensor is installed inside the battery to reflect the health status and performance degradation of the energy storage battery; a light sensor is installed near a solar panel to measure the light intensity, and predict the output power of solar power generation; an ambient temperature sensor is installed in an outdoor environment to sense the temperature change of the surrounding environment; a wind speed sensor is installed at a high place to accurately measure the wind speed, and predict the output of wind power generation, and then predict the charging and discharging arrangement of the energy storage battery.
[0018] In a specific embodiment, obtaining external environmental data can predict the power supply situation on the energy supply side and external environmental conditions to improve prediction accuracy, adapt to seasonal changes, optimize energy integration and enhance system security.
[0019] In the above embodiment, the working principle of the internal resistance sensor is: injecting an AC pulse current with a frequency of 1 kHz, an amplitude of 0.5 A, and a duration of 100 milliseconds into the energy storage battery, and then measuring the voltage response of the battery during the pulse. According to Ohm's law, the internal resistance of the energy storage battery is calculated by the ratio of the difference between the initial voltage and the final voltage to the measured current.
[0020] In a specific embodiment, by injecting a short-time AC pulse current, the internal resistance measurement can be completed in a relatively short time, thereby improving the detection efficiency; the AC pulse has a small amplitude and a short duration, which reduces the interference with the normal operation and chemical state of the battery. Compared with some long-time or large-amplitude measurement methods, it has little effect on the battery's charging and discharging process, which helps to maintain the stability and service life of the battery; the AC injection method's accurate measurement capability of resistive components and the pulse current method's fast response characteristics are combined to more accurately separate the resistance component of the battery's internal resistance. Compared with the use of the AC injection method or the pulse current method alone, the measurement error of this new method can be reduced to less than 2%, and it is suitable for energy storage batteries of different types and specifications, whether it is a small portable battery or a large industrial energy storage battery pack, and accurate internal resistance data can be effectively obtained for batteries of different capacities and chemical systems; due to its fast and low-interference characteristics, real-time internal resistance monitoring during actual use of the battery becomes possible. The changing trend of the battery's internal resistance can be discovered in time, giving early warning of battery performance degradation or failure. While ensuring measurement accuracy, it does not require complex and expensive measurement equipment. Compared with some high-precision but high-cost electrochemical impedance spectroscopy methods, this new method reduces the hardware cost and maintenance cost of the measurement system while meeting actual application needs.
[0021] In the above embodiment, the working principle of the charge-discharge optimization mathematical model is: (1) Store the collected raw data in the hard disk of the local server terminal; (2) filtering and denoising the raw data in the hard disk of the local server terminal through the digital signal processing unit in the feature engineering module, and then performing feature extraction operation using the microprocessor GPU, wherein the extracted features include at least average voltage, voltage change rate, voltage peak and valley values, voltage fluctuation amplitude, average current, current change rate, ratio of charging current to discharging current, instantaneous current peak value, average temperature, maximum temperature and minimum temperature, average value of SOC, change rate of SOC, average internal resistance, change amount of internal resistance, duration of charging or discharging, time interval of the last charging or discharging, average power, maximum power and minimum power, frequency of power change, accumulated charging energy and discharging energy, difference between ambient temperature and battery temperature, relationship characteristics between light intensity and charging amount, and correlation characteristics between wind speed and discharge demand; (3) fusing the extracted features through a topological data analysis method, wherein the fusion processing accelerates the operation speed through the hardware acceleration module; (4) Establishing a nonlinear relationship model based on the fused features through the logistic regression LR module to preliminarily predict power demand and battery performance; (5) The Monte Carlo (MC) simulation module combines uncertainty factors, generates usage scenarios through random sampling and simulation, and then combines the output results of the logistic regression (LR) module to supplement and optimize the prediction results. The uncertainty factors include battery performance, power demand, external environment and market factors; (6) using historical data to train the charge-discharge optimization mathematical model, and then applying the trained model to updated data to output predicted charge-discharge strategies and battery performance change trends; (7) comparing the prediction results of the model with the actual charge and discharge data and battery performance in real time through the deviation monitoring module, and dynamically adjusting the parameters and strategies of the charge and discharge optimization mathematical model according to the results of the deviation monitoring; (8) The charging and discharging optimization mathematical model is evaluated by using performance indicators through the evaluation and optimization module, and the parameters of the LR-MC hybrid algorithm are adjusted according to the evaluation results. The performance indicators include energy efficiency deviation index, battery life impact factor, dynamic adaptability score, comprehensive cost-effectiveness ratio, prediction stability index and optimization efficiency improvement rate.
[0022] In the above embodiment, the hardware acceleration module introduces a memristor combined with a tensor processing unit to accelerate the topological data analysis method to fuse feature calculations. In the input stage of topological data and feature data, the topological data and feature data are distributed and stored in a memristor array, and the data is directly represented by the resistance value of the memristor. In the topological data analysis stage, the memristor array screens and compares data points through parallel calculations, and determines the topological structure by calculating the similarity through the resistance change of the memristor. In the feature calculation fusion stage, data with different features are weighted and merged in the memristor array at the same time; the tensor processing unit is used to control the memristor array, and the memristor array is used to perform calculations and store data and feed back the calculation results to the tensor processing unit.
[0023] In a specific embodiment, in a traditional computing architecture, data needs to be frequently transmitted between storage units and computing units, which results in a large amount of time delay and energy consumption. However, the introduction of memristors to enhance the integration of storage and computing brings about a significant acceleration effect.
[0024] In a specific embodiment, first, the memristor can directly perform data storage and basic computing operations inside it. When topological data and feature data are input, they can be quickly allocated and stored in the memristor array. Since the resistance value of the memristor can directly represent the data, and the change of its resistance state can realize the calculation, this avoids the cumbersome process of reading the data to the external computing unit and then processing it. For topological data analysis, the memristor array can quickly screen and compare a large number of data points in parallel. When judging the connection relationship between data points, the distance or similarity and other indicators are directly calculated through the resistance change of the memristor, so as to quickly determine the topological structure. In terms of feature calculation fusion, data with different features can be weighted, merged and other operations in the memristor array at the same time. Due to the parallel processing capability of the memristor, it can process the fusion calculation of multiple features at the same time, which greatly improves the calculation efficiency. In addition, efficient communication between the memristor and the tensor processing unit (TPU) is also the key to acceleration. The TPU can send precise control instructions to the memristor array to specify the type and scope of calculation. The memristor array can respond quickly and perform calculations, and then quickly feed back the intermediate or final results to the TPU for further processing or integration. This close collaboration greatly reduces the amount of data transmission in the entire computing process and significantly shortens the calculation time. At the same time, the low power consumption characteristics of the memristor also help to reduce the energy consumption of the entire system, allowing tasks to be completed more quickly and efficiently when processing large-scale topological data and complex feature fusion calculations.
[0025] In the above embodiment, the working principle of the logistic regression LR module is: (1) dividing the fused data output by the multi-dimensional fusion module into a training set and a validation set; (2) randomly initializing the parameters of the charge-discharge optimization mathematical model, wherein the parameters include at least the number of neurons, regularization parameters, weights, and biases; (3) Construct the features after fitting and fusion of the charge-discharge optimization mathematical model, define the charge-discharge optimization mathematical model as a nonlinear hypothesis function of the Lth layer, and the output of the Lth layer is:
[0026]
[0027]
[0028]
[0029] (6) Evaluating the charge-discharge optimization mathematical model using a validation set, with evaluation indicators including accuracy, area under the receiver operating characteristic curve (AUC-ROC), area under the precision-recall curve (AUPRC), F1 score, mean square error, and mean absolute error; (7) Training the charge-discharge optimization mathematical model using the training set, and stopping the training when a termination condition is reached, wherein the termination condition is that after 5 consecutive iterations, the accuracy of the validation set changes by less than 0.1% or the number of iterations reaches 5000; (8) Outputting the prediction results of power demand and battery performance based on the real-time updated data through the trained charge-discharge optimization mathematical model.
[0030] In a specific embodiment, through the combination of L-layer structure, nonlinear transformation of element-level multiplication and Sigmoid nonlinear activation function, the data pattern and nonlinear relationship of fusion features can be fitted, thereby improving the modeling ability of energy storage battery charging and discharging data, and the introduced regularization term helps to prevent the model from overfitting. When processing limited data, this can make the model pay more attention to the general rules of learning data, rather than overfitting noise and outliers, thereby improving the generalization ability of the model and the prediction accuracy on new data; element-level multiplication can promote the learning of interactions between different features, and help to discover complex feature relationships hidden in the data. The data pattern and nonlinear relationship of the fusion feature at least include nonlinear trends in the charge and discharge cycle, the interaction of temperature and charge and discharge rate, and seasonal fluctuations in electricity demand. The complex feature relationship at least includes the association between battery internal resistance and SOC and temperature, the indirect connection between charging strategy and battery life, the coordination of power consumption patterns of different types of electrical equipment, and the relationship between environmental factors and battery self-discharge rate.
[0031] In a specific embodiment, the cross entropy loss part Focus on improving the classification accuracy of the model, ensuring that the model can correctly distinguish different categories, through the uncertainty measurement part It forces the model to pay attention to the uncertainty of its own output, making it more cautious when facing complex or ambiguous data. When there are outliers or noise in the data, these abnormal data may cause the output of some neurons to have a large variance. Since the uncertainty measurement part plays a role in the loss function, the model will be penalized and the parameters will be adjusted to reduce this uncertainty, thereby reducing the impact of outliers and noise on the model. By considering both classification accuracy and uncertainty, the charge-discharge optimization mathematical model remembers the pattern of the training data. The weight parameter can adjust the relative importance of the uncertainty measure in the loss function to achieve different degrees of stability and reliability.
[0032] In a specific embodiment, the adaptive learning rate is determined by the gradient. When the gradient norm is greater than 10, the learning rate is set to 0.1; when the gradient norm is between 1 and 10, the learning rate is set to 0.01; when the gradient norm is less than 1, the learning rate is set to 0.001; the adaptive regularization parameter is determined by the mean and standard deviation of the weight parameter in the charge and discharge optimization mathematical model. The initial adaptive regularization parameter is 0.001. When the mean exceeds 10 or the standard deviation exceeds 5, the regularization parameter is increased by 10 times, otherwise it remains unchanged.
[0033] In a specific embodiment, the adaptive learning rate is determined by the gradient. When the model is far from the optimal solution, a larger learning rate is used to accelerate convergence. When it is close to the optimal solution, a smaller learning rate is used for fine adjustment, thereby improving the overall speed of convergence to a better solution. The adaptive regularization parameter can be determined according to the mean and standard deviation of the weight parameters in the charge and discharge optimization mathematical model. When the model has the risk of overfitting, increasing the regularization strength can limit the complexity of the model and reduce overfitting of the training data; when the model is underfitting, the regularization parameter is appropriately reduced to allow the model to have more flexibility to fit the data. By combining the inverse of the Hessian matrix, the curvature of the model parameter space can be more accurately captured, so that the parameter update is more directional and stable, reducing the oscillation and wandering in complex optimization terrain; by dynamically adjusting the learning rate and regularization parameters, unnecessary calculations and iterations caused by the use of fixed parameter values are avoided, thereby saving computing resources and training time to a certain extent and speeding up the calculation rate.
[0034] In a specific embodiment, the traditional logistic regression model and the charge-discharge optimization mathematical model are evaluated on the validation set, respectively. The accuracy is calculated by the ratio of the number of samples correctly predicted on the validation set to the total number of samples. The area under the receiver operating characteristic curve AUC-ROC is obtained by plotting the true positive rate TPR and the false positive rate FPR curves at different thresholds and calculating the area under the curve. The area under the precision-recall curve AUPRC is obtained by plotting the relationship curve between the precision rate and the recall rate and calculating the area under the curve. The precision rate and the recall rate are calculated according to the prediction results on the validation set, and then their harmonic mean is calculated to obtain the F1 score. The predicted value of the model on the validation set is compared with the true value to calculate the mean square error and the mean absolute error. The experiment is repeated 10 times, and the average value of the index data is calculated as the final result. The performance evaluation comparison table of the charge-discharge optimization mathematical model is shown in Table 1: Table 1 Comparison of performance evaluation of charge and discharge optimization mathematical models From the accuracy of Table 1, the charge and discharge optimization mathematical model reached 85%, which is significantly improved compared with the 80% of the traditional logistic regression model. This shows that the charge and discharge optimization mathematical model performs better in the overall prediction accuracy. In terms of AUC-ROC, the 0.82 of the charge and discharge optimization mathematical model is higher than the 0.75 of the traditional logistic regression model, which shows that the charge and discharge optimization mathematical model is stronger in distinguishing positive and negative examples and can better handle the boundary conditions between different categories. In the AUPRC index, the 0.75 of the charge and discharge optimization mathematical model is higher than the 0.68 of the traditional logistic regression model, which is more advantageous for handling unbalanced data. It shows that the charge and discharge optimization mathematical model has better performance in the precise recall of positive examples. In terms of F1 score, the 0.78 of the charge and discharge optimization mathematical model is higher than the 0.72 of the traditional logistic regression model, which comprehensively reflects that the charge and discharge optimization mathematical model has done a better job in balancing the precision and recall rate. In terms of mean square error and mean absolute error, the charge and discharge optimization mathematical model is 0.12 respectively. and 0.08, both lower than 0.15 and 0.10 of the traditional logistic regression model, which indicates that the average deviation between the predicted results of the charge and discharge optimization mathematical model and the true value is smaller, and the prediction is more accurate and stable; Overall, these data show that the charge and discharge optimization mathematical model is superior to the traditional charge and discharge optimization mathematical model in various evaluation indicators, showing better performance and effectiveness in processing energy storage battery charging and discharging related tasks.
[0035] In the above embodiment, the working principle of the Monte Carlo MC simulation module is: (1) Determine the key random variables that affect the charging and discharging of energy storage batteries, including the random decay of battery capacity, the random fluctuation of electricity demand, and the uncertainty of external environmental factors; (2) For the random decay of the battery capacity, select Weibull distribution, for the random fluctuation of the power demand, select Gamma distribution, and for the uncertainty of the external environmental factors, select extreme value distribution; (3) generating a random sample by a random number generator according to the probability distribution of each key random variable, and bringing the variable value of the random sample into the charge-discharge optimization mathematical model, wherein the random sample represents a scenario combination; (4) The charging and discharging strategy, energy efficiency and battery life loss of each scenario combination are calculated by the charging and discharging optimization mathematical model. The formula is:
[0036] In a specific embodiment, formula (4) optimizes the charging and discharging energy strategy of the energy storage battery by combining the charging and discharging strategy, energy efficiency and battery life loss in each scenario, thereby improving energy efficiency, increasing battery life and reducing costs.
[0037] In the above embodiment, the working principle of the dynamic adjustment module is: the charging and discharging system of the energy storage battery is defined as a dynamically adjusted environment, the state of the environment includes the charging and discharging strategy, energy efficiency and battery life loss, and the reward function is designed by integrating the charging and discharging strategy, energy efficiency and battery life loss and setting constraints. The reward of the reward function is proportional to the comprehensive charging and discharging strategy, energy efficiency and battery life loss, respectively. The constraints are the minimum threshold of battery life, the upper limit of cost, the charging current limit, the charging voltage limit, the discharge current limit, and the discharge voltage limit. The reward function formula is:
[0038] The charging and discharging strategy, energy efficiency and battery life loss after dynamic adjustment by formula (5) are mapped on the X, Y and Z axes respectively. The distribution density of data points in three-dimensional space is calculated to represent the size of probability density, and the charging and discharging strategy, energy efficiency and battery life loss are displayed as a three-dimensional probability density graph.
[0039] In a specific embodiment, by adjusting the weights, it is possible to flexibly balance the relationship between energy efficiency, battery life and charging and discharging strategies according to different application scenarios and needs, and find the strategy that best suits the specific situation. The comprehensive constraint satisfaction score can ensure that the strategy performs well in satisfying various complex and diverse constraints, thereby enhancing the practical feasibility and safety of the strategy. By comprehensively considering multiple factors, it is helpful to formulate a long-term sustainable charging and discharging strategy that not only meets current performance requirements, but also takes into account the long-term health of the battery and the economic sustainability of the system.
[0040] In a specific embodiment, the dynamically adjusted charge and discharge optimization mathematical model comprehensively evaluates the effect of the model through energy efficiency deviation index, battery life influencing factor, dynamic adaptability score, comprehensive cost-effectiveness ratio, predicted stability index and optimization efficiency improvement rate. The model effect is evaluated by experiment, and a lithium-ion battery with a capacity of 500Ah and a rated voltage of 48V is selected as the experimental energy storage battery. The experimental environment is a temperature of 25 degrees Celsius and a humidity of 55%. The power demand mode is divided into a high demand period: 10:00-18:00 every day, with an average power demand of 10kW and a low demand period: 0:00-6:00 every day, with an average power demand of 2kW; the charge and discharge strategies are divided into strategy 1: constant current charging, current 50A, constant voltage charging, voltage 56V, discharge cut-off voltage 40V and strategy 2: pulse charging, charging current varies between 30A-70A, charging voltage varies between 52V-58V, and discharge cut-off voltage 42V; 3 experiments are carried out under the above experimental conditions. Independent tests were conducted. The first test used strategy 1 during high demand periods, the second test used strategy 2 during high demand periods, and the third test used strategy 2 during low demand periods. Each test lasted for 1 month, and battery status data was collected every 10 minutes. The data obtained are shown in Table 2: Table 2 Strategy effect diagram of charge and discharge optimization mathematical model From the energy efficiency deviation index in Table 2, the average value is 10%, which shows that the model performs well in energy efficiency control and can accurately achieve the expected energy efficiency. The average value of the battery life impact factor is 0.8, which shows that the model has a positive impact on battery life and can slow down battery aging to a certain extent, which helps to extend the battery life. The average value of the dynamic adaptability score is 85 points, which shows that the model has a strong ability to adapt to different power demands and environmental changes, and can flexibly adjust the charging and discharging strategy. The average value of the comprehensive cost-effectiveness ratio is 1.5, which reflects that the model has achieved a good balance between cost control and benefit acquisition, and can achieve a relatively economical and effective energy storage battery operation. The average value of the prediction stability index is 0.15, which shows that the prediction results of the model have certain stability and reliability, and can provide a relatively stable basis for decision-making. The average value of the optimization efficiency improvement rate is 20%, which fully demonstrates that the model has a significant improvement in optimization performance compared with traditional methods, and can more effectively utilize the energy of energy storage batteries. Overall, these data show that the model performs well in many key aspects and has high performance and application value.
[0041] In the above embodiment, the confirmation principle of the charging priority is: the charging priority is divided into level 1, level 2, level 3, level 4 and level 5 from high to low. When the SOC is lower than 20%, the charging priority is set to level 1; when the SOC is between 20%-40%, the charging priority is set to level 2; when the SOC is between 40%-60%, the charging priority is set to level 3; when the SOC is between 60%-80%, the charging priority is set to level 4; when the SOC is higher than 80%, the charging priority is set to level 5; when the internal resistance increases by less than 20% and the capacity decays by less than 10%, the priority of the SOC division is not adjusted; when the internal resistance increases by 20%-50% and the capacity decays by 10%-20%, the priority is increased by one level based on the SOC division; when the internal resistance increases by more than 50% and the capacity decays by more than 20%, the priority is increased by two levels based on the SOC division.
[0042] In a specific embodiment, by preferentially charging cells with lower SOC and poorer health status, over-discharge or rapid aging of certain batteries can be avoided, thereby making the life of the entire battery pack more balanced, extending the overall service life of the battery pack, and ensuring that each cell in the battery pack can operate in a suitable state, reducing energy waste, balancing the state of each cell in the battery pack, reducing the impact of poor performance of individual batteries on the entire system, and reducing the need for frequent replacement of batteries due to premature damage, thereby reducing maintenance costs and improving the stability of energy storage battery energy.
[0043] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only by the appended claims.
Claims
1. An energy storage battery charging and discharging energy optimization algorithm, characterized in that: The following steps are involved: Step 1: Collect energy storage battery data and external environment data in real time through sensors and monitoring equipment, and clean and pre-process the collected data to remove outliers and noise; The sensors and monitoring equipment include at least a voltage sensor, a current sensor, a temperature sensor, a SOC sensor, an internal resistance sensor, a light sensor, an ambient temperature sensor and a wind speed sensor; the energy storage battery data includes at least voltage, current, temperature, SOC, internal resistance change and self-discharge rate; the external environment data includes at least light intensity, temperature, wind speed and grid load fluctuation; Step 2: Construct a charge-discharge optimization mathematical model by combining the collected raw data with the LR-MC hybrid algorithm. The charge-discharge optimization mathematical model uses the pre-processed historical charge-discharge data and the multi-dimensional fusion data as inputs to train the model to learn the change pattern of power demand and battery performance. The LR-MC hybrid algorithm runs in the battery management system and the power conversion system. The charge-discharge optimization mathematical model includes a data input module, a feature engineering module, a multi-dimensional fusion module, a hardware acceleration module, a logistic regression LR module, a Monte Carlo MC simulation module, a model training module, a model output module, a deviation monitoring module, a dynamic adjustment module and an evaluation and optimization module, wherein the output end of the data input module is connected to the input end of the feature engineering module, the output ends of the feature engineering module and the hardware acceleration module are connected to the input end of the multi-dimensional fusion module, the output end of the multi-dimensional fusion module is connected to the input end of the logistic regression LR module, the output end of the logistic regression LR module is connected to the input end of the Monte Carlo MC simulation module, the output end of the Monte Carlo MC simulation module is connected to the input end of the model training module, the output end of the model training module is connected to the input end of the model output module, the output end of the model output module is connected to the input end of the deviation monitoring module, the output end of the deviation monitoring module is connected to the input end of the dynamic adjustment module, and the output end of the dynamic adjustment module is connected to the input end of the evaluation and optimization module; Step 3: Formulate an initial charging and discharging strategy based on the current state of the energy storage battery, the external environment, and a preliminary forecast of power demand; Step 4: monitor the energy storage battery data, external environment changes and actual power consumption in real time, input the real-time data into the trained prediction model, obtain updated power demand and battery performance prediction, and dynamically adjust the charging and discharging strategy according to the deviation between the prediction result and the actual situation; Step 5: Detect the SOC and health status of each single cell in the battery pack every other day, confirm the charging priority according to the detection result and arrange the charging sequence according to the charging priority, wherein the health status is determined by the internal resistance value and energy decay.
2. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The working principle of the internal resistance sensor is: inject an AC pulse current with a frequency of 1kHz, an amplitude of 0.5A and a duration of 100 milliseconds into the energy storage battery, and then measure the voltage response of the battery during the pulse. According to Ohm's law, the internal resistance of the energy storage battery is calculated by the ratio of the difference between the initial voltage and the final voltage to the measured current.
3. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The working principle of the charge and discharge optimization mathematical model is: (1) Store the collected raw data in the hard disk of the local server terminal; (2) filtering and denoising the raw data in the hard disk of the local server terminal through the digital signal processing unit in the feature engineering module, and then performing feature extraction operation using the microprocessor GPU, wherein the extracted features include at least average voltage, voltage change rate, voltage peak and valley values, voltage fluctuation amplitude, average current, current change rate, ratio of charging current to discharging current, instantaneous current peak value, average temperature, maximum temperature and minimum temperature, average value of SOC, change rate of SOC, average internal resistance, change amount of internal resistance, duration of charging or discharging, time interval of the last charging or discharging, average power, maximum power and minimum power, frequency of power change, accumulated charging energy and discharging energy, difference between ambient temperature and battery temperature, relationship characteristics between light intensity and charging amount, and correlation characteristics between wind speed and discharge demand; (3) fusing the extracted features through a topological data analysis method, wherein the fusion processing accelerates the operation speed through the hardware acceleration module; (4) Establishing a nonlinear relationship model based on the fused features through the logistic regression LR module to preliminarily predict power demand and battery performance; (5) The Monte Carlo (MC) simulation module combines uncertainty factors, generates usage scenarios through random sampling and simulation, and then combines the output results of the logistic regression (LR) module to supplement and optimize the prediction results. The uncertainty factors include battery performance, power demand, external environment and market factors; (6) using historical data to train the charge-discharge optimization mathematical model, and then applying the trained model to updated data to output predicted charge-discharge strategies and battery performance change trends; (7) comparing the prediction results of the model with the actual charge and discharge data and battery performance in real time through the deviation monitoring module, and dynamically adjusting the parameters and strategies of the charge and discharge optimization mathematical model according to the results of the deviation monitoring; (8) The charging and discharging optimization mathematical model is evaluated by using performance indicators through the evaluation and optimization module, and the parameters of the LR-MC hybrid algorithm are adjusted according to the evaluation results. The performance indicators include energy efficiency deviation index, battery life impact factor, dynamic adaptability score, comprehensive cost-effectiveness ratio, prediction stability index and optimization efficiency improvement rate.
4. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The hardware acceleration module introduces a memristor combined with a tensor processing unit to accelerate the topological data analysis method to fuse feature calculations. In the input stage of topological data and feature data, the topological data and feature data are distributed and stored in a memristor array, and the data is directly represented by the resistance value of the memristor. In the topological data analysis stage, the memristor array screens and compares data points through parallel calculations, and the topological structure is determined by calculating the similarity through the resistance change of the memristor. In the feature calculation fusion stage, data with different features are weighted and merged in the memristor array at the same time; the tensor processing unit is used to control the memristor array, and the memristor array is used to perform calculations and store data and feed back the calculation results to the tensor processing unit.
5. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The working principle of the logistic regression LR module is: (1) dividing the fused data output by the multi-dimensional fusion module into a training set and a validation set; (2) randomly initializing the parameters of the charge-discharge optimization mathematical model, wherein the parameters include at least the number of neurons, regularization parameters, weights, and biases; (3) Construct the features after fitting and fusion of the charge-discharge optimization mathematical model, define the charge-discharge optimization mathematical model as a nonlinear hypothesis function of the Lth layer, and the output of the Lth layer is: (6) Evaluating the charge-discharge optimization mathematical model using a validation set, with evaluation indicators including accuracy, area under the receiver operating characteristic curve (AUC-ROC), area under the precision-recall curve (AUPRC), F1 score, mean square error, and mean absolute error; (7) Training the charge-discharge optimization mathematical model using the training set, and stopping the training when a termination condition is reached, wherein the termination condition is that after 5 consecutive iterations, the accuracy of the validation set changes by less than 0.1% or the number of iterations reaches 5000; (8) Outputting the prediction results of power demand and battery performance based on the real-time updated data through the trained charge-discharge optimization mathematical model.
6. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 5, characterized in that: The working principle of the Monte Carlo MC simulation module is: (1) Determine the key random variables that affect the charging and discharging of energy storage batteries, including the random decay of battery capacity, the random fluctuation of electricity demand, and the uncertainty of external environmental factors; (2) For the random decay of the battery capacity, select Weibull distribution, for the random fluctuation of the power demand, select Gamma distribution, and for the uncertainty of the external environmental factors, select extreme value distribution; (3) generating a random sample by a random number generator according to the probability distribution of each key random variable, and bringing the variable value of the random sample into the charge-discharge optimization mathematical model, wherein the random sample represents a scenario combination; (4) The charging and discharging strategy, energy efficiency and battery life loss of each scenario combination are calculated by the charging and discharging optimization mathematical model. The formula is:
7. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The working principle of the dynamic adjustment module is as follows: the charging and discharging system of the energy storage battery is defined as a dynamically adjusted environment, the state of the environment includes the charging and discharging strategy, energy efficiency and battery life loss, and the reward function is designed by integrating the charging and discharging strategy, energy efficiency and battery life loss and setting constraints. The reward of the reward function is proportional to the integrated charging and discharging strategy, energy efficiency and battery life loss, respectively. The constraints are the minimum threshold of battery life, the upper limit of cost, the charging current limit, the charging voltage limit, the discharge current limit, and the discharge voltage limit. The reward function formula is: The charging and discharging strategy, energy efficiency and battery life loss after dynamic adjustment by formula (5) are mapped on the X, Y and Z axes respectively. The distribution density of data points in three-dimensional space is calculated to represent the size of probability density, and the charging and discharging strategy, energy efficiency and battery life loss are displayed as a three-dimensional probability density graph.
8. The charge and discharge energy optimization algorithm of an energy storage battery according to claim 1, characterized in that: The confirmation principle of the charging priority is: the charging priority is divided into level 1, level 2, level 3, level 4 and level 5 from high to low. When the SOC is lower than 20%, the charging priority is set to level 1; when the SOC is between 20% and 40%, the charging priority is set to level 2; when the SOC is between 40% and 60%, the charging priority is set to level 3; when the SOC is between 60% and 80%, the charging priority is set to level 4; when the SOC is higher than 80%, the charging priority is set to level 5; when the internal resistance increases by less than 20% and the capacity decays by less than 10%, the priority of the SOC division is not adjusted; when the internal resistance increases by 20% to 50% and the capacity decays by 10% to 20%, the priority is increased by one level based on the priority of the SOC division; when the internal resistance increases by more than 50% and the capacity decays by more than 20%, the priority is increased by two levels based on the priority of the SOC division.
Citation Information
Cited By
Distributed power supply storage and charging integrated system
CN120150317A
Charging and discharging control method and device of battery pack
CN120341941A
Method and apparatus for charge-discharge control of battery pack
CN120341941B
Charging and discharging control method and device and extensible power supply
CN120637645A
Outdoor mobile robot self-adaptive charging method based on environment perception
CN121356122A