Energy storage charging and discharging management method, system, device and storage medium

By predicting electricity consumption and building an optimization model, the optimal charging and discharging scheduling of the energy storage system is solved, and the damage to the energy storage medium by frequent charging and discharging in the traditional energy storage management system is solved, extending the equipment life and reducing costs.

CN119182161BActive Publication Date: 2025-04-25INSPUR ARTIFICIAL INTELLIGENCE RES INST CO LTD SHANDONG CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411675970.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-04-25
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The traditional energy storage energy monitoring and management system has shortcomings in dealing with the health status and long-term efficiency maintenance of the energy storage system, resulting in frequent charging and discharging causing physical and chemical losses to the energy storage medium, shortening the service life of the equipment and increasing maintenance costs.

Method used

By collecting meteorological data, using pre-trained long and short-term memory network models to predict electricity consumption, and building an optimization model that minimizes the number of charge and discharge times, substituting the predicted electricity consumption and power supply into the optimization model, and solving it using continuous optimization methods to obtain the optimal charge and discharge solution.

Benefits of technology

It effectively avoids the loss of energy storage batteries by frequent charging and discharging, extends the service life of the equipment, reduces maintenance and replacement costs, and improves the efficiency and reliability of the energy system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182161B_ABST
    Figure CN119182161B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and specifically provides a method, system, device and storage medium for energy storage charge and discharge management, including: collecting meteorological data, inputting meteorological data and corresponding acquisition time series into a pre-trained long short-term memory network model to obtain predicted power consumption; constructing an optimization model that minimizes the number of charge and discharge times; obtaining power supply, substituting the predicted power consumption and the power supply into the optimization model; solving the optimization model using a continuous optimization method to obtain an optimal charge and discharge plan. The present invention realizes charge and discharge scheduling of an energy storage system, and avoids the loss of energy storage batteries caused by frequent charge and discharge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a method, system, device and storage medium for energy storage charge and discharge management. Background Art

[0002] With the rapid development and widespread application of renewable energy technologies around the world, the strategic position and value of energy storage systems, as an indispensable bridge between energy supply and demand, are increasing at an unprecedented rate. As a core technical means to ensure the stable operation of the power grid, optimize resource allocation, and significantly improve the comprehensive utilization rate of energy, energy storage systems can not only effectively alleviate the challenges brought by the intermittent and instability of renewable energy, but also lay a solid foundation for achieving a green, low-carbon, and sustainable energy system. However, under this positive trend, the traditional energy storage energy monitoring and management system has shown its limitations.

[0003] For a long time, these traditional methods have mainly focused on achieving a basic balance between energy supply and demand and ensuring the continuity and stability of the power grid, which to a certain extent meets the needs of immediate energy management. Unfortunately, they often ignore the key issues of the health status and long-term performance maintenance of the energy storage system itself - that is, the physical and chemical losses caused by frequent charge and discharge cycles to the energy storage medium (such as battery packs). This loss not only shortens the service life of the energy storage equipment and increases the cost of maintenance and replacement, but may also affect the efficiency and reliability of the entire energy system due to performance degradation. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides an energy storage charging and discharging management method, system, device and storage medium to solve the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a method for managing energy storage charging and discharging, comprising:

[0006] Collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted power consumption;

[0007] Construct an optimization model to minimize the number of charge and discharge times;

[0008] Acquire power supply, and substitute the predicted power consumption and the power supply into the optimization model;

[0009] The optimization model is solved using a continuous optimization method to obtain an optimal charging and discharging plan.

[0010] In an optional implementation, meteorological data is collected, and the meteorological data and the corresponding collection time series are input into a pre-trained long short-term memory network model to obtain predicted power consumption, including:

[0011] Collect meteorological data and generate timestamps for the meteorological data, the meteorological data including temperature, precipitation, and wind speed;

[0012] Arranging the meteorological data into a meteorological data sequence according to the collection time;

[0013] Arrange the timestamps of the meteorological data into a time series in chronological order;

[0014] The meteorological data sequence and the time series are input into a pre-trained long short-term memory neural network model to obtain predicted power consumption.

[0015] In an optional embodiment, constructing an optimization model for minimizing the number of charge and discharge times includes:

[0016] Define variables: Q1 is the power supply; Q2 is the predicted power consumption; Q i is the storage capacity of the ith battery; x i is the state of the ith battery, x i =0 means off, x i =1 indicates that a charge or discharge operation is performed; t i is the charging time or discharging time of the ith battery; N is the total number of batteries;

[0017] Get the battery rated capacity C i ;

[0018] Introduce auxiliary variables: Define an auxiliary variable ΔQ i To represent the change in the charge of battery i, that is: ΔQ i =Q i new −Q i old ; Among them, Q i new is the regulated stored power, Q i old is the stored power before regulation;

[0019] Construct the basic objective function:

[0020] ;

[0021] Due to x i Directly from the change in charge ΔQ i Determine, ΔQ i With x i Connect, that is:

