Charging and discharging strategy generation method based on virtual power plant and related equipment
By using an optimized AOLSTM model and Monte Carlo algorithm to generate charging and discharging strategies, the problems of low power generation prediction accuracy and coarse energy storage strategies in virtual power plants are solved, achieving more accurate power generation prediction and more optimized charging and discharging decisions, thereby improving energy utilization efficiency and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA RESOURCES NEW ENERGY INVESTMENT CO LTD SHANXI BRANCH
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-01
AI Technical Summary
Existing virtual power plants have low power generation prediction accuracy during charging and discharging, and energy storage charging and discharging strategies are coarse. Traditional models are poorly adapted to intermittent wind and solar power and high-dimensional nonlinear data, resulting in large prediction errors. Furthermore, LSTM models converge slowly and are easily affected by noise. They are not coordinated with energy storage systems, which makes it impossible to generate accurate charging and discharging strategies.
A Long Short-Term Memory (AOLSTM) network model optimized by the Adam optimizer is adopted. Combined with historical power generation data and the current power generation environment, the power generation is predicted. The charging and discharging strategies are generated through power loss and Monte Carlo algorithm. Considering the charging efficiency, discharging efficiency and power loss of the energy storage system, a preset strategy generation model is constructed and the logical relationship of the logic gates is optimized.
It improves the accuracy of power generation forecasting, generates more accurate charging and discharging strategies, optimizes energy utilization efficiency, reduces operating costs, and ensures system stability and economy.
Smart Images

