Virtual power plant transaction strategy optimization method and system
Through the multi-head attention mechanism and gated cycle unit, the transmission timing data of virtual power plants is predicted and corrected, and combined with the gradient descent optimization model, the problem of noise interference in virtual power plants is solved, and the prediction accuracy and decision efficiency are improved.
Patent Information
- Application Number
- CN202410919556.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-08
AI Technical Summary
The illusion problems caused by blank and outlier noise in virtual power plant transaction decisions lead to noise interference in electricity price prediction, affecting the accuracy of decisions.
The multi-head attention mechanism and gated cycle unit are used to extract and predict the transmission timing data on the supply side of the virtual power plant, and an optimization model is constructed in combination with the gradient descent method to reduce the impact of noise and improve prediction accuracy.
It improves the convergence of machine learning algorithms and search solution efficiency, obtains a more accurate prediction model, and reduces the impact of noise on virtual power plant transaction decisions.
Smart Images

Figure CN118916668A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system power dispatching, and in particular to a virtual power plant transaction strategy optimization method and system. Background Art
[0002] In recent years, strategic reform of power energy has gradually become the core of power market reform. However, clean and renewable energy, mainly wind and photovoltaic power generation, is random, intermittent and volatile. The large-scale and high-proportion integration of renewable energy into the distribution network will have a great impact on the power grid.
[0003] The Virtual Power Plant (VPP) application is a virtualized power production and dispatching system based on advanced communication technology. It manages and controls distributed renewable energy in multiple regions and types, integrates distributed wind power, rooftop photovoltaics, energy storage and loads, and participates in power market transactions, providing management and auxiliary services for distribution and transmission networks. The supply side and demand side of the virtual power plant are two key parts of its operating framework. The supply side includes distributed power sources such as photovoltaics and wind power and energy storage equipment, and the demand side includes controllable loads such as industrial, transportation and air conditioning loads and user-side energy storage.
[0004] The main difficulty of the virtual power plant scheduling problem is that its optimization decision is based on the prediction of uncertain factors such as electricity price, demand-side response, load, and new energy. In the Chinese invention patent with the publication number CN115619450A, a virtual power plant real-time electricity price prediction system is provided, which realizes the virtual power plant's low buy and high sell, profit and energy efficiency optimization through accurate prediction of market electricity prices. However, when there are fluctuations on the load side, other uncertain factors such as weather and traffic flow will affect the power generation and the obtained electricity price will still have noise interference, that is, the illusion problem caused by blank and outlier noise in machine learning. Therefore, in order to reduce the impact of noise on the final virtual power plant's trading decision, it is necessary to develop a solution to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to provide a virtual power plant trading strategy optimization method and system to solve the illusion problem caused by uncontrolled blank and outlier noise in machine learning, and reduce the impact of noise on the final virtual power plant trading decision.
[0006] The present invention provides a virtual power plant transaction strategy optimization method, which adopts the following technical solutions: In the first aspect, the present invention provides a virtual power plant transaction strategy optimization method, which includes the following steps:
[0007] Acquire and pre-process the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information;
[0008] Based on a multi-head attention mechanism, feature extraction and splicing are performed on the power transmission time series data to obtain time series features;
[0009] Based on the multi-head attention mechanism and the gated recurrent unit, the time series features are predicted and corrected to obtain the prediction result of the supply side power transmission;
[0010] An optimization model including an objective function is constructed based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, and the optimization strategy is obtained by solving the optimization model based on the gradient descent method.
[0011] The beneficial effect of the prediction method provided by the present invention is that it proposes a better inductive bias, the machine algorithm can converge to a better model, and obtain a more accurate prediction model, which improves the efficiency of the algorithm search solution, solves the illusion problem caused by uncontrolled blanks and outlier noise in machine learning, and reduces the impact of noise on the final virtual power plant's trading decision.
[0012] Optionally, acquiring and preprocessing the power transmission information of the supply side to obtain the power transmission timing data is characterized by comprising:
[0013] After acquiring and preprocessing the transmission information of the traditional transmission mode in the supply side, the traditional time series data is obtained;
[0014] After acquiring and preprocessing the transmission information of the new energy transmission mode on the supply side, the new energy time series data is obtained;
[0015] The traditional time series data and the new energy time series data are combined to obtain the power transmission time series data, wherein the power transmission time series data includes at least one of thermal power generation, hydropower generation, wind power generation, photovoltaic power generation and new energy storage.
[0016] Different types of power generation have different timing characteristics in time series. Separate processing can preserve the characteristics of each time series, improve the specificity of the data, and also improve the accuracy of the final prediction results.
[0017] Optionally, extracting features from the power transmission time series data and then splicing them based on a multi-head attention mechanism to obtain time series features includes:
[0018] After extracting features from traditional time series data and new energy time series data based on the multi-head attention mechanism, the traditional time series features and new energy time series features are obtained by splicing them according to the transmission method, and the time series features are obtained by integrating the traditional time series features and the new energy time series features.
[0019] Optionally, the process of predicting and correcting the time series features based on the multi-head attention mechanism and the gated recurrent unit includes:
[0020] Construct an initial prediction model based on the gated neural unit with multi-head attention mechanism;
[0021] Dividing the initial prediction model into a training set and a test set based on time series features to obtain a prediction model and preliminary prediction results;
[0022] The prediction result is obtained by correcting and screening the preliminary prediction result based on real statistical data; wherein the real statistical data comes from the electricity market.
[0023] The data used for learning often have time series gaps and missing value noise, and the noise in the neural network causes the learned results to be biased. In order to constrain the noise and correct the bias, the data must be processed before each backpropagation, and the neural network must be further adjusted to make the prediction results more accurate and provide accurate data for subsequent trading decision calculations.
[0024] Optionally, the process of correcting the deviation based on the real statistical data and screening the preliminary prediction results to obtain the prediction results includes:
[0025] The difference value of the preliminary prediction result is calculated based on the real statistical data. When the difference value is greater than the statistical preset threshold, the weight value of the preliminary prediction result is reduced and the prediction model is returned to the learning process until the model training is completed to obtain a prediction result that is less than the statistical preset threshold.
[0026] Real statistical data can turn output that does not meet our expectations into a value that is more in line with the actual situation. If a round of training does not meet expectations, the training will be returned to achieve the effect of correcting the output results of machine learning.
[0027] Optionally, after constructing an optimization model including an objective function based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, it includes: optimizing and inverting the objective function to obtain a cost difference function, and minimizing the cost difference based on the gradient descent method to obtain a trading strategy.
[0028] The fixed quantities in the objective function are all set based on real statistical data, making the constructed objective function more in line with the actual usage scenario, resulting in the final trading decision being more in line with the actual situation.
[0029] Optionally, the cost difference function is obtained based on the objective function optimization and inversion, including:
[0030] The objective function is the benefit calculation function minus the cost calculation function; the benefit calculation function includes the dynamically adjusted electricity price mechanism and real-time demand, and the objective function formula is as follows:
[0031]
[0032] is the profit calculation function, E D is the real-time demand, G TF is the traditional transmission capacity, G RF Transmit electricity for renewable energy; is the cost calculation function.
[0033] The cost difference function is obtained by substituting the benefit calculation function into the optimization objective function and changing each coefficient to the opposite number.
[0034] Optionally, the profit calculation function is the spot market profit function plus the medium and long-term contract price profit function; the profit calculation formula is as follows:
[0035]
[0036] in, is the profit function of the medium and long-term contract price, T L is the medium- and long-term contract period, E L For medium and long-term contract electricity, The electricity price for medium and long-term trading contracts;
[0037] in, is the spot market profit function, t is the instantaneous time, v is the virtual power plant including input and output, Ichar is the input, and Idchar is the output;
[0038] The cost difference function is the cost calculation function minus the sum of the medium and long-term contract price profit function and the spot market profit function; the cost difference function formula is as follows:
[0039]
[0040] The parameters are the same as above.
[0041] Optionally, a trading strategy is obtained by minimizing the cost difference based on the gradient descent method, including:
[0042] Based on the gradient descent method, the cost difference is minimized to obtain two sets of matrix values corresponding to the profit maximization combination and the cost minimization combination respectively;
[0043] Based on the comparison and judgment of the two sets of matrix values, when the profit maximization combination is greater than the cost minimization combination, the virtual power plant sells electricity; otherwise, the virtual power plant purchases electricity.
[0044] In a second aspect, the present invention further provides a virtual power plant transaction strategy optimization system, comprising:
[0045] A data extraction module is used to obtain and pre-process the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information;
[0046] A feature extraction module extracts features from the power transmission time series data based on a multi-head attention mechanism and then splices the features to obtain time series features;
[0047] The regression prediction module predicts and corrects the time series features based on the multi-head attention mechanism and the gated recurrent unit to obtain the prediction result of the supply-side power transmission;
[0048] The strategy optimization module constructs an optimization model including an objective function based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, and obtains the optimization strategy by solving the optimization model based on the gradient descent method.
[0049] For the beneficial effects of the second aspect, reference may be made to the description of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of the steps of the virtual power plant strategy generation method in the present invention;
[0051] Figure 2 It is the overall framework flow chart of the virtual power plant strategy generation method in the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical scheme and advantages of the embodiment of the present invention clearer, the technical scheme in the embodiment of the present invention will be clearly and completely described below. Obviously, the described embodiment is a part of the embodiment of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0053] An embodiment of the present invention provides a virtual power plant transaction strategy optimization method, which specifically includes:
[0054] Step S1, acquiring and preprocessing the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information;
[0055] Step S2: extracting features from the power transmission time series data based on a multi-head attention mechanism and then splicing the features to obtain time series features;
[0056] Step S3: predicting and correcting the time series features based on a multi-head attention mechanism and a gated recurrent unit to obtain a prediction result of the supply-side power transmission;
[0057] Step S4: construct an optimization model including an objective function based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, and obtain an optimization strategy by solving the optimization model based on the gradient descent method.
[0058] In some embodiments, when executing step S1, acquiring and preprocessing the power transmission information of the supply side to obtain the power transmission timing data includes:
[0059] After acquiring and preprocessing the transmission information of the traditional transmission mode in the supply side, the traditional time series data is obtained;
[0060] After acquiring and preprocessing the transmission information of the new energy transmission mode on the supply side, the new energy time series data is obtained;
[0061] Combine traditional time series data and new energy time series data to obtain power transmission time series data.
[0062] Furthermore, the power transmission timing data includes at least one of thermal power generation, hydropower generation, wind power generation, photovoltaic power generation and new energy storage.
[0063] Specifically, the data of each power transmission source is sorted so that the data format of each source is “year-month-day-hour-minute” + “real-time power generation”. The time stamp and power generation constitute the time series data of each power transmission source.
[0064] Furthermore, for the single transmission case, P i (G i , C i ), where P i For power transmission, G i is the power transmission, C i The cost of transmission.
[0065] In some embodiments, when executing step S2, it specifically includes: after extracting features from traditional time series data and new energy time series data respectively based on the multi-head attention mechanism, splicing them according to the transmission method to obtain corresponding traditional time series features and new energy time series features, and fusing traditional time series features and new energy time series features to obtain time series features.
[0066] Specifically, the first-stage neural network model is constructed based on the convolutional neural network and introduces a multi-head attention mechanism. The specific structure is a 12-layer Transformer Encoder, which enables multi-head attention to focus on the correspondence between different positions in the timestamp and the power supply. The specific correspondence between the year, quarter, day and power generation is captured by different attention layers.
[0067] Specifically, according to the different sources of power generation, the traditional power generation method and the new energy power generation method are spliced separately, denoted as P T (GT , C T ) and P R (G R , C R ), where P T For traditional power generation methods, P R For new energy; different power generation methods lead to different characteristics of power generation types in time series. Separate processing can retain more characteristics and make the prediction results more accurate.
[0068] In some embodiments, when executing step S3, it specifically includes:
[0069] Step S3-1, constructing an initial prediction model based on a gated neural unit that introduces a multi-head attention mechanism; training and testing the initial prediction model based on time series features into a training set and a test set to obtain a prediction model and preliminary prediction results;
[0070] Step S3-2, correcting and filtering the preliminary prediction results based on real statistical data to obtain prediction results; wherein the real statistical data comes from the electricity market.
[0071] Specifically, when executing step S3-1, the preliminary prediction model is constructed based on the gated recurrent neural network and introduces a multi-head attention mechanism, which enables the network to find the factors that have the greatest impact on the current power supply in the multivariate data and give corresponding prediction results.
[0072] Furthermore, the preliminary prediction model is a multi-head attention network with N (N=12) layers.
[0073] After splicing, the two types of features are spliced and sent to the gate control multi-head attention network respectively to further explore the relationship between time series and power generation to obtain P TF (G TF , C TF ) and P RF (G RF , C RF ).
[0074] Specifically, when executing step S3-2, it includes: calculating the difference value of the preliminary prediction result based on the real statistical data, and when the difference value is greater than the statistical preset threshold, reducing the weight value of the preliminary prediction result and returning to the prediction model learning again until the model training is completed, and obtaining a prediction result less than the statistical preset threshold.
[0075] In other embodiments, see Figure 2 , various traditional power generation time series data and various renewable power generation time series data enter the convolutional multi-head attention module for feature extraction, and are spliced according to the power generation method to obtain P T and P R. Input to the gated attention module for regression training and obtain the preliminary prediction result P RF and P TF , and input it into the post-processing module for correction and screening to obtain the prediction result.
[0076] In some embodiments, the process of executing step S4 includes:
[0077] Step S4-1, constructing an objective function based on the prediction results, the transmission cost of the supply side, and the electricity price of the virtual power plant, and then optimizing and inverting to obtain a cost difference function;
[0078] Step S4-2: Obtain the trading strategy by minimizing the cost difference based on the gradient descent method.
[0079] Specifically, when executing step S4-1, the process of constructing the objective function includes:
[0080] The objective function is the benefit calculation function minus the cost calculation function; the benefit calculation function includes the dynamically adjusted electricity price mechanism and real-time demand, and the objective function formula is as follows:
[0081]
[0082] is the profit calculation function, E D is the real-time demand, G TF is the traditional transmission capacity, G RF Transmit electricity for renewable energy; is the cost calculation function;
[0083] The cost difference function is obtained by substituting the benefit calculation function into the optimization objective function and changing each coefficient to the opposite number.
[0084] In fact, the profit calculation function is the spot market profit function plus the medium and long-term contract price profit function; the profit calculation formula is as follows:
[0085]
[0086] Furthermore, is the profit function of the medium and long-term contract price, T L is the medium- and long-term contract period, E L For medium and long-term contract electricity, It is the electricity price for medium and long term trading contracts.
[0087] Furthermore, is the spot market profit function, t is the instant time, v is the virtual power plant including input and output, Ichar is the input, and Idchar is the output.
[0088] Furthermore, the cost difference function is the cost calculation function minus the sum of the medium and long-term contract price profit function and the spot market profit function; the cost difference function formula is as follows:
[0089]
[0090] The parameters are the same as above.
[0091] Specifically, when executing step S4-2, it includes:
[0092] Based on the gradient descent method, the cost difference is minimized to obtain two sets of matrix values corresponding to the profit maximization combination and the cost minimization combination respectively;
[0093] Based on the comparison and judgment of the two sets of matrix values, when the profit maximization combination is greater than the cost minimization combination, the virtual power plant sells electricity; otherwise, the virtual power plant purchases electricity.
[0094] An embodiment of the present invention provides a virtual power plant transaction strategy optimization system, including:
[0095] A data extraction module is used to obtain and pre-process the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information;
[0096] A feature extraction module extracts features from the power transmission time series data based on a multi-head attention mechanism and then splices the features to obtain time series features;
[0097] The regression prediction module predicts and corrects the time series features based on the multi-head attention mechanism and the gated recurrent unit to obtain the prediction result of the supply-side power transmission;
[0098] The strategy optimization module constructs an optimization model including an objective function based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, and obtains the optimization strategy by solving the optimization model based on the gradient descent method.
[0099] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as described in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways.
Claims
1. A virtual power plant trading strategy optimization method, characterized in that: The following steps are involved: Acquire and pre-process the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information; Based on a multi-head attention mechanism, feature extraction and splicing are performed on the power transmission time series data to obtain time series features; Based on the multi-head attention mechanism and the gated recurrent unit, the time series features are predicted and corrected to obtain the prediction result of the supply side power transmission; An optimization model including the objective function is constructed based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant. The optimization model is solved based on the gradient descent method to obtain the optimization strategy.
2. The trading strategy optimization method according to claim 1, characterized in that: Acquire and preprocess the transmission information on the supply side to obtain transmission timing data, including: After acquiring and preprocessing the transmission information of the traditional transmission mode in the supply side, the traditional time series data is obtained; After acquiring and preprocessing the transmission information of the new energy transmission mode on the supply side, the new energy time series data is obtained; The traditional time series data and the new energy time series data are combined to obtain the power transmission time series data, wherein the power transmission time series data includes at least one of thermal power generation, hydropower generation, wind power generation, photovoltaic power generation and new energy storage.
3. The trading strategy optimization method according to claim 1, characterized in that: Based on the multi-head attention mechanism, the power transmission time series data is feature extracted and then spliced to obtain time series features, including: After extracting features from traditional time series data and new energy time series data based on the multi-head attention mechanism, the traditional time series features and new energy time series features are obtained by splicing them according to the transmission method, and the time series features are obtained by integrating the traditional time series features and the new energy time series features.
4. The trading strategy optimization method according to claim 1, characterized in that: The process of predicting and correcting the time series features based on the multi-head attention mechanism and the gated recurrent unit includes: Construct an initial prediction model based on the gated neural unit with multi-head attention mechanism; Dividing the initial prediction model into a training set and a test set based on time series features to obtain a prediction model and preliminary prediction results; The prediction result is obtained by correcting and screening the preliminary prediction result based on real statistical data; wherein the real statistical data comes from the electricity market.
5. The trading strategy optimization method according to claim 4, characterized in that: The process of correcting and screening the preliminary prediction results based on real statistical data to obtain the prediction results includes: The difference value of the preliminary prediction result is calculated based on the real statistical data. When the difference value is greater than the statistical preset threshold, the weight value of the preliminary prediction result is reduced and the prediction model is returned to the learning process until the model training is completed to obtain a prediction result that is less than the statistical preset threshold.
6. The trading strategy optimization method according to claim 1, characterized in that: Based on the forecast results, the transmission cost on the supply side, and the electricity price of the virtual power plant, an optimization model with an objective function is constructed, including: The cost difference function is obtained by optimizing and inverting the objective function, and the trading strategy is solved by minimizing the cost difference based on the gradient descent method.
7. The trading strategy optimization method according to claim 6, characterized in that: Based on the objective function optimization and inversion, the cost difference function is obtained, including: The objective function is the benefit calculation function minus the cost calculation function; the benefit calculation function includes the dynamically adjusted electricity price mechanism and real-time demand, and the objective function formula is as follows: is the profit calculation function, E D is the real-time demand, G TF is the traditional transmission capacity, G RF Transmit electricity for renewable energy; is the cost calculation function; The cost difference function is obtained by substituting the benefit calculation function into the optimization objective function and changing each coefficient to the opposite number.
8. The trading strategy optimization method according to claim 7, characterized in that: The profit calculation function is the spot market profit function plus the medium and long-term contract price profit function; the profit calculation formula is as follows: in, is the profit function of the medium and long-term contract price, T L is the medium- and long-term contract period, E L For medium and long-term contract electricity, The electricity price for medium and long-term trading contracts; in, is the spot market revenue function, t is the instantaneous time, v is the virtual power plant including input and output, Ichar is the input, and Idchar is the output; the cost difference function is the cost calculation function minus the sum of the medium and long-term contract price revenue function and the spot market revenue function; the cost difference function formula is as follows: The parameters are the same as above.
9. The trading strategy optimization method according to claim 6, characterized in that: The trading strategy is solved by minimizing the cost difference based on the gradient descent method, including: Based on the gradient descent method, the cost difference is minimized to obtain two sets of matrix values corresponding to the profit maximization combination and the cost minimization combination respectively; Based on the comparison and judgment of the two sets of matrix values, when the profit maximization combination is greater than the cost minimization combination, the virtual power plant sells electricity; otherwise, the virtual power plant purchases electricity.
10. A virtual power plant trading strategy optimization system, characterized in that: include: A data extraction module is used to obtain and pre-process the transmission information of the supply side of the virtual power plant to obtain transmission timing data; the transmission information includes traditional transmission information and new energy transmission information; A feature extraction module extracts features from the power transmission time series data based on a multi-head attention mechanism and then splices the features to obtain time series features; The regression prediction module predicts and corrects the time series features based on the multi-head attention mechanism and the gated recurrent unit to obtain the prediction result of the supply-side power transmission; The strategy optimization module constructs an optimization model including an objective function based on the prediction results, the transmission cost on the supply side, and the electricity price of the virtual power plant, and obtains the optimization strategy by solving the optimization model based on the gradient descent method.
Citation Information
Cited By
Virtual power plant user sensitive data identification method and system, medium and terminal
CN119577797A