[0022] If ΔQ i ≠0, then let x i =1; otherwise, x i=0;

[0023] ;

[0024] Set up constraints:

[0025] 0<Q i new <C i , 0<Q i old <C i ;

[0026] When Q1>Q2, Q i new >Q i old ; When Q1<Q2, Q i new <Q i old ;

[0027] Define a continuous variable as the slack variable s i To approximate x i , and add a penalty term to encourage s i In ΔQ i ≠0 is close to 1, at ΔQ i =0; minimizing the sum of this slack variable serves as a substitute for the objective function.

[0028] In an optional implementation, the penalty item includes:

[0029] ;

[0030] in, is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise; λ is a positive penalty parameter used to control the severity of the penalty.

[0031] In an alternative embodiment, minimizing the sum of the slack variables as an alternative to the objective function includes:

[0032] The objective function is .

[0033] In an optional embodiment, the method further comprises:

[0034] The battery voltage is collected from the battery management system at regular intervals, and the battery storage capacity is calculated based on the rated voltage and discharge curve of the battery.

[0035] In an optional embodiment, the optimization model is solved by a continuous optimization method to obtain an optimal charging and discharging scheme, including:

[0036] is the slack variable s i and optimization variable Q i new Generate initial values, set learning rate α and penalty parameter λ;

[0037] Calculate the objective function value based on the current variable value;

[0038] For each slack variable s, the objective function i Find partial derivatives and synthesize the partial derivative arrays of all slack variables into a gradient vector;

[0039] According to the gradient vector and the learning rate α, the value of the slack variable is updated using the following formula:

[0040] ;

[0041] is the objective function with respect to the slack variable s i The partial derivative of

[0042] Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the decrease in the objective function value is less than a preset threshold, or the number of iterations reaches the preset maximum value, the algorithm is considered to have converged and the iteration is stopped.

[0043] According to the optimization results of the slack variables, the battery power changes are analyzed, including which batteries have been charged and discharged, and the adjusted storage power.

[0044] In a second aspect, the present invention provides an energy storage charging and discharging management system, comprising:

[0045] The electricity consumption prediction module is used to collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted electricity consumption;

[0046] Optimization modeling module, used to build an optimization model to minimize the number of charge and discharge times;

[0047] A power supply substitution module, used to obtain the power supply amount, and substitute the predicted power consumption and the power supply amount into the optimization model;

[0048] The optimization solution module is used to solve the optimization model using a continuous optimization method to obtain an optimal charging and discharging solution.

[0049] In a third aspect, a device is provided, including:

[0050] A memory, used for storing an energy storage charging and discharging management program;

[0051] A processor is used to implement the steps of the energy storage charging and discharging management method provided in the first aspect when executing the energy storage charging and discharging management program.

[0052] In a fourth aspect, a computer-readable storage medium is provided, on which a storage energy charging and discharging management program is stored. When the storage energy charging and discharging management program is executed by a processor, the steps of the energy storage charging and discharging management method provided in the first aspect are implemented.

[0053] The beneficial effects of the present invention are that the energy storage charge and discharge management method, system, device and storage medium provided by the present invention predict power consumption and substitute power consumption and power supply into an optimization model that minimizes the number of charge and discharge times, thereby realizing charge and discharge scheduling of the energy storage system and avoiding damage to the energy storage battery caused by frequent charge and discharge.

[0054] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] 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 will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0057] Figure 2 is a schematic block diagram of a system according to an embodiment of the present invention.

[0058] Figure 3 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 should fall within the scope of protection of the present invention.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0061] The key terms appearing in the present invention are explained below.

[0062] As an advanced deep learning algorithm, the Long Short-Term Memory (LSTM) neural network model has demonstrated excellent performance in predicting time series data. In particular, in the application scenario of predicting regional electricity consumption, the LSTM model, with its unique design, can efficiently capture and utilize time features and meteorological data features, thereby significantly improving the accuracy of predictions.

[0063] In terms of time characteristics, electricity consumption usually shows certain periodic patterns, such as daily cycles (peaks in the morning and evening), weekly cycles (differences between weekdays and weekends), and seasonal cycles (peaks caused by heating in winter and cooling in summer). The LSTM model can memorize and learn these long-term and short-term time dependencies through its internal recurrent unit structure. This means that the model can "remember" past electricity consumption patterns and predict future electricity consumption trends based on them. This ability makes LSTM more advantageous than traditional time series prediction methods (such as ARIMA models) when processing data with complex time dynamics.

[0064] In terms of meteorological data characteristics, meteorological conditions such as temperature, humidity, wind speed, and rainfall have a significant impact on electricity consumption. For example, hot weather will lead to increased use of air conditioners, which in turn pushes up electricity consumption; while rainy weather may reduce lighting and heating needs, thereby reducing electricity consumption. The LSTM model can integrate these diverse meteorological information and accurately capture the relationship between meteorological conditions and electricity consumption through complex nonlinear relationship learning. This ability to fuse multi-source data enables the model to consider more factors that may affect electricity consumption when making predictions, thereby improving the accuracy and robustness of the predictions.