Figure CN121965657A_ABST
Abstract
Description
A method and related equipment for generating charging and discharging strategies based on virtual power plants Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and related equipment for generating charging and discharging strategies based on virtual power plants. Background Technology
[0002] When existing virtual power plants participate in charging and discharging, the accuracy of power generation prediction is low, and the energy storage charging and discharging strategies are coarse. Traditional models such as the continuous method, gradient boosting, and random forest have poor adaptability to the intermittency of wind and solar power and high-dimensional nonlinear data, resulting in large prediction errors. Although LSTM can capture time-series dependencies, it converges slowly, is susceptible to noise interference, and mostly only performs single-point predictions without coordination with the energy storage system. Consequently, it is impossible to generate accurate charging and discharging strategies.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is related technology. Summary of the Invention
[0004] The main objective of this application is to provide a method and related equipment for generating charging and discharging strategies based on a virtual power plant, aiming to solve the technical problem of how to generate accurate charging and discharging strategies.
[0005] To achieve the above objectives, this application proposes a method for generating charging and discharging strategies based on a virtual power plant. The method includes: responding to a charging and discharging strategy generation command, acquiring historical power generation data corresponding to each power generation module, and acquiring the current power generation environment corresponding to each power generation module; based on the historical power generation data and the current power generation environment, using a preset AOLSTM model to predict the power generation of each module, obtaining the predicted power generation. The preset AOLSTM model is constructed based on a Long Short-Term Memory (LSTM) network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the LSTM network, and the logic gates include input gates, output gates, and forget gates; and generating a charging and discharging strategy based on the predicted power generation.
[0006] In one embodiment, the step of generating a charging and discharging strategy based on the predicted power generation further includes: acquiring historical electricity price data; processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain a charging and discharging strategy, wherein the preset strategy generation model is constructed based on power loss and the Monte Carlo algorithm, and the power loss is used to characterize the loss of stored power due to changes in self-discharge over time.
[0007] In one embodiment, before the step of processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain a charging and discharging strategy, the method further includes: determining the charging efficiency, discharging efficiency, and power loss corresponding to the energy storage system in the virtual power plant; determining the round-trip efficiency corresponding to the energy storage system based on the charging efficiency, the discharging efficiency, and the power loss; and constructing a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm.
[0008] In one embodiment, the step of constructing a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm further includes: constructing an initial strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm; randomly generating multiple sets of charging and discharging energy increment values; and iteratively training the initial strategy generation model based on the multiple sets of charging and discharging energy increment values to obtain the preset strategy generation model.
[0009] In one embodiment, before the step of predicting the power generation of each invention module using a preset AOLSTM model, the method further includes: obtaining a sample dataset, wherein the prediction result corresponding to the sample dataset is a first prediction result; based on the sample dataset, using the current AOLSTM model to predict the power generation of each invention module to obtain a second prediction result; based on the first prediction result and the second prediction result, determining the prediction loss value corresponding to the current AOLSTM model; determining whether the prediction loss value is less than or equal to a preset loss threshold, and determining whether the number of training iterations of the current AOLSTM model has reached a preset training iteration threshold; if the prediction loss value is greater than the preset loss threshold, and the number of training iterations of the current AOLSTM model has not reached the preset training iteration threshold, adjusting the parameters of the current AOLSTM model, and based on the current AOLSTM model with adjusted parameters, returning to the step of using the current AOLSTM model to predict the power generation of each invention module to obtain the second prediction result, until the prediction loss value is less than or equal to the preset loss threshold, or the number of training iterations of the current AOLSTM model has reached the preset training iteration threshold, thus obtaining the preset AOLSTM model.
[0010] In one embodiment, prior to the step of obtaining the sample dataset, the method further includes: collecting historical power generation parameters corresponding to the virtual power plant, the historical power generation parameters including wind power generation, solar irradiance, CHP net hourly power generation, and environmental parameters; cleaning the historical power generation parameters to obtain first power generation parameters; filling the missing values in the first power generation parameters using linear interpolation to obtain second power generation parameters; and based on 3D... The criteria are as follows: outliers in the second power generation parameter are removed to obtain the third power generation parameter; based on a ratio of 70%, 20%, and 10%, the third power generation parameter is divided into a first training set, a second training set, and a third training set. The first training set is used for learning model parameters, the second training set is used to evaluate the model's generalization ability on unknown data, and the third training set is used to adjust the model's hyperparameters during training to ensure stable model performance; a sample dataset is constructed based on the first training set, the second training set, and the third training set.
[0011] Furthermore, to achieve the above objectives, this application also proposes a charging and discharging strategy generation device based on a virtual power plant. The device includes: an acquisition module, configured to acquire historical power generation data corresponding to each power generation module and the current power generation environment corresponding to each power generation module in response to a charging and discharging strategy generation command; a prediction module, configured to predict the power generation of each power generation module based on the historical power generation data and the current power generation environment using a preset AOLSTM model, obtaining the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network, and the logic gates include input gates, output gates, and forget gates; and a generation module, configured to generate a charging and discharging strategy based on the predicted power generation.
[0012] In one embodiment, the generation module further includes: a first acquisition unit for acquiring historical electricity price data; and a data processing unit for processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain a charging and discharging strategy. The preset strategy generation model is constructed based on power loss and the Monte Carlo algorithm, and the power loss is used to characterize the loss of stored power due to the change of self-discharge over time.
[0013] In one embodiment, the generation module further includes: a first determining unit, configured to determine the charging efficiency, discharging efficiency, and energy loss of the energy storage system in the virtual power plant; a second determining unit, configured to determine the round-trip efficiency of the energy storage system based on the charging efficiency, the discharging efficiency, and the energy loss; and a first constructing unit, configured to construct a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm.
[0014] In one embodiment, the generation module further includes: a second construction unit, used to construct an initial strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm; and a generation unit, used to randomly generate multiple sets of charge-discharge energy increment values, and iteratively train the initial strategy generation model based on the multiple sets of charge-discharge energy increment values to obtain a preset strategy generation model.
[0015] In one embodiment, the virtual power plant-based charging and discharging strategy generation device further includes a model training module, which further includes: a second acquisition unit for acquiring a sample dataset, wherein the prediction result corresponding to the sample dataset is a first prediction result; a prediction unit for predicting the power generation of each invention module using the current AOLSTM model based on the sample dataset to obtain a second prediction result; a third determination unit for determining the prediction loss value corresponding to the current AOLSTM model based on the first prediction result and the second prediction result; a judgment unit for determining whether the prediction loss value is less than or equal to a preset loss threshold and whether the training number of the current AOLSTM model has reached a preset training number threshold; and an iterative training unit for adjusting the parameters of the current AOLSTM model if the prediction loss value is greater than the preset loss threshold and the training number of the current AOLSTM model has not reached the preset training number threshold, and returning to the step of using the current AOLSTM model to predict the power generation of each invention module to obtain a second prediction result based on the current AOLSTM model with adjusted parameters, until the prediction loss value is less than or equal to the preset loss threshold, or the training number of the current AOLSTM model has reached the preset training number threshold, to obtain a preset AOLSTM model.
[0016] In one embodiment, the model training module further includes: a data acquisition unit for acquiring historical power generation parameters corresponding to the virtual power plant, the historical power generation parameters including wind power generation, solar irradiance, CHP net hourly power generation, and environmental parameters; a cleaning unit for cleaning the historical power generation parameters to obtain first power generation parameters; a filling unit for filling missing values in the first power generation parameters using linear interpolation to obtain second power generation parameters; and a removal unit for... The criteria are as follows: Outliers in the second power generation parameter are removed to obtain the third power generation parameter; a partitioning unit is used to divide the third power generation parameter into a first training set, a second training set, and a third training set based on a ratio of 70%, 20%, and 10%, respectively. The first training set is used for learning model parameters, the second training set is used to evaluate the model's generalization ability on unknown data, and the third training set is used to adjust the model's hyperparameters during training to ensure stable model performance; a third construction unit is used to construct a sample dataset based on the first training set, the second training set, and the third training set.
[0017] Furthermore, to achieve the above objectives, this application also proposes a charging and discharging strategy generation device based on a virtual power plant. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the charging and discharging strategy generation method based on a virtual power plant as described above.
[0018] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the charging and discharging strategy generation method based on the virtual power plant described above.
[0019] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the charging and discharging strategy generation method based on a virtual power plant as described above.
[0020] The one or more technical solutions proposed in this application have at least the following technical effects: This application proposes a method and related equipment for generating charging and discharging strategies based on virtual power plants, which relates to the field of data processing technology. In the existing technologies, when virtual power plants participate in charging and discharging, the power generation prediction accuracy is low and the energy storage charging and discharging strategy is coarse. Traditional models such as continuous method, gradient boosting, and random forest have poor adaptability to wind and solar intermittency and high-dimensional nonlinear data, and the prediction error is large. Although LSTM can capture time series dependence, it converges slowly, is easily affected by noise, and mostly only makes single-point predictions without coordinating with the energy storage system. Consequently, compared to the inability to generate accurate charging and discharging strategies, in this application, firstly, in response to the charging and discharging strategy generation instruction, historical power generation data corresponding to each power generation module is obtained, and the current power generation environment corresponding to each power generation module is obtained. Then, based on the historical power generation data and the current power generation environment, a preset AOLSTM model is used to predict the power generation of each inventive module to obtain the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network. The logic gates include input gates, output gates, and forget gates. Finally, based on the predicted power generation, a charging and discharging strategy is generated.
[0021] This application uses the Adam optimizer to optimize the Long Short-Term Memory network, that is, to optimize the logical relationships corresponding to the logic gates in the Long Short-Term Memory network, to obtain a preset AOLSTM model, and then to obtain a more accurate prediction of power generation. Based on the more accurate prediction of power generation, a more accurate charging and discharging strategy is generated. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 is a flowchart illustrating the charging and discharging strategy generation method based on a virtual power plant according to Embodiment 1 of this application; Figure 2 is a flowchart illustrating the charging and discharging strategy generation method based on a virtual power plant according to Embodiment 2 of this application; Figure 3 is a flowchart illustrating the charging and discharging strategy generation method based on a virtual power plant according to Embodiment 3 of this application; Figure 4 is a schematic diagram of the module structure of the charging and discharging strategy generation device based on a virtual power plant according to an embodiment of this application; Figure 5 is a schematic diagram of the equipment structure of the hardware operating environment involved in the charging and discharging strategy generation method based on a virtual power plant according to an embodiment of this application.
[0025] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0026] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0027] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0028] The main solution of this application embodiment is as follows: In this embodiment, for ease of description, the following description uses a charging and discharging strategy generation device based on a virtual power plant as the execution subject.
[0029] Due to the following technical limitations: existing virtual power plants exhibit low power generation prediction accuracy and coarse-grained energy storage charging and discharging strategies when involved in charging and discharging. Traditional models such as continuous methods, gradient boosting, and random forests are poorly adapted to the intermittent nature of wind and solar power and high-dimensional nonlinear data, resulting in large prediction errors. While LSTM can capture time-series dependencies, it converges slowly, is susceptible to noise interference, and often only performs single-point predictions without coordination with the energy storage system. Consequently, accurate charging and discharging strategies cannot be generated.
[0030] This application provides a solution in which: first, in response to a charge / discharge strategy generation command, historical power generation data corresponding to each power generation module is obtained, and the current power generation environment corresponding to each power generation module is obtained; then, based on the historical power generation data and the current power generation environment, a preset AOLSTM model is used to predict the power generation of each inventive module to obtain the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network. The logic gates include input gates, output gates, and forget gates; finally, a charge / discharge strategy is generated based on the predicted power generation.
[0031] It is understandable that this application uses the Adam optimizer to optimize the long short-term memory network, that is, to optimize the logical relationship corresponding to the logic gate in the long short-term memory network, to obtain the preset AOLSTM model, and then to obtain a more accurate prediction of power generation, and then to generate a more accurate charging and discharging strategy based on the more accurate prediction of power generation.
[0032] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a charging and discharging strategy generation device based on a virtual power plant. The following description uses a charging and discharging strategy generation device based on a virtual power plant as an example to illustrate this embodiment and the subsequent embodiments.
[0033] Based on this, the present application provides a method for generating charging and discharging strategies based on virtual power plants. Referring to Figure 1, Figure 1 is a flowchart of the first embodiment of the method for generating charging and discharging strategies based on virtual power plants in this application.
[0034] In this embodiment, the charging and discharging strategy generation method based on a virtual power plant includes steps S10 to S40: Step S10, in response to the charging and discharging strategy generation command, acquires the historical power generation data corresponding to each power generation module, and acquires the current power generation environment corresponding to each power generation module; In this application, when the system receives a certain trigger signal (such as user input, automatic detection of specific conditions by the system, etc.), the system will take corresponding actions according to this trigger signal (charging and discharging strategy generation command). The action here is to acquire data to provide a basis for subsequent charging and discharging decisions.
[0035] A power generation module refers to a unit in a system used for generating electricity. For example, in a hybrid energy system, it may include solar panels, wind turbines, small gas generators, etc.
[0036] Historical power generation data refers to the power generation records of each power generation module within a certain period of time in the past. This data may include: power generation (e.g., kilowatt-hours, kWh): recording the electricity generated by each module in different time periods.
[0037] Power generation efficiency: such as the photoelectric conversion efficiency of solar panels, the wind energy conversion efficiency of wind turbines, etc.
[0038] Power generation time: Record when each module generates electricity, such as the power generation time of solar panels during the day and the power generation time of wind turbines when there is wind.
[0039] Environmental conditions, such as the intensity of sunlight, wind speed, and temperature, can affect power generation efficiency.
[0040] It's important to note that historical data is acquired to analyze the performance and patterns of each power generation module. This data allows the system to predict future power generation under similar conditions, thereby optimizing charging and discharging strategies. For example, if historical data shows that a solar panel has lower power generation efficiency during winter when sunlight is weak, the system will take this into account when formulating its charging and discharging strategy.
[0041] The current power generation environment refers to the various external conditions that affect the performance of the power generation module at the current moment. These conditions may include: Sunlight intensity: For solar power generation modules, sunlight intensity directly affects power generation efficiency. If the current sunlight intensity is low (such as on a cloudy day or in the evening), the power generation capacity of the solar panels will decrease.
[0042] Wind speed and direction: Wind speed and direction are key factors for wind turbines. Suitable wind speed can improve power generation efficiency, while changes in wind direction may require adjustments to the direction of the wind turbine.
[0043] Temperature: Temperature also affects power generation modules. For example, solar panels become less efficient at high temperatures, while wind turbines may require antifreeze measures at extremely low temperatures.
[0044] Humidity and air pressure: These environmental factors may also indirectly affect the performance of the power generation module.
[0045] It should be noted that acquiring current power generation environment data is for real-time assessment of the power generation capacity of each power generation module. By combining historical data with the current environment, the system can more accurately predict the power generation of each module under current conditions, thereby making more reasonable charging and discharging decisions. For example, if the current wind speed is low, the system may reduce its reliance on wind turbines and instead use other power generation modules or energy storage devices.
[0046] In this embodiment, the system generates instructions in response to charging and discharging strategies, and acquires historical and current environmental data, thereby achieving refined management and optimized scheduling of the power generation modules. This type of system is particularly important in the field of renewable energy, because the power generation capacity of renewable energy sources (such as solar and wind power) is greatly affected by environmental conditions. This method can improve energy utilization efficiency, reduce waste, and ensure the stable operation of the system.
[0047] Step S20: Based on the historical power generation data and the current power generation environment, a preset AOLSTM model is used to predict the power generation of each invention module, resulting in the predicted power generation. The preset AOLSTM model is constructed based on a Long Short-Term Memory (LSTM) network optimized by the Adam optimizer. The Adam optimizer optimizes the logical relationships corresponding to the logic gates in the LSTM network, including input gates, output gates, and forget gates. It should be noted that the preset AOLSTM (Adam-Optimized Long Short-Term Memory) is an optimized LSTM network. LSTM is a special type of Recurrent Neural Network (RNN) specifically designed for processing time-series data, capable of capturing long-term dependencies in the data. Here, "preset" means that the model has been trained and configured and can be directly used for prediction tasks.
[0048] It's important to note that LSTM uses a series of "gates" (logic gates) to control the flow of information, thus solving the gradient vanishing or exploding problem that traditional RNNs encounter when processing long sequences of data. Key logic gates in LSTM include: The input gate controls the degree to which new information enters the cell state.
[0049] It should be noted that the output gate is used to control the effect of cell state on output.
[0050] It should be noted that the forget gate is used to determine which information in a cell state needs to be forgotten.
[0051] It should be noted that these logic gates determine the flow of information through activation functions (such as Sigmoid or Tanh), thereby enabling dynamic processing of time series data.
[0052] In this application, historical power generation data and current power generation environment data are used as inputs. These data are typically preprocessed (e.g., normalized) to adapt to the model's input requirements. The model learns patterns from historical data and the current environment to output the predicted power generation of each power generation module at a future point in time.
[0053] It should be noted that Adam (Adaptive Moment Estimation) is an adaptive optimization algorithm widely used in training deep learning models. It combines the advantages of both momentum and RMSProp optimization methods, and can automatically adjust the learning rate, thereby accelerating model convergence.
[0054] When training an LSTM model, the Adam optimizer is used to adjust the model's weight parameters and optimize its performance. Through the Adam optimizer, the LSTM model can find the optimal solution faster, improving training efficiency and prediction accuracy.
[0055] It's important to note that in LSTM, each logic gate (input gate, output gate, forget gate) has its own weights and bias parameters (logical relationships), which determine the behavior of the logic gate. For example, the weight of the forget gate determines which information will be forgotten, while the weight of the input gate determines which new information will be retained.
[0056] In this application, by optimizing these weights and bias parameters, the Adam optimizer can adjust the behavior of the logic gates, enabling the LSTM model to better capture patterns in time series data. For example, by optimizing the weights of the forget gate, the model can more accurately determine which historical information is useful for the current prediction and which can be ignored.
[0057] Understandably, this deep learning-based approach can effectively handle complex time-series relationships in power generation forecasting, improving the accuracy and reliability of the forecasts.
[0058] Step S30: Generate a charging and discharging strategy based on the predicted power generation.
[0059] It's important to note that in energy management systems, forecasting power generation is fundamental to developing charging and discharging strategies. By predicting the power generation of individual power generation modules (such as solar panels and wind turbines) over a future period, the system can plan in advance how to allocate and utilize this energy. The benefits of forecasting power generation include: advance planning: understanding future power generation patterns and scheduling the charging and discharging of energy storage devices in advance.
[0060] Optimized scheduling: Based on power generation forecasts, energy is allocated rationally to avoid waste or shortages.
[0061] Cost control: Reduce reliance on high-cost energy sources and lower operating costs through reasonable scheduling.
[0062] System stability: Ensure the stability of energy supply and avoid system failures caused by insufficient or excessive power generation.
[0063] It should be noted that generating a charging and discharging strategy based on predicted power generation is a dynamic decision-making process, which usually involves the following key steps: First, the estimated power generation of each power generation module in a certain future time period is obtained from the model (such as the AOLSTM model).
[0064] Furthermore, it's crucial to understand the system's energy demand over the forecast period, including both stationary loads (such as lighting and equipment operation) and dynamic loads (such as air conditioning and electric vehicle charging). The current charge and health status of energy storage devices (such as batteries) should also be examined to determine their charge / discharge capabilities.
[0065] Finally, based on the predicted power generation and system demand, specific charging and discharging strategies are formulated.
[0066] It should be noted that charging and discharging strategies typically include the following aspects: Charging time: Charging is carried out during periods when power generation is sufficient and load demand is low (such as during the day when solar energy is abundant).
[0067] Charging power: Set a reasonable charging power based on the capacity and health status of the energy storage device.
[0068] Charging priority: Power is given first to critical loads (such as emergency equipment), and the remaining power is used for charging.
[0069] Discharge time: Discharge during periods when power generation is insufficient and load demand is high (such as at night or on cloudy days).
[0070] Discharge power: Set a reasonable discharge power based on load demand and the remaining power of the energy storage device.
[0071] Discharge limitation: Avoid over-discharge and ensure that the energy storage device has sufficient power to cope with emergencies.
[0072] Understandably, this application aims to optimize energy efficiency, reduce costs, and ensure stable system operation by analyzing and forecasting power generation and system demand to formulate reasonable charging and discharging plans. This process involves comprehensive consideration of data analysis, dynamic adjustments, and optimization objectives, and is one of the core functions of a modern energy management system.
[0073] Specifically, the step of generating a charging and discharging strategy based on the predicted power generation further includes steps S31-S32: Step S31, obtaining historical electricity price data; it should be noted that historical electricity price data refers to the electricity market price records over a past period. This data typically includes: electricity price fluctuations: changes in electricity prices during different time periods (such as daytime, nighttime, peak hours, and off-peak hours).
[0074] Seasonal variations: Electricity price differences in different seasons (such as peak electricity consumption in summer and heating demand in winter).
[0075] Policy impacts: such as the impact of time-of-use pricing policies and demand response policies on electricity prices.
[0076] It's worth noting that historical electricity price data can be used to analyze price fluctuations and seasonal variations. Furthermore, charging and discharging strategies can be developed based on electricity price levels to reduce costs. For example, charging during off-peak hours and discharging during peak hours can save on electricity costs.
[0077] Step S32: The predicted power generation and the historical electricity price data are processed using a preset strategy generation model to obtain a charging and discharging strategy. The preset strategy generation model is constructed based on power loss and Monte Carlo algorithm. The power loss is used to characterize the loss of stored power due to the change of self-discharge over time.
[0078] It should be noted that the preset strategy generation model is a pre-designed model used to generate the optimal charging and discharging strategy based on input data (predicted power generation and historical electricity price data). The core of this model is based on power loss and the Monte Carlo algorithm.
[0079] It's important to note that power loss refers to the natural reduction in the electrical capacity of an energy storage device (such as a battery) when it is not in use, due to factors such as internal chemical reactions. This loss typically increases over time, specifically manifested as: self-discharge rate: the percentage of natural reduction in the electrical capacity of an energy storage device per unit time. For example, a battery with a 1% self-discharge rate per day means that its electrical capacity will naturally decrease by 1% per day.
[0080] Time-cumulative effect: As time goes on, power loss accumulates, resulting in a reduction in the actual usable power of energy storage devices.
[0081] It's important to note that energy loss is a significant factor influencing charging and discharging strategies. When developing a strategy, the impact of energy loss on the available power of the energy storage device needs to be considered to more accurately plan the charging and discharging schedule. For example, during charging, energy loss needs to be taken into account to ensure that the charging amount is sufficient to compensate for losses caused by self-discharge; during discharging, the actual availability of current power needs to be considered to avoid insufficient power due to energy loss.
[0082] It should be noted that the Monte Carlo algorithm is a computational method based on random sampling, used to handle complex probabilistic problems. Its core idea is to approximate the expected value or optimal solution of a system through simulation with a large number of random samples. For example, random sampling involves randomly drawing samples from input data (such as predicted power generation or historical electricity price data).
[0083] Simulation process: Based on these samples, simulate the system's operation process (such as charging and discharging process).
[0084] Statistical analysis: Through multiple simulations and statistical analysis of the results, the expected behavior or optimal strategy of the system can be obtained.
[0085] It should be noted that in the generation of charging and discharging strategies, the Monte Carlo algorithm is used to handle the following problems: Uncertainty modeling: Considering the uncertainty of predicted power generation and electricity prices. For example, predicted power generation may have errors, and electricity prices may fluctuate. Finding the optimal charging and discharging strategy under different scenarios through extensive stochastic simulations. For example, simulating charging and discharging plans under different electricity price fluctuations to find the strategy with the lowest cost. Evaluating the risk of the charging and discharging strategy by simulating different scenarios. For example, evaluating the strategy performance under extreme electricity price fluctuations or insufficient power generation.
[0086] Understandably, through these steps, the system can generate an optimal charging and discharging strategy that takes into account multiple factors, thereby improving energy efficiency, reducing costs, and ensuring stable system operation.
[0087] This application proposes a method and related equipment for generating charging and discharging strategies based on virtual power plants, which relates to the field of data processing technology. In existing technologies, when virtual power plants participate in charging and discharging, the power generation prediction accuracy is low and the energy storage charging and discharging strategies are coarse. Traditional models such as continuous methods, gradient boosting, and random forests have poor adaptability to intermittent wind and solar power and high-dimensional nonlinear data, resulting in large prediction errors. Although LSTM can capture time-series dependencies, it converges slowly, is easily affected by noise, and mostly only performs single-point predictions without coordinating with energy storage systems. Consequently, compared to the inability to generate accurate charging and discharging strategies, in this application, firstly, in response to the charging and discharging strategy generation instruction, historical power generation data corresponding to each power generation module is obtained, and the current power generation environment corresponding to each power generation module is obtained. Then, based on the historical power generation data and the current power generation environment, a preset AOLSTM model is used to predict the power generation of each inventive module to obtain the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network. The logic gates include input gates, output gates, and forget gates. Finally, based on the predicted power generation, a charging and discharging strategy is generated.
[0088] This application uses the Adam optimizer to optimize the Long Short-Term Memory network, that is, to optimize the logical relationships corresponding to the logic gates in the Long Short-Term Memory network, to obtain a preset AOLSTM model, and then to obtain a more accurate prediction of power generation. Based on the more accurate prediction of power generation, a more accurate charging and discharging strategy is generated.
[0089] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to Figure 2. Before the step of processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain the charging and discharging strategy, steps A10 to A30 are included: Step A10, determining the charging efficiency, discharging efficiency, and energy loss corresponding to the energy storage system in the virtual power plant; it should be noted that charging efficiency refers to the ratio of the actual stored electricity to the input electricity during the charging process of the energy storage system. It is usually expressed as a percentage. For example, if the charging efficiency is 90%, it means that for every 100 units of input electricity, 90 units are actually stored.
[0090] It should be noted that charging efficiency is affected by a variety of factors, including battery type, charging current, and temperature. For example, the charging efficiency of lithium-ion batteries may decrease at low temperatures.
[0091] It's important to note that charging efficiency directly impacts the charging time and cost of an energy storage system. Lower charging efficiency means that more input electricity is required to achieve the same amount of stored capacity.
[0092] It should be noted that discharge efficiency refers to the ratio of the actual amount of electricity output by an energy storage system during discharge to the amount of electricity stored. It is also expressed as a percentage. Discharge efficiency is affected by factors such as battery type, discharge current, and temperature. For example, high-rate discharge may lead to a decrease in discharge efficiency.
[0093] It should be noted that discharge efficiency determines the effective output power of an energy storage system in actual use. Lower discharge efficiency means less actual usable power.
[0094] Step A20: Based on the charging efficiency, the discharging efficiency, and the energy loss, determine the round-trip efficiency of the energy storage system. It should be noted that round-trip efficiency refers to the ratio of output energy to input energy in one complete charge-discharge cycle of the energy storage system. It is a key indicator for measuring the overall efficiency of the energy storage system.
[0095] It should be noted that round-trip efficiency directly affects the economics and practicality of energy storage systems. Lower round-trip efficiency means more energy loss, increasing the system's operating costs.
[0096] Step A30: Based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm, construct a preset strategy generation model.
[0097] It should be noted that the preset strategy generation model is a pre-designed model used to generate the optimal charging and discharging strategy based on input data (round-trip efficiency, historical electricity price data). The core of the model is built based on the Monte Carlo algorithm.
[0098] Understandably, by determining the charging efficiency, discharging efficiency, and energy loss of the energy storage system, calculating the round-trip efficiency, and combining historical electricity price data with the Monte Carlo algorithm, a model capable of generating the optimal charging and discharging strategy can be constructed. This model can comprehensively consider multiple factors, optimize the operating efficiency of the energy storage system, reduce costs, and ensure the system's stability and economic efficiency.
[0099] Specifically, the step of constructing a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm further includes steps A31-A32: Step A31, constructing an initial strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm; in this application, the round-trip efficiency and historical electricity price data are used as inputs to the model. Then, electricity price samples are randomly selected from the historical electricity price data to simulate different electricity price scenarios. Based on the round-trip efficiency, the charging and discharging behavior of the energy storage system under different electricity price scenarios is simulated. Through multiple simulations, the system performance (such as cost, efficiency, etc.) under different strategies is statistically analyzed. Based on the simulation results, preliminary charging and discharging strategies are generated. These strategies may not be optimized in the initial stage, but they provide a foundation for subsequent iterative training.
[0100] It should be noted that although these strategies may not be optimal, they are feasible in the initial stage and provide a starting point for subsequent optimization.
[0101] Step A32: Randomly generate multiple sets of charge and discharge energy increment values, and iteratively train the initial strategy generation model based on the multiple sets of charge and discharge energy increment values to obtain the preset strategy generation model.
[0102] It should be noted that the charge / discharge energy increment refers to the change in energy of the energy storage system during each charge or discharge cycle. For example, each charge increases the energy by 1 kWh, and each discharge decreases it by 1 kWh. These increment values are used to simulate different charge / discharge scenarios and evaluate the system performance under different strategies.
[0103] In this application, multiple sets of incremental charge and discharge energy values are randomly generated, which can be different combinations of charge and discharge amounts. Using these incremental values, the initial strategy generation model is simulated multiple times. In each simulation, the performance indicators of the strategy (such as cost, efficiency, system stability, etc.) are evaluated based on different charge and discharge amounts. Based on the statistical analysis results, the parameters of the strategy generation model are adjusted to optimize the strategy's performance. For example, if a certain set of incremental values performs better in the simulation (e.g., lower cost, higher efficiency), the model is adjusted to favor this strategy. This process is repeated multiple times to gradually optimize the strategy generation model. Each iteration updates the model based on the new simulation results, causing it to gradually converge to the optimal strategy.
[0104] Understandably, after multiple iterations of training, the strategies generated by the model become more stable and reliable, reducing the uncertainty caused by randomness.
[0105] Understandably, an initial strategy generation model is constructed by combining round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm. Then, by randomly generating incremental values for charging and discharging energy and iteratively training the model, a preset strategy generation model capable of generating the optimal charging and discharging strategy is obtained. This process ensures the economy, feasibility, and stability of the strategy, and improves the operating efficiency of the energy storage system in the virtual power plant.
[0106] Based on the first and second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to Figure 3. Before the step of using a preset AOLSTM model to predict the power generation of each inventive module, steps B10 to B50 are included: Step B10, obtaining a sample dataset, wherein the prediction result corresponding to the sample dataset is the first prediction result; it should be noted that the sample dataset is a set of data used for training and validating the model, typically including historical power generation data, environmental conditions, etc. This data is used to evaluate the predictive performance of the model and help adjust the model parameters to improve prediction accuracy.
[0107] It should be noted that the first prediction result is the "true" or "expected" prediction result corresponding to the sample dataset. These results can be obtained from actual measured power generation data or from calculations using other validated models. They serve as the target for model training, used to evaluate the accuracy of the current model's prediction results.
[0108] Specifically, before the step of obtaining the sample dataset, steps B01 to B06 are included: Step B01, collecting historical power generation parameters corresponding to the virtual power plant, including wind power generation, solar irradiance, CHP net hourly power generation, and environmental parameters; it should be noted that historical power generation parameters refer to various data related to power generation recorded by the virtual power plant over a past period. These parameters are the basic data for analyzing and predicting power generation, providing input for subsequent model training.
[0109] Step B02 involves cleaning the historical power generation parameters to obtain the first power generation parameters. It should be noted that data cleaning refers to preprocessing the collected data, removing duplicate values, correcting erroneous data, and formatting the data. The cleaned data is called the first power generation parameters; this data is of higher quality but may still contain missing or outlier values.
[0110] Step B03 involves using linear interpolation to fill in the missing values in the first power generation parameter to obtain the second power generation parameter. It should be noted that linear interpolation is a simple interpolation method that estimates missing values based on the linear relationship between known data points. The data after filling in the missing values using linear interpolation is called the second power generation parameter, and this data exhibits improved completeness.
[0111] Step B04, based on 3 The criterion is to remove outliers from the second power generation parameter to obtain the third power generation parameter; it should be noted that 3 The criterion is a statistical method used to identify and remove outliers. It assumes that the data follows a normal distribution and considers outliers exceeding the mean ± 3 standard deviations (where...) as... The values of these parameters are outliers. The data after removing outliers is called the third generation parameter, and these data have been further improved in terms of quality and stability.
[0112] Step B05: Based on the proportions of 70%, 20%, and 10%, the third power generation parameter is divided into a first training set, a second training set, and a third training set. The first training set is used for learning model parameters, the second training set is used to evaluate the model's generalization ability on unknown data, and the third training set is used to adjust the model's hyperparameters during training to ensure stable model performance. In this application, the data is divided into different sets for model training, validation, and testing.
[0113] The first training set (70%) is used to learn the model parameters. The model is trained using this data to learn patterns from the data.
[0114] The second training set (20%) is used to evaluate the model's generalization ability on unknown data. This data is used to validate the model's performance and ensure that it does not overfit.
[0115] The third training set (10%) is used to adjust the model's hyperparameters during training. These data are used to adjust the model's hyperparameters (such as learning rate, regularization parameters, etc.) to ensure stable model performance.
[0116] In this application, the model is trained using a first training set to learn patterns in the data; the model's generalization ability is verified using a second training set to avoid overfitting; and the model's hyperparameters are adjusted using a third training set to optimize model performance.
[0117] Step B06: Construct a sample dataset based on the first training set, the second training set, and the third training set.
[0118] It should be noted that the sample dataset is a combination of the three datasets mentioned above, used for subsequent model training and optimization. The sample dataset contains all the data used for training, validation, and testing.
[0119] Ensure model robustness: Train and validate the model using a complete dataset to ensure stable performance across different scenarios.
[0120] Understandably, by collecting historical power generation parameters, cleaning the data, filling in missing values, removing outliers, and appropriately dividing the dataset, a high-quality sample dataset is ultimately constructed. These steps provide a solid foundation for subsequent model training and optimization, ensuring that the model can accurately predict power generation, thereby improving the operational efficiency and economy of the virtual power plant.
[0121] Step B20: Based on the sample dataset, use the current AOLSTM model to predict the power generation of each invention module to obtain a second prediction result. It should be noted that the current AOLSTM model refers to the model state at a certain moment during training, and its parameters (such as weights and biases) are dynamically changing. This is used to predict the sample dataset and generate the second prediction result.
[0122] It should be noted that the second prediction result is the output of the current AOLSTM model on the sample dataset, representing the model's estimate of the power generation of each power generation module. It is used to compare with the first prediction result and evaluate the model's prediction error.
[0123] Step B30: Based on the first prediction result and the second prediction result, determine the prediction loss value corresponding to the current AOLSTM model. It should be noted that the prediction loss value is an indicator that measures the difference between the current AOLSTM model's prediction result (second prediction result) and the actual result (first prediction result). Commonly used loss functions include mean squared error (MSE) and mean absolute error (MAE).
[0124] Step B40: Determine whether the predicted loss value is less than or equal to a preset loss threshold, and determine whether the current training iterations of the AOLSTM model have reached a preset training iteration threshold. It should be noted that the preset loss threshold is a pre-set upper limit for the loss value, used to determine whether the model has achieved satisfactory predictive performance. When the predicted loss value is less than or equal to this threshold, the model is considered sufficiently accurate, and training can be stopped.
[0125] It's important to note that the preset training iteration threshold is a pre-defined maximum number of training iterations used to prevent the model from training for too long or getting overfitted. When the model's training iterations reach this threshold, training will stop even if the predicted loss value does not reach the preset loss threshold. The decision logic includes: Condition 1, whether the predicted loss value is less than or equal to the preset loss threshold; Condition 2, whether the current AOLSTM model's training iterations have reached the preset training iteration threshold. These two conditions determine whether to continue training the model. If either condition is met, training stops; otherwise, the model parameters are adjusted and training continues.
[0126] Step B50: If the predicted loss value is greater than the preset loss threshold and the number of training iterations of the current AOLSTM model has not reached the preset training iteration threshold, adjust the parameters of the current AOLSTM model. Based on the current AOLSTM model with adjusted parameters, return to the step of using the current AOLSTM model to predict the power generation of each invention module and obtain the second prediction result, until the predicted loss value is less than or equal to the preset loss threshold, or the number of training iterations of the current AOLSTM model reaches the preset training iteration threshold, and obtain the preset AOLSTM model.
[0127] It should be noted that adjusting model parameters refers to updating the model's weights and biases using an optimization algorithm (such as the Adam optimizer) to reduce the prediction loss. By adjusting the parameters, the model's predictions are made closer to the true values.
[0128] It should be noted that if the predicted loss value is greater than the preset loss threshold, and the number of training iterations has not reached the preset training iteration threshold, iterative training begins. The model parameters are adjusted using an optimization algorithm (such as the Adam optimizer). The model with adjusted parameters is then used to re-predict the sample dataset, yielding a new second prediction result. Steps B20 to B40 are repeated until one of the following conditions is met: the predicted loss value is less than or equal to the preset loss threshold.
[0129] The number of training sessions has reached the preset threshold.
[0130] Understandably, the AOLSTM model that meets the conditions after the above iterative training process is called the preset AOLSTM model. The preset AOLSTM model is an optimized model used for subsequent power generation prediction tasks.
[0131] Understandably, by acquiring sample datasets, evaluating the accuracy of model predictions, adjusting model parameters, and conducting iterative training, a high-performance pre-defined AOLSTM model is ultimately obtained. This process ensures the accuracy and reliability of the model in predicting power generation, providing strong support for energy management and dispatch in virtual power plants.
[0132] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the charging and discharging strategy generation method based on the virtual power plant in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0133] It should be noted that all user-related data involved in this application (such as user attribute data, user behavior data, and user geographical location, etc., the data types here should be modified according to the adaptability of the solution content) were obtained with the user's permission or consent; that is to say, when this application is applied to specific products or technologies, user permission is required to obtain and process the relevant data, and the processing of the relevant data must comply with the relevant laws, regulations and regulatory standards of the relevant countries and regions.
[0134] For example, when it is necessary to obtain a user's current geographical location, a location acquisition prompt can be displayed on the user's terminal. After receiving confirmation from the user regarding the location acquisition prompt, the terminal can obtain the user's current geographical location.
[0135] This application also provides a charging and discharging strategy generation device based on a virtual power plant. Referring to Figure 4, the charging and discharging strategy generation device based on a virtual power plant includes: an acquisition module 10, which is used to acquire historical power generation data corresponding to each power generation module and acquire the current power generation environment corresponding to each power generation module in response to a charging and discharging strategy generation command; a prediction module 20, which is used to predict the power generation of each power generation module based on the historical power generation data and the current power generation environment using a preset AOLSTM model to obtain the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network. The logic gates include input gates, output gates, and forget gates; and a generation module 30, which is used to generate a charging and discharging strategy based on the predicted power generation.
[0136] In one embodiment, the generation module further includes: a first acquisition unit for acquiring historical electricity price data; and a data processing unit for processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain a charging and discharging strategy. The preset strategy generation model is constructed based on power loss and the Monte Carlo algorithm, and the power loss is used to characterize the loss of stored power due to the change of self-discharge over time.
[0137] In one embodiment, the generation module further includes: a first determining unit, configured to determine the charging efficiency, discharging efficiency, and energy loss of the energy storage system in the virtual power plant; a second determining unit, configured to determine the round-trip efficiency of the energy storage system based on the charging efficiency, the discharging efficiency, and the energy loss; and a first constructing unit, configured to construct a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm.
[0138] In one embodiment, the generation module further includes: a second construction unit, used to construct an initial strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm; and a generation unit, used to randomly generate multiple sets of charge-discharge energy increment values, and iteratively train the initial strategy generation model based on the multiple sets of charge-discharge energy increment values to obtain a preset strategy generation model.
[0139] In one embodiment, the virtual power plant-based charging and discharging strategy generation device further includes a model training module, which further includes: a second acquisition unit for acquiring a sample dataset, wherein the prediction result corresponding to the sample dataset is a first prediction result; a prediction unit for predicting the power generation of each invention module using the current AOLSTM model based on the sample dataset to obtain a second prediction result; a third determination unit for determining the prediction loss value corresponding to the current AOLSTM model based on the first prediction result and the second prediction result; a judgment unit for determining whether the prediction loss value is less than or equal to a preset loss threshold and whether the training number of the current AOLSTM model has reached a preset training number threshold; and an iterative training unit for adjusting the parameters of the current AOLSTM model if the prediction loss value is greater than the preset loss threshold and the training number of the current AOLSTM model has not reached the preset training number threshold, and returning to the step of using the current AOLSTM model to predict the power generation of each invention module to obtain a second prediction result based on the current AOLSTM model with adjusted parameters, until the prediction loss value is less than or equal to the preset loss threshold, or the training number of the current AOLSTM model has reached the preset training number threshold, to obtain a preset AOLSTM model.
[0140] In one embodiment, the model training module further includes: a data acquisition unit for acquiring historical power generation parameters corresponding to the virtual power plant, the historical power generation parameters including wind power generation, solar irradiance, CHP net hourly power generation, and environmental parameters; a cleaning unit for cleaning the historical power generation parameters to obtain first power generation parameters; a filling unit for filling missing values in the first power generation parameters using linear interpolation to obtain second power generation parameters; and a removal unit for... The criteria are as follows: Outliers in the second power generation parameter are removed to obtain the third power generation parameter; a partitioning unit is used to divide the third power generation parameter into a first training set, a second training set, and a third training set based on a ratio of 70%, 20%, and 10%, respectively. The first training set is used for learning model parameters, the second training set is used to evaluate the model's generalization ability on unknown data, and the third training set is used to adjust the model's hyperparameters during training to ensure stable model performance; a third construction unit is used to construct a sample dataset based on the first training set, the second training set, and the third training set.
[0141] The virtual power plant-based charge / discharge strategy generation device provided in this application employs the virtual power plant-based charge / discharge strategy generation method described in the above embodiments, and can solve the technical problem of generating charge / discharge strategies based on virtual power plants. Compared with related technologies, the beneficial effects of the virtual power plant-based charge / discharge strategy generation device provided in this application are the same as those of the virtual power plant-based charge / discharge strategy generation method provided in the above embodiments, and other technical features in the virtual power plant-based charge / discharge strategy generation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0142] This application provides a charging and discharging strategy generation device based on a virtual power plant. The charging and discharging strategy generation device based on a virtual power plant includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the charging and discharging strategy generation method based on a virtual power plant in the above embodiment 1.
[0143] Referring to Figure 5 below, a schematic diagram of a structure suitable for implementing a virtual power plant-based charge / discharge strategy generation device according to embodiments of this application is shown. The virtual power plant-based charge / discharge strategy generation device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The virtual power plant-based charge / discharge strategy generation device shown in Figure 5 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of this application.
[0144] As shown in Figure 5, the virtual power plant-based charge / discharge strategy generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the virtual power plant-based charge / discharge strategy generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the virtual power plant-based charge / discharge strategy generation device to communicate wirelessly or wiredly with other devices to exchange data. Although a virtual power plant-based charge / discharge strategy generation device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0145] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0146] The virtual power plant-based charge / discharge strategy generation device provided in this application, employing the virtual power plant-based charge / discharge strategy generation method described in the above embodiments, can solve the technical problems. Compared with related technologies, the beneficial effects of the virtual power plant-based charge / discharge strategy generation device provided in this application are the same as those of the virtual power plant-based charge / discharge strategy generation method described in the above embodiments, and other technical features in this virtual power plant-based charge / discharge strategy generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0147] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0148] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0149] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the charging and discharging strategy generation method based on a virtual power plant in the above embodiments.
[0150] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0151] The aforementioned computer-readable storage medium may be included in the virtual power plant-based charge and discharge strategy generation device; or it may exist independently and not assembled into the virtual power plant-based charge and discharge strategy generation device.
[0152] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a virtual power plant-based charging and discharging strategy generation device, the virtual power plant-based charging and discharging strategy generation device: responds to a charging and discharging strategy generation instruction by acquiring historical power generation data corresponding to each power generation module and acquiring the current power generation environment corresponding to each power generation module; based on the historical power generation data and the current power generation environment, uses a preset AOLSTM model to predict the power generation of each invention module, obtaining the predicted power generation. The preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer. The Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network, and the logic gates include input gates, output gates, and forget gates; and generates a charging and discharging strategy based on the predicted power generation.
[0153] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0155] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0156] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for generating charging and discharging strategies based on virtual power plants, thereby solving the technical problem of generating charging and discharging strategies based on virtual power plants. Compared with related technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the charging and discharging strategy generation method based on virtual power plants provided in the above embodiments, and will not be repeated here.
[0157] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for generating a charging and discharging strategy based on a virtual power plant.
[0158] The computer program product provided in this application can solve the technical problem of generating charging and discharging strategies based on virtual power plants. Compared with related technologies, the beneficial effects of the computer program product provided in this application are the same as those of the charging and discharging strategy generation method based on virtual power plants provided in the above embodiments, and will not be repeated here.
[0159] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.
Claims
1. A method for generating charging and discharging strategies based on a virtual power plant, characterized in that, The method for generating charging and discharging strategies based on a virtual power plant includes: responding to a charging and discharging strategy generation command, acquiring historical power generation data corresponding to each power generation module, and acquiring the current power generation environment corresponding to each power generation module; based on the historical power generation data and the current power generation environment, using a preset AOLSTM model to predict the power generation of each power generation module, obtaining the predicted power generation, wherein the preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer, the Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network, the logic gates include input gates, output gates and forget gates; and generating a charging and discharging strategy based on the predicted power generation.
2. The method for generating charging and discharging strategies based on a virtual power plant as described in claim 1, characterized in that, The step of generating a charging and discharging strategy based on the predicted power generation further includes: acquiring historical electricity price data; processing the predicted power generation and the historical electricity price data using a preset strategy generation model to obtain a charging and discharging strategy, wherein the preset strategy generation model is constructed based on power loss and the Monte Carlo algorithm, and the power loss is used to characterize the loss of stored power due to the change of self-discharge over time.
3. The method for generating charging and discharging strategies based on a virtual power plant as described in claim 2, characterized in that, Before the step of processing the predicted power generation and the historical electricity price data using the preset strategy generation model to obtain the charging and discharging strategy, the method further includes: determining the charging efficiency, discharging efficiency, and power loss corresponding to the energy storage system in the virtual power plant; determining the round-trip efficiency corresponding to the energy storage system based on the charging efficiency, the discharging efficiency, and the power loss; and constructing the preset strategy generation model based on the round-trip efficiency, historical electricity price data, and the Monte Carlo algorithm.
4. The method for generating charging and discharging strategies based on a virtual power plant as described in claim 3, characterized in that, The step of constructing a preset strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm further includes: constructing an initial strategy generation model based on the round-trip efficiency, historical electricity price data, and Monte Carlo algorithm; randomly generating multiple sets of charging and discharging energy increment values; and iteratively training the initial strategy generation model based on the multiple sets of charging and discharging energy increment values to obtain the preset strategy generation model.
5. The method for generating charging and discharging strategies based on a virtual power plant as described in claim 1, characterized in that, Before the step of predicting the power generation of each invention module using a preset AOLSTM model, the method further includes: obtaining a sample dataset, wherein the prediction result corresponding to the sample dataset is a first prediction result; based on the sample dataset, using the current AOLSTM model to predict the power generation of each invention module to obtain a second prediction result; based on the first prediction result and the second prediction result, determining the prediction loss value corresponding to the current AOLSTM model; determining whether the prediction loss value is less than or equal to a preset loss threshold, and determining whether the number of training iterations of the current AOLSTM model has reached a preset training iteration threshold; if the prediction loss value is greater than the preset loss threshold, and the number of training iterations of the current AOLSTM model has not reached the preset training iteration threshold, adjusting the parameters of the current AOLSTM model, and based on the current AOLSTM model with adjusted parameters, returning to the step of using the current AOLSTM model to predict the power generation of each invention module to obtain the second prediction result, until the prediction loss value is less than or equal to the preset loss threshold, or the number of training iterations of the current AOLSTM model has reached the preset training iteration threshold, thus obtaining the preset AOLSTM model.
6. The method for generating charging and discharging strategies based on a virtual power plant as described in claim 5, characterized in that, Before the step of obtaining the sample dataset, the method further includes: collecting historical power generation parameters corresponding to the virtual power plant, including wind power generation, solar irradiance, CHP net hourly power generation, and environmental parameters; cleaning the historical power generation parameters to obtain first power generation parameters; filling the missing values in the first power generation parameters using linear interpolation to obtain second power generation parameters; and based on 3D... The criteria are as follows: outliers in the second power generation parameter are removed to obtain the third power generation parameter; based on a ratio of 70%, 20%, and 10%, the third power generation parameter is divided into a first training set, a second training set, and a third training set. The first training set is used for learning model parameters, the second training set is used to evaluate the model's generalization ability on unknown data, and the third training set is used to adjust the model's hyperparameters during training to ensure stable model performance; a sample dataset is constructed based on the first training set, the second training set, and the third training set.
7. A charging and discharging strategy generation device based on a virtual power plant, characterized in that, The virtual power plant-based charging and discharging strategy generation device includes: an acquisition module, which is used to acquire historical power generation data corresponding to each power generation module and acquire the current power generation environment corresponding to each power generation module in response to the charging and discharging strategy generation command; a prediction module, which is used to predict the power generation of each power generation module based on the historical power generation data and the current power generation environment using a preset AOLSTM model to obtain the predicted power generation, wherein the preset AOLSTM model is constructed based on a long short-term memory network optimized by the Adam optimizer, and the Adam optimizer is used to optimize the logical relationships corresponding to the logic gates in the long short-term memory network, wherein the logic gates include input gates, output gates and forget gates; and a generation module, which is used to generate a charging and discharging strategy based on the predicted power generation.
8. A charging and discharging strategy generation device based on a virtual power plant, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for generating a charging and discharging strategy based on a virtual power plant as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the charging and discharging strategy generation method based on a virtual power plant as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the charging and discharging strategy generation method based on a virtual power plant as described in any one of claims 1 to 6.