[0065] In addition, the LSTM model is also capable of processing large-scale data sets and can efficiently process large databases containing historical electricity consumption data and real-time meteorological data. This enables the model to continuously learn and optimize to adapt to changes in electricity demand in different regions, seasons, and weather conditions.

[0066] The energy storage charge and discharge management method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the energy storage charge and discharge management system runs in the computer device.

[0067] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be an energy storage charge and discharge management system. According to different requirements, the order of the steps in the flowchart may be changed, and some may be omitted.

[0068] like Figure 1 As shown, the method includes:

[0069] S1. Collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted power consumption.

[0070] First, we need to collect a variety of meteorological data including temperature, humidity, wind speed, wind direction, rainfall, etc. through various meteorological monitoring equipment or meteorological data service platforms. These data should cover a long period of time to provide enough learning samples for the model. Then, we match these meteorological data with the corresponding collection time series (such as date, time, etc.) to form a complete data set.

[0071] Next, we input this dataset into a pre-trained long short-term memory network (LSTM) model. The LSTM model has been trained with a large amount of historical electricity consumption data and meteorological data to learn the complex relationship between electricity consumption and meteorological conditions. Therefore, when new meteorological data is input, the model can predict the electricity consumption in the corresponding time period. This prediction result will serve as an important input parameter for the subsequent optimization model.

[0072] S2. Construct an optimization model to minimize the number of charge and discharge times.

[0073] Construct an optimization model to minimize the number of times the energy storage system is charged and discharged. The goal of this model is to minimize the charging and discharging operations of the energy storage system while meeting the supply and demand balance of the power grid, thereby reducing system losses and operation and maintenance costs.

[0074] The specific construction process of the model may involve the setting of multiple constraints, such as the capacity limit of the energy storage system, the limit of charging and discharging power, the requirement of power grid supply and demand balance, etc. At the same time, we also need to set an objective function for the model, which should be able to reflect the impact of the number of charging and discharging times of the energy storage system on the overall performance of the system.

[0075] S3. Obtain power supply, and substitute the predicted power consumption and the power supply into the optimization model.

[0076] Real-time power supply data is obtained through the power grid dispatching system or other reliable channels. These data reflect the available power resources of the power grid in different time periods.

[0077] Then, we substitute the power consumption data predicted in step S1 and the power supply data obtained in step S3 into the optimization model constructed in step S2. In this way, the model can optimize the charging and discharging strategy of the energy storage system based on the actual power supply situation and the predicted power demand.

[0078] S4. Solving the optimization model using a continuous optimization method to obtain an optimal charging and discharging plan.

[0079] To facilitate understanding of the present invention, the doctor-patient interaction management method provided by the present invention is further described below based on the principle of the doctor-patient interaction management method of the present invention and the process of managing patient diagnosis and treatment information in the embodiment.

[0080] A continuous optimization method (such as gradient descent method, interior point method, etc.) is used to solve the optimization model constructed in step S3. This method can gradually approach the optimal solution by iteratively calculating the objective function and constraints in the model.

[0081] After solving, we will get an optimal charging and discharging plan. This plan minimizes the number of charging and discharging times of the energy storage system while meeting the supply and demand balance of the power grid. At the same time, the plan can also provide real-time charging and discharging strategy recommendations for energy storage systems to power grid dispatchers, helping them better manage the operating status of the power grid.

[0082] In an embodiment of the present invention, based on step S1, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0083] Collect meteorological data and generate timestamps for the meteorological data, the meteorological data including temperature, precipitation, and wind speed; arrange the meteorological data into a meteorological data sequence in chronological order according to the time of collection; arrange the timestamps of the meteorological data into a time series in chronological order; input the meteorological data sequence and the time series into a pre-trained long short-term memory neural network model to obtain predicted electricity consumption.

[0084] In a specific example, the power consumption prediction process includes:

[0085] Meteorological data from multiple weather monitoring stations are collected and the corresponding timestamps are accurately generated for these data. These meteorological data include key information such as real-time temperature, precipitation, and wind speed. Subsequently, an efficient sorting algorithm is used to arrange these meteorological data in the order in which they were collected to form an ordered meteorological data sequence. At the same time, the timestamps attached to the meteorological data are also arranged in the same time order to construct a clear time series so that the time dimension of the data can be accurately tracked in subsequent analysis.

[0086] Next, this carefully prepared meteorological data sequence and the corresponding time series are passed as input data to a long short-term memory (LSTM) neural network model that has been pre-trained and optimized with a large amount of historical data. The LSTM model, with its unique structural design, is good at capturing long-term dependencies in data and is very suitable for processing and analyzing data with time series characteristics.

[0087] In this process, the LSTM model will use the temperature, precipitation, wind speed and other characteristics in the meteorological data, combined with the time information in the time series, and learn and understand how these meteorological factors change over time and affect electricity demand through its internal memory unit and forget gate mechanism. The model will deeply analyze the potential connection between historical meteorological data and electricity consumption, so as to have the ability to predict future electricity demand.

[0088] Finally, after calculation and reasoning of the LSTM model, we can get a power consumption forecast based on current and recent weather conditions. This forecast not only takes into account the immediate weather conditions, but also incorporates the long-term memory of the impact of past weather changes on power demand. Therefore, it can provide users with more accurate and reliable power demand forecasts, which is helpful for the planning, scheduling and optimization of the power system.

[0089] The training method of LSTM (Long Short-Term Memory) model is a systematic and delicate process, which involves multiple key steps and considerations. The following is a detailed explanation of the LSTM model training method:

[0090] First, you need to clarify the specific structure of the LSTM model, which includes the configuration of the input layer, hidden layer, and output layer. When defining the model, you need to specify the size of the input data (input_size), the size of the hidden layer (hidden_size), and the number of LSTM layers (num_layers). In addition, you can also choose whether to use a bidirectional LSTM or deep LSTM structure to enhance the model's expressiveness based on actual needs.

[0091] Training the LSTM model requires a large amount of sequence data, which should have corresponding labels for supervised learning. In the scenario of meteorological data and power consumption forecasting, the training data can include historical meteorological data (such as temperature, precipitation, wind speed, etc.) and corresponding power consumption data. These data need to be arranged in chronological order and generate corresponding timestamps to construct a time series.

[0092] During the training process, a training loop needs to be built to iteratively train the model. In each training step, the model receives a batch of input data (such as meteorological data within a time period) and corresponding labels (such as electricity consumption within the time period), and calculates the model's loss function (such as mean square error MSE). The loss function is used to measure the difference between the model's prediction results and the true labels, and is the goal of model optimization.

[0093] Choosing a suitable optimizer to update the model weights is a key step in the training process. Commonly used optimizers include stochastic gradient descent (SGD), Adam, etc. These optimizers adjust the model weights based on the gradient information of the loss function to minimize the loss function value. In the training of the LSTM model, the Adam optimizer is favored due to its good convergence and adaptability.

[0094] Use a training loop and optimizer to train the LSTM model. During the training process, you can gradually adjust hyperparameters (such as learning rate, batch size, etc.) to optimize the performance of the model. In addition, you can try to use different activation functions, regularization methods, etc. to improve the generalization ability of the model. During the training process, you need to pay close attention to the model's loss function value and performance indicators on the validation set (such as accuracy, recall, etc.) so that you can adjust the training strategy in time.

[0095] After training is completed, a test data set is needed to evaluate the performance of the model. The test data set should be independent of the training data set and have a similar distribution to ensure the reliability of the evaluation results. Evaluation indicators can include accuracy, precision, recall, etc., and other evaluation indicators can also be customized as needed. By evaluating the performance of the model, you can understand the performance of the model on unknown data and make further model adjustments and optimizations accordingly.

[0096] Based on the evaluation results, you can adjust the parameters or structure of the model to improve performance. For example, you can increase the number of LSTM layers or the size of the hidden layer to enhance the expressiveness of the model; you can also adjust the learning rate or optimizer type to improve the convergence speed and stability of the model. When adjusting the model, you need to be cautious and fully verify the performance of the adjusted model.

[0097] Finally, the trained LSTM model is deployed to actual applications. This includes integrating the model into the power system planning, dispatching and optimization system to receive meteorological data in real time and predict power consumption. During the deployment process, it is necessary to ensure the stability and reliability of the model, and continuously monitor and maintain it to ensure its long-term effective operation.

[0098] In summary, the training method of the LSTM model is a complex and delicate process, which requires comprehensive consideration of model structure, training data, optimizer selection, training strategy, and evaluation indicators. Through continuous optimization and adjustment, an LSTM model with excellent performance can be trained.

[0099] In an embodiment of the present invention, based on step S2, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0100] First, define the variables: Q1 is the power supply; Q2 is the predicted power consumption; Q i is the storage capacity of the ith battery; x i is the state of the ith battery, x i =0 means off, x i =1 indicates that a charge or discharge operation is performed; t i is the charging time or discharging time of the ith battery; N is the total number of batteries;

[0101] Get the battery rated capacity C i ;

[0102] Introduce auxiliary variables: Define an auxiliary variable ΔQ i To represent the change in the charge of battery i, that is: ΔQ i =Q i new −Q i old ; Among them, Q i new is the regulated stored power, Q i old is the stored power before regulation;

[0103] Construct the basic objective function:

[0104] ;

[0105] Due to x i Directly from the change in charge ΔQ i Determine, ΔQ i With x i Connect, that is:

[0106] If ΔQ i ≠0, then let x i =1; otherwise, x i =0;

[0107] ;

[0108] Set up constraints:

[0109] 0<Qi new <C i , 0<Q i old <C i ;

[0110] When Q1>Q2, Q i new >Q i old ; When Q1<Q2, Q i new <Q i old ;

[0111] Define a continuous variable as the slack variable s i To approximate x i , and add a penalty term to encourage s i In ΔQ i ≠0 is close to 1, at ΔQ i =0; minimizing the sum of this slack variable serves as a substitute for the objective function.

[0112] On the basis of the above embodiment, in order to further improve the accuracy of the model provided by the above embodiment, in one embodiment, a specific penalty term is provided:

[0113] ;

[0114] in, is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise; λ is a positive penalty parameter used to control the severity of the penalty.

[0115] Based on this specific penalty term, the basic objective function is updated to the objective function:

[0116] .

[0117] In an embodiment of the present invention, based on step S3, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0118] The specific method of obtaining the power supply includes: obtaining the power supply of the area from the power distribution plan, or calculating the power supply based on the historical power supply of the area, for example, taking the average historical power supply as the power supply.

[0119] The power grid in this area is a microgrid based on renewable energy, including photovoltaic power generation systems, wind power generation systems, etc. The power generation of these renewable energy devices is affected by many factors, such as solar radiation intensity, wind speed, temperature, etc. In order to accurately predict the power generation of these devices and optimize the dispatch and operation of the power grid, it is decided to use a neural network model for prediction.

[0120] Power supply prediction process in microgrid:

[0121] Data collection and preprocessing:

[0122] Collect historical power generation data of renewable energy equipment in the microgrid, as well as corresponding meteorological data (such as solar radiation intensity, wind speed, temperature, etc.).

[0123] The collected data is preprocessed, including data cleaning, missing value filling, outlier processing, etc., to ensure the accuracy and completeness of the data.

[0124] The processed data is divided into training set and test set for training and verification of neural network model.

[0125] Neural network model construction:

[0126] Select appropriate neural network models, such as BP neural network, LSTM neural network, etc. These models have strong nonlinear fitting ability and adaptability, and can handle power generation prediction problems with multivariate and nonlinear relationships.

[0127] According to the characteristics of the input data (such as meteorological data, equipment type, etc.), the input layer, hidden layer and output layer structure of the neural network are designed. The input layer receives influencing factors such as meteorological data, and the output layer outputs the predicted power generation.

[0128] Set the hyperparameters of the neural network, such as learning rate, batch size, number of iterations, etc., to optimize the training effect of the model.

[0129] Model training and optimization:

[0130] The neural network model is trained using the training set data, and the connection weights and thresholds in the network are continuously adjusted to make the actual output value of the model as close as possible to the expected output value (i.e., historical power generation data).

[0131] During the training process, cross-validation, regularization and other methods are used to prevent model overfitting and improve the generalization ability of the model.

[0132] According to the performance indicators on the validation set (such as accuracy, mean square error, etc.), adjust the structure and hyperparameters of the neural network to optimize the predictive performance of the model.

[0133] Power generation forecast:

[0134] Use the trained neural network model to predict the meteorological data for a certain period of time in the future and input it into the model.

[0135] The model calculates and outputs predicted power generation based on the input meteorological data.

[0136] The predicted power generation is compared with the actual situation to evaluate the prediction accuracy and reliability of the model.

[0137] Power grid dispatch and optimization:

[0138] According to the predicted power generation, the dispatch plan of the microgrid is optimized to ensure the stability and economy of the power grid.

[0139] During peak power generation periods, the charging and discharging strategies of energy storage equipment should be reasonably arranged to balance the grid load.

[0140] During periods of low power generation, the reliability of power supply of the power grid can be ensured by adjusting the operating parameters of renewable energy equipment or starting backup power sources.

[0141] By using neural network models to predict the power generation of renewable energy equipment in microgrids, real-time monitoring and accurate prediction of the grid operation status can be achieved. This helps to optimize the grid dispatch plan, improve the stability and economy of the grid, and provide strong support for the widespread application of renewable energy.

[0142] Substitute the power supply and predicted power consumption into the optimization model.

[0143] In addition, it is necessary to regularly collect the battery voltage from the battery management system and calculate the battery storage capacity based on the rated voltage and discharge curve of the battery. The storage capacity of the i-th battery is the storage capacity Q before adjustment. i old .

[0144] In a specific example, the specific method of battery monitoring includes:

[0145] Regular collection: In order to understand the battery status in real time, it is necessary to regularly collect battery voltage data from the battery management system (BMS). The collection frequency should be determined based on the battery usage and system requirements to ensure the accuracy and timeliness of the data.

[0146] Data recording: The collected voltage data needs to be accurately recorded and stored in the system database for subsequent analysis and calculation.

[0147] Data verification: After the data is collected, it is necessary to verify the data to ensure its accuracy and completeness. This includes checking whether the data is missing, abnormal or wrong.

[0148] Data cleaning: For problematic data, cleaning and correction are required. This may include filling missing values, correcting erroneous values, or deleting invalid data.

[0149] Rated voltage reference: Each battery has a rated voltage value, which is the voltage of the battery when it is fully charged. By comparing the collected voltage data with the rated voltage, you can preliminarily determine the battery's charging status.

[0150] Discharge curve utilization: The discharge curve of a battery describes the relationship between the voltage and time during the discharge process. This curve is an important reflection of the battery characteristics and is also the key basis for calculating the remaining power.

[0151] Mapping between voltage and power: Based on the discharge curve of the battery, a mapping relationship between voltage and power can be established. This relationship may be linear or nonlinear, depending on the specific type and characteristics of the battery.

[0152] Power estimation: Through the method of searching or interpolation, the corresponding power value can be found in the discharge curve according to the currently collected voltage data. This value is the current remaining power of the battery.

[0153] Error correction: Since the actual battery usage may deviate from the discharge curve, it is necessary to perform error correction on the calculated remaining capacity. This can be achieved by comparing historical data, taking into account battery aging or environmental factors.

[0154] Result output: The calculated remaining power is output in a visual manner, such as displaying it on the battery management system interface, or providing it to other systems through an API interface.

[0155] Real-time monitoring: In order to ensure the safety and stable operation of the battery, the remaining power of the battery needs to be monitored in real time. When the remaining power is lower than a certain threshold, the system should issue an early warning or take protective measures.

[0156] Through the above process, we can regularly collect the battery voltage data from the battery management system and calculate the remaining power of the battery based on the rated voltage and discharge curve of the battery.

[0157] In an embodiment of the present invention, based on step S4, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0158] S401, is the slack variable s i and optimization variable Q i new Generate initial values, set learning rate α and penalty parameter λ.

[0159] Slack variable s i :Suppose we have a battery pack consisting of N batteries, each of which has a slack variable s i , which is used to indicate the flexibility of its power allocation. Initially, we can assign a small random value to each si, such as s i = rand() * 0.1 (where rand() means generating a random number between 0 and 1).

[0160] Optimizing variable Q i new :Here we assume that Q i new Represents the total storage capacity of the battery, which can be initially set to a reasonable estimate, such as Q i new = C i / N (where C i total capacity of the battery).

[0161] Learning rate α: set to 0.01, indicating the step size of variable update in each iteration.

[0162] Penalty parameter λ: set to 1.0, used to introduce a penalty on slack variables in the objective function to encourage the algorithm to find solutions that satisfy the constraints.

[0163] S402. Calculate the objective function value according to the current variable value.

[0164] According to the current variable value (Q i new and i ), calculate the value of the objective function.

[0165] S403, the objective function with respect to each slack variable s i Find the partial derivatives and synthesize the gradient vector from the partial derivative arrays of all slack variables.

[0166] The partial derivative arrays of all slack variables are combined into a gradient vector: g = [-2λ * s1, -2λ * s2, ..., -2λ* s n ].

[0167] S404, according to the gradient vector and the learning rate α, update the value of the relaxation variable, using the following formula for updating:

[0168] ;

[0169] is the objective function with respect to the slack variable s i The partial derivative of .

[0170] S405. Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the decrease in the objective function value is less than a preset threshold, or the number of iterations reaches a preset maximum value, the algorithm is considered to have converged and the iteration is stopped.

[0171] Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the decrease in the objective function value is less than a preset threshold (such as 0.001), or the number of iterations reaches the preset maximum value (such as 1000 times), the algorithm is considered to have converged and the iteration is stopped.

[0172] S406: Analyze the battery power changes according to the optimization results of the slack variables, including which batteries have been charged and discharged, and the adjusted storage power.

[0173] According to the optimization results of the slack variables, we can get the power distribution of each battery. Due to the introduction of slack variables, the power distribution between batteries may no longer be completely uniform, but is distributed according to certain rules (such as minimizing the sum of squares of slack variables).

[0174] By comparing the slack variable values ​​before and after optimization, we can understand which batteries have undergone charge and discharge operations (i.e., batteries whose slack variable values ​​have changed significantly).

[0175] Finally, based on the optimized Qinew and the power distribution of each battery, we can calculate the adjusted storage power.

[0176] By introducing slack variables and optimization algorithms, the battery management system can achieve intelligent allocation and optimization of battery power, thereby improving power utilization, enhancing system stability, improving energy management efficiency, and enhancing system adaptability. These beneficial effects are of great significance to improving the performance and reliability of the battery management system.

[0177] In some embodiments, the energy storage charge and discharge management system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the energy storage charge and discharge management system may be stored in the memory of a computer device and executed by at least one processor to execute (see Figure 1 Description) Function of energy storage charging and discharging management.

[0178] In this embodiment, the energy storage charging and discharging management system can be divided into multiple functional modules according to the functions it performs, such as Figure 2As shown. The functional modules of the system 200 may include: a power consumption prediction module 210, an optimization modeling module 220, a power supply substitution module 230 and an optimization solution module 240. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0179] The electricity consumption prediction module is used to collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted electricity consumption;

[0180] Optimization modeling module, used to build an optimization model to minimize the number of charge and discharge times;

[0181] A power supply substitution module, used to obtain the power supply amount, and substitute the predicted power consumption and the power supply amount into the optimization model;

[0182] The optimization solution module is used to solve the optimization model using a continuous optimization method to obtain an optimal charging and discharging solution.

[0183] Optionally, as an embodiment of the present invention, meteorological data is collected, and the meteorological data and the corresponding collection time series are input into a pre-trained long short-term memory network model to obtain predicted power consumption, including:

[0184] Collect meteorological data and generate timestamps for the meteorological data, the meteorological data including temperature, precipitation, and wind speed;

[0185] Arranging the meteorological data into a meteorological data sequence according to the collection time;

[0186] Arrange the timestamps of the meteorological data into a time series in chronological order;

[0187] The meteorological data sequence and the time series are input into a pre-trained long short-term memory neural network model to obtain predicted power consumption.

[0188] Optionally, as an embodiment of the present invention, an optimization model for minimizing the number of charge and discharge times is constructed, including:

[0189] Define variables: Q1 is the power supply; Q2 is the predicted power consumption; Q i is the storage capacity of the ith battery; x i is the state of the ith battery, x i =0 means off, x i =1 indicates that a charge or discharge operation is performed; t i is the charging time or discharging time of the ith battery; N is the total number of batteries;

[0190] Get the battery rated capacity C i ;

[0191] Introduce auxiliary variables: Define an auxiliary variable ΔQ i To represent the change in the charge of battery i, that is: ΔQ i =Q i new −Q i old ; Among them, Q i new is the regulated stored power, Q i old is the stored power before regulation;

[0192] Construct the basic objective function:

[0193] ;

[0194] Due to x i Directly from the change in charge ΔQ i Determine, ΔQ i With x i Connect, that is:

[0195] If ΔQ i ≠0, then let x i =1; otherwise, x i =0;

[0196] ;

[0197] Set up constraints:

[0198] 0<Q i new <C i , 0<Q i old <C i ;

[0199] When Q1>Q2, Q i new >Q i old ; When Q1<Q2, Q i new <Q i old ;

[0200] Define a continuous variable as the slack variable s i To approximate x i , and add a penalty term to encourage s i In ΔQ i ≠0 is close to 1, at ΔQ i=0; minimizing the sum of this slack variable serves as a substitute for the objective function.

[0201] Optionally, as an embodiment of the present invention, the penalty item includes:

[0202] ;

[0203] in, is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise; λ is a positive penalty parameter used to control the severity of the penalty.

[0204] Optionally, as an embodiment of the present invention, minimizing the sum of the slack variables as a substitute for the objective function includes:

[0205] The objective function is .

[0206] Optionally, as an embodiment of the present invention, the method further includes:

[0207] The battery voltage is collected from the battery management system at regular intervals, and the battery storage capacity is calculated based on the rated voltage and discharge curve of the battery.

[0208] Optionally, as an embodiment of the present invention, the optimization model is solved by a continuous optimization method to obtain an optimal charging and discharging scheme, including:

[0209] is the slack variable s i and optimization variable Q i new Generate initial values, set learning rate α and penalty parameter λ;

[0210] Calculate the objective function value based on the current variable value;

[0211] For each slack variable s, the objective function i Find partial derivatives and synthesize the partial derivative arrays of all slack variables into a gradient vector;

[0212] According to the gradient vector and the learning rate α, the value of the slack variable is updated using the following formula:

[0213] ;

[0214] is the objective function with respect to the slack variable s i The partial derivative of

[0215] Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the decrease in the objective function value is less than a preset threshold, or the number of iterations reaches the preset maximum value, the algorithm is considered to have converged and the iteration is stopped.

[0216] According to the optimization results of the slack variables, the battery power changes are analyzed, including which batteries have been charged and discharged, and the adjusted storage power.

[0217] Figure 3 The energy storage charge and discharge management method provided for the embodiment of the present application can be applied to the device. It will be understood by those skilled in the art that the device structure involved in the embodiment of the present invention does not constitute a limitation on the device, and the device may include more or fewer components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0218] The device 300 may include: a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.

[0219] The memory 320 may be used to store the execution instructions of the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is enabled to perform some or all of the steps in the following method embodiments.

[0220] The processor 310 is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 310 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0221] The communication unit 330 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0222] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0223] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0224] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0225] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

[0226] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0228] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for managing energy storage charging and discharging, characterized in that: include: Collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted power consumption; Construct an optimization model to minimize the number of charge and discharge times; Acquire power supply, and substitute the predicted power consumption and the power supply into the optimization model; The optimization model is solved by using a continuous optimization method to obtain an optimal charging and discharging scheme; Construct an optimization model to minimize the number of charge and discharge cycles, including: Define variables: Q1 is the power supply; Q2 is the predicted power consumption; Q i is the storage capacity of the ith battery; x i is the state of the ith battery, x i =0 means off, x i =1 indicates that a charge or discharge operation is performed; t i is the charging time or discharging time of the ith battery; N is the total number of batteries; Get the battery rated capacity C i ; Introduce auxiliary variables: Define an auxiliary variable ΔQ i To represent the change in the charge of battery i, that is: ΔQ i =Q i new −Q i old ; Among them, Q i new is the regulated stored power, Q i old is the stored power before regulation; Construct the basic objective function: ; Due to x i Directly from the change in charge ΔQ i Determine, ΔQ i With x i Connect, that is: If ΔQ i ≠0, then let x i =1; otherwise, x i =0; ; Set up constraints: 0<Q i new <C i ,0<Q i old <C i ; When Q1>Q2, Q i new >Q i old ; When Q1<Q2, Q i new <Q i old ; Define a continuous variable as the slack variable s i To approximate x i , and add a penalty term to encourage s i In ΔQ i ≠0 is close to 1, at ΔQ i =0 is close to 0; minimizing the sum of this slack variable is used as a substitute for the objective function; The penalties include: ; in, is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise; λ is a positive penalty parameter used to control the severity of the penalty; Minimizing this sum of slack variables as an alternative to the objective function involves: The objective function is .

2. The method according to claim 1, characterized in that Collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model, and obtain the predicted power consumption, including: Collect meteorological data and generate timestamps for the meteorological data, the meteorological data including temperature, precipitation, and wind speed; Arranging the meteorological data into a meteorological data sequence according to the collection time; Arrange the timestamps of the meteorological data into a time series in chronological order; The meteorological data sequence and the time series are input into a pre-trained long short-term memory neural network model to obtain predicted power consumption.

3. The method according to claim 1, characterized in that The method further comprises: The battery voltage is collected from the battery management system at regular intervals, and the battery storage capacity is calculated based on the rated voltage and discharge curve of the battery.

4. The method according to claim 1, characterized in that The optimization model is solved by a continuous optimization method to obtain an optimal charging and discharging scheme, including: is the slack variable s i and optimization variable Q i new Generate initial values, set learning rate α and penalty parameter λ; Calculate the objective function value based on the current variable value; For each slack variable s, the objective function i Find partial derivatives and synthesize the partial derivative arrays of all slack variables into a gradient vector; According to the gradient vector and the learning rate α, the value of the slack variable is updated using the following formula: ; is the objective function with respect to the slack variable s i The partial derivative of Calculate the updated objective function value and compare it with the objective function value of the previous iteration. If the decrease in the objective function value is less than a preset threshold, or the number of iterations reaches the preset maximum value, the algorithm is considered to have converged and the iteration is stopped. According to the optimization results of the slack variables, the battery power changes are analyzed, including which batteries have been charged and discharged, and the adjusted storage power.

5. An energy storage charging and discharging management system, characterized in that: include: The electricity consumption prediction module is used to collect meteorological data, input the meteorological data and the corresponding collection time series into the pre-trained long short-term memory network model to obtain the predicted electricity consumption; Optimization modeling module, used to build an optimization model to minimize the number of charge and discharge times; A power supply substitution module, used to obtain the power supply amount, and substitute the predicted power consumption and the power supply amount into the optimization model; An optimization solution module, used to solve the optimization model using a continuous optimization method to obtain an optimal charging and discharging solution; Construct an optimization model to minimize the number of charge and discharge cycles, including: Define variables: Q1 is the power supply; Q2 is the predicted power consumption; Q i is the storage capacity of the ith battery; x i is the state of the ith battery, x i =0 means off, x i =1 indicates that a charge or discharge operation is performed; t i is the charging time or discharging time of the ith battery; N is the total number of batteries; Get the battery rated capacity C i ; Introduce auxiliary variables: Define an auxiliary variable ΔQ i To represent the change in the charge of battery i, that is: ΔQ i =Q i new −Q i old ; Among them, Q i new is the regulated stored power, Q i old is the stored power before regulation; Construct the basic objective function: ; Due to x i Directly from the change in charge ΔQ i Determine, ΔQ i With x i Connect, that is: If ΔQ i ≠0, then let x i =1; otherwise, x i =0; ; Set up constraints: 0<Q i new <C i ,0<Q i old <C i ; When Q1>Q2, Q i new >Q i old ; When Q1<Q2, Q i new <Q i old ; Define a continuous variable as the slack variable s i To approximate x i , and add a penalty term to encourage s i In ΔQ i ≠0 is close to 1, at ΔQ i =0 is close to 0; minimizing the sum of this slack variable is used as a substitute for the objective function; The penalties include: ; in, is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise; λ is a positive penalty parameter used to control the severity of the penalty; Minimizing this sum of slack variables as an alternative to the objective function involves: The objective function is .

6. A device, characterized in that: include: A memory, used for storing an energy storage charging and discharging management program; A processor is used to implement the steps of the energy storage charge and discharge management method as described in any one of claims 1 to 4 when executing the energy storage charge and discharge management program.

7. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores an energy storage charge and discharge management program, and when the energy storage charge and discharge management program is executed by the processor, the steps of the energy storage charge and discharge management method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and device for generating source-load-storage optimized operation strategy of regional intelligent substation

    CN114498768A

  • Optimized scheduling method, system and equipment for shared energy storage and storage medium

    CN116454930A