Electricity quantity and electricity price collaborative optimization method for electricity trading market

Through the coordinated optimization method of electricity and electricity prices in the power trading market based on bilateral return equilibrium and LSTM prediction, the problems of disorder and low stability of bilateral transactions in the power trading system are solved, the equilibrium of power plant returns and the reduction of transaction costs are achieved, and the resource allocation efficiency and transaction stability of the power market are improved.

CN120387537APending Publication Date: 2025-07-29DATANG YUNNAN ENERGY MARKETING CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510438054.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The disorder and stability of bilateral transactions in the existing power trading system have led to a large gap in the annual unit power revenue of different power plants. Power plants with strong revenue capabilities have benefited from operating, while power plants with low revenue have difficulty in operating, and power trading has been greatly affected by fluctuations in natural disasters, so the market is not motivated enough to mobilize power manufacturers.

Method used

The coordinated optimization method of electricity trading market electricity and electricity prices based on bilateral income equilibrium and LSTM prediction is adopted. By obtaining the power plant's power generation plan and expected electricity price next month, calculating the profit and loss situation, introducing the distribution coefficient for electricity distribution, and combining market laws and seasonal changes to predict electricity prices, optimizing resource allocation and trading efficiency to ensure the balanced returns of each power plant.

Benefits of technology

It optimizes resource allocation, improves transaction efficiency, reduces transaction costs, enhances the competitiveness of the power market, promotes the development of the environmentally friendly power industry, provides long-term and stable profit guarantees for power plants, and promotes the modernization and sustainable development of the power industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387537A_ABST
    Figure CN120387537A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity quantity and electricity price collaborative optimization method for an electricity trading market, and relates to the technical field of intelligent power distribution. The method comprises the following steps: summarizing the planned generating capacity and expected electricity price of all power plants in the next month; calculating previous profit and loss conditions of all power plants; the running-in electric quantity used for participating in bilateral running-in in the next month is obtained; the running-in electricity price of the running-in electric quantity is calculated through a bilateral running-in algorithm, and it is ensured that the earnings of the power plants participating in the transaction are balanced; predicting the market electricity price of the next month by adopting a time sequence prediction algorithm to obtain a predicted electricity price; calculating the matching electricity price of the power plant in the next month based on the running-in electricity price and the predicted electricity price; matching the power plant with the user by adopting a distribution principle based on the running-in electric quantity of the power plant in the next month; and generating a transaction scheme based on a matching result of the power plant and the user. The method is used for solving the problems of disordered bilateral transaction and low stability in the existing power transaction system, not only optimizes resource allocation and improves the transaction efficiency, but also reduces the transaction cost by minimizing the number of transactions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent power distribution, and in particular relates to a collaborative optimization method for electricity quantity and price in a power trading market based on bilateral revenue equilibrium and LSTM prediction. Background Art

[0002] Electricity is the primary energy source for production and life in today's society. Efficient trading of electricity resources can significantly improve social productivity and mitigate related economic losses. In the electricity trading market, electricity prices play a decisive role, and setting appropriate electricity prices for both parties is crucial. Currently, online electricity trading is still in its early stages, with transactions between power plants and users conducted through trading platforms. Except in clearly defined circumstances, bilateral negotiated transactions are generally not subject to price limits. The main trading process in the electricity trading market includes transaction announcements, centralized bidding, rolling adjustments, verification of the rationality of submitted data, and publication of results. The primary work of calculating electricity prices is completed during the centralized bidding and rolling adjustments.

[0003] The centralized bidding stage includes three stages: centralized declaration, centralized running-in, and result release. In the centralized declaration stage, market entities secretly declare the amount of electricity and price to be bought or sold within a specified time, and the declared amount of electricity and price must meet the minimum unit and price constraints. In the centralized running-in stage, the power trading platform determines the transaction amount and price based on the declared information of the buyer and seller through a high-low matching price formation mechanism. The transaction price is calculated based on a certain ratio of the declared prices of the buyer and seller. If multiple price differences are the same, the transactions will be allocated in equal proportion based on the relative size of the declared electricity. In the pre-transaction result release stage, the trading center will announce the pre-transaction results after the centralized competitive transaction ends. If the centralized bidding is conducted jointly with the rolling running-in stage, the declarations that are not executed in the centralized bidding stage will automatically enter the rolling running-in stage.

[0004] The rolling run-in phase involves transaction declaration, rolling run-in, and result release. Market entities anonymously declare the amount of electricity and price they intend to buy or sell during the trading period. The declared information is immediately published, and the declared electricity and price must meet the minimum unit and price constraints. Unexecuted declarations can be revoked, but executed declarations cannot be revoked. The power trading platform automatically matches and runs in real time. The transaction principle is that when the buyer's declared price is greater than or equal to the seller's declared price, the transaction is completed immediately. The seller trades in price from low to high and time from early to late, while the buyer trades in price from high to low and time from early to late. If the price and time are the same, the transaction is completed in equal proportion. The transaction price is calculated based on a certain ratio of the buyer's and seller's declared prices.

[0005] In centralized trading such as call auction trading and rolling running-in, upper and lower limits can be set for the bidding price or clearing price to avoid market manipulation and vicious competition. However, in the actual trading process, the power generation costs per kilowatt-hour of different energy sources are different, and appropriate electricity prices are often not set for power plants of different energy sources, resulting in a large gap in the annual revenue per kilowatt-hour of different power plants. The market tends to favor power plants with strong revenue capabilities, while power plants with low revenue have operating difficulties, which is not conducive to the average distribution of various power generation energy sources, mobilizing the enthusiasm of power generation manufacturers. The electricity volume trading is greatly affected by natural disasters and has low risk resistance. At the same time, the electricity price of power trading should follow market laws and seasonal changes, and some extreme situations should be avoided from affecting the power trading system. Therefore, it is necessary to design an automated electricity price allocation algorithm that combines the revenue per kilowatt-hour of power plants and market laws, so that the revenue per kilowatt-hour of power plants participating in the trading is close throughout the year, ensuring the stability of the power trading market.

[0006] The present invention proposes a method for collaborative optimization of electricity volume and electricity price in the power trading market based on bilateral revenue equilibrium and LSTM prediction, which not only optimizes resource allocation and improves trading efficiency, but also reduces trading costs by minimizing the number of trading transactions, enhances the competitiveness of the power market, promotes the development of an environmentally friendly power industry, and at the same time provides long-term stable revenue guarantee for power plants, promoting the modernization and sustainable development of the power industry. Summary of the Invention

[0007] The purpose of the present invention is to provide a method for collaborative optimization of electricity volume and electricity price in the power trading market to solve the problems of disordered bilateral trading and low stability in the existing power trading system proposed in the above background technology.

[0008] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0009] The present invention proposes a method for collaborative optimization of electricity volume and electricity price in the power trading market, including the following steps:

[0010] S1. Obtain the power generation plan of power plants for the next month, and summarize the planned power generation volume and expected electricity price of all power plants; by issuing an announcement in advance, power plants participating in the trading are required to declare the power generation volume and electricity price for the next month, and summarize the power generation volume of all power plants;

[0011] S2. Calculate the previous profit and loss situations of all power plants; collect the previous actual power generation volume and electricity price of all power plants, and calculate the previous profit and loss situations of the power plants; among them, the profit and loss situation is the difference between the previous actual electricity price and the theoretical electricity price multiplied by the allocated power volume. If the result is positive, it is the previous profit, and if the result is negative, it is the previous loss;

[0012] S3. Obtain the running-in electricity quantity for participating in bilateral running-in in the next month from the planned power generation quantity of the power plant; obtain the distribution coefficient, and the running-in electricity quantity is the product of the distribution coefficient and the planned power generation quantity, and the value range of the distribution coefficient is 0 to 1;

[0013] S4. Based on the previous profit and loss situation of the power plant, calculate the running-in electricity price of the running-in electricity quantity through the bilateral running-in algorithm to ensure the balanced income of each power plant participating in the transaction;

[0014] S5. Use the time series prediction algorithm to predict the market electricity price in the next month to obtain the predicted electricity price; predict the electricity prices of all power plants participating in the transaction in the next month through previous data to ensure that the matching electricity prices in the next month conform to market laws and seasonal changes;

[0015] S6. Calculate the matching electricity price of the power plant in the next month based on the running-in electricity price and the predicted electricity price; obtain the matching electricity price in the next month by weighted summing the running-in electricity price and the predicted electricity price in a certain proportion;

[0016] S7. Based on the running-in electricity quantity of the power plant in the next month, perform the matching of the power plant and the user according to the distribution principle;

[0017] S8. Generate a trading plan based on the matching results of the power plant and the user; summarize and generate the power trading plan for the next month, send the plan to the relevant department for review, and execute it after approval.

[0018] Preferably, the S2 is specifically as follows:

[0019] The profit and loss situation is the difference between the previous actual electricity price and the theoretical electricity price multiplied by the allocated electricity quantity. If the result is positive, it is the previous income; if the result is negative, it is the previous loss. The calculation formula for the previous profit and loss situation of the power plant is:

[0020] Y=(P - P * )×Q

[0021] where Y is the previous income, P is the previous actual electricity price of the power plant, P * is the previous theoretical electricity price of the power plant, that is, the average electricity price of each power plant participating in the transaction previously; Q is the electricity quantity actually participated in the transaction by the power plant previously.

[0022] Furthermore, calculate the previous profit and loss situation of the power plant within this year. The calculation formula for the profit and loss situation of power plant x is as follows:

[0023]

[0024] where, Y x is the previous income of power plant x in the current year, Q i is the electricity quantity generated by power plant x in the i-th month, P i is the electricity price at which power plant x closed the deal in the i-th month, m is the month of the closed deal, Q j is the total electricity quantity of the j-th power plant in the closed deal months within this year, Pj is the actual electricity price of the j-th power plant in the months with completed transactions within this year, and n is the number of power plants participating in the transaction.

[0025] Preferably, the specific content of S3 is as follows:

[0026] Select the electricity quantity according to the distribution coefficient and enter the bilateral grinding algorithm. The purpose of the bilateral grinding algorithm is to give a suitable grinding electricity price for the electricity quantity participating in the grinding based on the planned electricity generation of the power plant in the next month, so as to balance the profit and loss of all power plants participating in the transaction as much as possible in the next month.

[0027] The grinding electricity quantity is the product of the distribution coefficient and the planned electricity generation. The calculation of the grinding electricity quantity is as follows:

[0028] Q x-set = M x × Q x-dec

[0029] where M x is the distribution coefficient assigned by the trading platform to power plant x, and its value range is 0 to 1; Q x-dec is the planned electricity generation of power plant x in the next month, and Q x-set is the grinding electricity quantity of power plant x used to balance the profit and loss and participate in the bilateral grinding algorithm.

[0030] Preferably, the specific content of S4 is as follows:

[0031] Based on the profit and loss balance of the power plant, the power plant transaction in the next month satisfies:

[0032] Y x + Y x-next = 0

[0033] where Y x is the profit and loss situation of power plant x in the cumulative transaction months within this year, and Y x-next is the expected profit and loss situation of power plant x in the next month's transaction;

[0034] The electricity quantity entering the bilateral grinding algorithm is determined according to the grinding electricity price, and the electricity quantity not entering the bilateral grinding algorithm is determined according to the method of centralized bidding. The expected electricity transaction amount of power plant x in the next month is:

[0035] T x = P x-set × Q x-set + P x-cen × (1 - M x ) × Q x-dec

[0036] The calculation of the expected profit and loss situation of power plant x in the next month's transaction is as follows:

[0037] Y x-next = T x-P x-dec ×Q x-dec

[0038] That is:

[0039] Y x-next = P x-set ×Q x-set + P x-cen ×(1 - M x )×Q x-dec - P x-dec ×Q x-dec

[0040] Wherein, T x is the expected electricity trading amount of power plant x next month, P x-set is the negotiated electricity price obtained based on the bilateral negotiation algorithm, P x-cen is the electricity price determined through centralized bidding; P x-dec is the expected electricity price of power plant x next month;

[0041] Therefore, the negotiated electricity price given by power plant x after participating in bilateral negotiation calculation next month is obtained:

[0042]

[0043] Wherein, P x-set is the negotiated electricity price obtained based on the bilateral negotiation algorithm.

[0044] Preferably, the S5 is specifically as follows:

[0045] Use the pre-trained LSTM model to predict the market electricity price next month. The purpose of time series prediction calculation of electricity price is to predict the market electricity price next month based on the market electricity price information of the power plant in the previous few months, so that the predicted electricity price conforms to market rules and seasonal changes, and use the pre-trained LSTM model for prediction;

[0046] The prediction process of the LSTM model is specifically as follows:

[0047] Model training and fitting. The first LSTM module is used to receive the transaction electricity price data of the previous m months, and through the operations of the internal forget gate, input gate and output gate, output the predicted value of the electricity price for the (m + 1)-th month; in each subsequent LSTM module, each module receives the predicted value and actual value of the previous module, combines its own operations, and outputs the predicted value of the next month, and so on, until the prediction of all future months is completed;

[0048] Future electricity price prediction. After completing the fitting of the previous m months, use the fitted data to drive the LSTM module to directly predict the market electricity price for the next 12 - m months.

[0049] Furthermore, the initial input of the LSTM model is:

[0050]

[0051] Among them, P i is the actual market electricity price in the i-th month, and μ m is the average electricity price over a sliding window of m months, and σ m is the standard deviation of the corresponding period;

[0052] The sliding window is constructed as:

[0053]

[0054] Among them, X k is the input feature vector, that is, the electricity prices for m consecutive months, and Y k is the predicted target value, and P x-pre is the predicted electricity price of power plant x; the window step size is fixed at 1 month. When the continuous missing value is less than or equal to 2 months, it is filled by cubic spline interpolation;

[0055] The predicted market electricity price for the next month is:

[0056] P x-pre = P x-pre × σ m + μ m

[0057] Among them, P x-pre is the predicted electricity price of power plant x.

[0058] Furthermore, the network structure of the LSTM module in the LSTM model includes an input layer, two LSTM layers, and a fully connected output layer;

[0059] The number of nodes in the input layer is m, and there is no activation function and Dropout rate setting; the first LSTM layer has 64 nodes, the activation function uses tanh, and the Dropout rate is set to 0.2; the second LSTM layer has 32 nodes, the activation function uses tanh, and the Dropout rate is set to 0.2; the fully connected output layer has 1 node, the activation function uses linear, and there is no Dropout rate setting

[0060] The LSTM layer structure of the LSTM model is:

[0061]

[0062] Among them, ⊙ is the Hadamard product, and x t represents the input at the t-th time step; W f is the weight matrix of the forget gate, which controls the retention degree of historical information, and W i is the weight matrix of the input gate, which controls the input of new information, and W cis the weight matrix of the candidate cell state, generating the temporary state value, W o is the weight matrix of the output gate, controlling the amount of information in the final output; b f ,b i ,b c ,b o The bias parameters corresponding to each gate, acting together with the weight matrix to adjust the output of the activation function; f t ,i t ,o t is the gating signal, f t determines how much of the previous cell state C to retain t-1 ,i t determines how much of the current candidate state to accept o t determines the current output h t ,h t-1 is the previous hidden state, carrying historical information; the tanh function compresses the value to [-1, 1] to enhance the non-linear expression ability.

[0063] Preferably, the S6 is specifically as follows:

[0064] The actual electricity price matched next month is:

[0065] P x-mat = α × P x-set + β × P x-pre

[0066] where, P x-mat is the matched electricity price; α and β are user-defined weight parameters, satisfying that the sum of α and β is always 1, P x-pre is the predicted electricity price of power plant x.

[0067] Preferably, the S7 is specifically as follows:

[0068] The allocation principle follows the principle of the minimum number of transaction pens, including the matching strategy of high-power users and small power plants and the strategy of one power plant matching multiple low-power users;

[0069] Adopting the matching strategy of high-power users and small power plants, for user x it is shown as:

[0070]

[0071] where, Q x-user is the planned electricity consumption of user x next month, Q i-gen is the planned electricity production of power plant i next month, and G is the number of power plants required to match the planned electricity consumption of user x next month;

[0072] Adopting the strategy of one power plant matching multiple low-power users, for power plant x it is shown as:

[0073]

[0074] Among them, Q x-gen is the planned power generation quantity of power plant x in the next month, and Q i-user is the planned power consumption quantity of user i in the next month. U is the number of users required to match the planned power generation quantity of power plant x in the next month.

[0075] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0076] In the method of the present invention, by providing a power trading system with stable operation and balanced revenue, the problems of disordered bilateral trading and low stability in the existing power trading system are effectively solved. By obtaining the power generation plan and electricity price of the power plant in advance, calculating the previous profit and loss of the power plant, introducing a distribution coefficient to reasonably allocate the power quantity of the power plant to participate in bilateral coordination, and modeling the electricity price fluctuation in combination with the market situation. The present invention not only optimizes the resource allocation, improves the trading efficiency, but also balances the revenue per unit of electricity of each large power plant through the user bilateral matching algorithm model, ensuring the balanced revenue of each power plant. In addition, the present invention reduces the transaction cost by minimizing the number of transactions, enhances the competitiveness of the power market, promotes the development of the environment-friendly power industry. At the same time, it improves the market transparency, provides effective support for policy making and market supervision, provides long-term stable revenue guarantee for the power plant, and promotes the modernization and sustainable development of the power industry. The present invention provides a practical optimization scheme for the power trading system, effectively improving the resource allocation efficiency and trading stability of the power market, and making a substantial contribution to the economic and sustainable development of the power industry. Brief Description of the Drawings

[0077] Figure 1 is a flow chart of the method for collaborative optimization of power quantity and electricity price in the power trading market of the present invention;

[0078] Figure 2 is a schematic structural diagram of the power trading system of the present invention;

[0079] Figure 3 is a schematic diagram of the generation of the matching electricity price in the next month of the present invention;

[0080] Figure 4 is a schematic diagram of market electricity price prediction based on the LSTM model of the present invention. Detailed Embodiments

[0081] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0082] Embodiment 1:

[0083] Referring to Figure 1 , a method for collaborative optimization of electricity quantity and price in the electricity trading market based on bilateral revenue equilibrium and LSTM prediction is implemented through an electricity trading system. The structure of the electricity trading system is shown in Figure 2 . Figure 2 It clearly shows all links in the calculation of the power plant's revenue in the electricity trading system, including the formulation of the power generation plan, the summary of electricity price information, the calculation of potential revenue, and the evaluation of profits and losses, providing a scientific basis for the fairness and efficiency of electricity trading.

[0084] The method includes the following steps:

[0085] Step S1, obtaining the power generation plan of the power plant for the next month.

[0086] The electricity trading system issues an announcement in advance through a centralized platform, inviting all power plants participating in the transaction to declare the electricity generation quantity (Q) and electricity price (P) for the next month. This process requires the power plant to submit the planned electricity generation quantity and the expected electricity price according to its own power generation capacity and market forecast. The system will collect these data and summarize them to provide basic data for subsequent electricity trading and matching. The key to this step is to ensure the transparency and timeliness of information so that all market participants can make decisions based on the latest market information.

[0087] Step S2, calculating the previous profit and loss of the power plant.

[0088] Collect the previous actual electricity generation quantity Q and electricity price P of all power plants, and calculate the previous profit and loss situation of the power plant. Among them, the profit and loss situation is the difference between the previous actual electricity price and the theoretical electricity price multiplied by the allocated electricity quantity. If the result is positive, it is the previous profit; if the result is negative, it is the previous loss. The calculation formula for the previous profit and loss situation of the power plant is:

[0089] Y = (P - P * ) × Q (1)

[0090] Where Y is the previous profit. If Y is greater than 0, it means that the power plant had a profit compared to other power plants previously; if Y is less than 0, it means that the power plant had a loss compared to other power plants previously. Where P is the previous actual electricity price of the power plant, P *is the previous theoretical electricity price, i.e., the average electricity price of each power plant participating in the previous transactions, and Q is the electricity volume actually participated in the transactions by the previous power plants.

[0091] The proposed trading system is mainly oriented to the transactions within the current year to ensure the balance of the electricity price revenue of each power plant throughout the year. For the previous profit and loss situation of the power plant, the electricity volume and electricity price in the traded months within the current year should be considered. Therefore, the formula for calculating the actual electricity price of the previous power plant is as follows. Taking power plant x as an example:

[0092]

[0093] where P x is the average monthly electricity price of power plant x that has been traded cumulatively in the current year, Q i is the electricity volume generated by power plant x in the i-th month, P i is the electricity price at which power plant x was traded in the i-th month, and m is the number of traded months.

[0094] For the theoretical electricity price P*, the electricity volume generated and the electricity price information of all power plants participating in the transactions in the traded months within the current year are summarized. The total transaction amount is calculated uniformly and then divided by the total transaction electricity volume. The specific theoretical electricity price is:

[0095]

[0096] where P* is the theoretical electricity price in the traded months within the current year, n is the number of power plants participating in the transactions, Q j is the total electricity volume of the j-th power plant in the traded months within the current year, and P j is the actual electricity price of the j-th power plant in the traded months within the current year.

[0097] The total formula for the profit and loss situation of power plant x can be written as:

[0098]

[0099] Step S3, obtain the distribution coefficient.

[0100] Obtain a part of the planned power generation provided by the power plant in step S1 for participating in the bilateral run-in in the next month, that is, the run-in electricity volume is the product of the distribution coefficient and the planned power generation. The value range of the distribution coefficient is 0 to 1. For the power plant, not all the produced power resources enter the bilateral run-in algorithm for profit and loss balance, but a certain proportion of the electricity volume is selected according to a certain distribution coefficient to enter the bilateral run-in algorithm, and the electricity price of those not entering the bilateral run-in algorithm is determined by the centralized bidding method. Taking power plant x as an example, the electricity volume input into the bilateral run-in algorithm is:

[0101] Q x-set = M x ×Q x-dec (5)

[0102] Among them, M x is the allocation coefficient assigned by the trading platform to power plant x, and its value range is 0 to 1. Q x-dec is the declared power generation of the power plant for the next month, and Q x-set is the electricity quantity used by the power plant for bilateral coordination algorithm to balance profits and losses in the next month.

[0103] The estimated electricity trading amount of power plant x for the next month is:

[0104] T x = P x-set ×Q x-set + P x-cen ×(1 - M x )×Q x-dec (6)

[0105] Among them, T x is the estimated electricity trading amount of power plant x for the next month, P x-set is the electricity price given by the bilateral coordination algorithm, and P x-cen is the electricity price given by the centralized bidding.

[0106] Step S4, calculate the electricity price through bilateral coordination.

[0107] According to Step S2, the previous profit and loss situations of each power plant can be obtained, and according to Step S3, the electricity quantity participating in bilateral coordination in the next month can be obtained. This step calculates the electricity prices of all power plants participating in the transaction for the next month through the previous data to ensure the balanced profits of each power plant participating in the transaction. Therefore, the purpose of the bilateral coordination algorithm is to give a suitable coordination electricity price for the electricity quantity participating in the coordination according to the planned power generation of the power plant for the next month, so as to balance the profit and loss situations of all power plants participating in the transaction as much as possible in the next month. According to Step S2, it is known the total profit and loss situations of the power plant in the traded months within this year, and according to Step S3, it is known the electricity quantity planned to be used for the bilateral coordination algorithm by the power plant in the next month. Taking power plant x as an example, the transaction in the next month should satisfy:

[0108] Y x + Y x-next = 0 (7)

[0109] Among them, Y x is the profit and loss situation of power plant x in the accumulated traded months within this year, and Y x-next is the expected profit and loss situation of power plant x in the next month's transaction.

[0110] For power plant x, combining the declared electricity quantity, declared electricity price, and the next month's allocation coefficient, bilateral coordination electricity price, and centralized bidding electricity price given by the trading platform, the expected profit and loss of the next month's transaction can be obtained as:

[0111] Y x-next = T x - Px-dec ×Q x-dec (8)

[0112] where P x-dec is the electricity price declared by Power Plant x for the next month, and T x is the expected transaction amount of Power Plant x for the next month. Substitute the formula (6) in step S3 to expand the expected transaction amount for the next month, and we get:

[0113] Y x-next = P x-set ×Q x-set + P x-cen ×(1 - M x )×Q x-dec - P x-dec ×Q x-dec (9)

[0115] where Y x-next is the profit and loss situation of the expected transaction of Power Plant x for the next month, and should meet the conditions of formula (7) in step S4. Therefore, the grinding-in electricity price given after Power Plant x participates in the bilateral grinding-in calculation for the next month is obtained:

[0116]

[0117] Step S5, perform time series prediction to calculate the predicted electricity price for the next month.

[0118] According to the market electricity price information of the power plant in the previous few months, predict the market electricity price for the next month, so that the predicted electricity price conforms to the market law and seasonal changes, and use the pre-trained LSTM model for prediction.

[0119] The structure of the LSTM model is shown in Figure 4 , and the specific work content is as follows:

[0120] Data input: Use the market transaction electricity prices of the previous m months as the initial input data. These data are the basis for model training and help the LSTM network learn the fluctuation law of historical prices.

[0121] Model training and fitting: The first LSTM module is used to receive the transaction electricity price data of the previous m months. After operations of the internal forget gate, input gate, and output gate, it outputs the predicted electricity price value for the (m + 1)-th month; in each subsequent LSTM module, each module receives the predicted value and actual value of the previous module, combines its own operations, and outputs the predicted value for the next month, and so on until the prediction of all future months is completed.

[0122] Future electricity price prediction: After completing the fitting of the previous m months, use the fitted data to drive the LSTM module to directly predict the market electricity prices for the next 12 - m months, providing decision-making support for market participants.

[0123] The result is output, and the predicted value of the market electricity price for the next 12 months is finally output, including the prediction results for both the traded and untraded months, helping market participants better understand the future trend of electricity prices.

[0124] According to step S2, the total profit and loss situation of the power plant in the traded months of this year can be known. Taking power plant x as an example, the initial input of the LSTM model is:

[0125]

[0126] Among them, P i is the actual market electricity price in the i-th month, μ m is the average electricity price for the sliding m months, and σ m is the standard deviation for the corresponding period. Therefore, the sliding window is constructed as:

[0127]

[0128] Among them, X k is the input feature vector (electricity prices for consecutive m months), Y k is the predicted target value, and P x-pre is the predicted electricity price of power plant x. The window step size is fixed at 1 month. When the consecutive missing months are less than or equal to 2 months, cubic spline interpolation is used for filling.

[0129] The structure of the LSTM cell of the prediction model used is:

[0130]

[0131] Among them, ⊙ is the Hadamard product, and x t represents the input at the t-th time step; W f is the weight matrix of the forget gate, controlling the degree of retention of historical information, W i is the weight matrix of the input gate, controlling the input of new information, W c is the weight matrix of the candidate cell state, generating a temporary state value, W o is the weight matrix of the output gate, controlling the amount of information in the final output; b f , b i , b c , b o correspond to the bias parameters of each gate, and together with the weight matrix, they adjust the output of the activation function; f t , i t , o t are the gating signals, and f t determines how much of the previous cell state C t-1 is retained, and i t determines how much of the current candidate state is accepted ot Determine the output h at the current moment t , where h t-1 is the hidden state at the previous moment, carrying historical information; the tanh function compresses the value to [-1, 1] to enhance the non-linear expression ability.

[0132] The LSTM network used in the present invention includes an input layer, two LSTM layers, and a fully connected output layer. The number of nodes in the input layer is m, without activation function and Dropout rate settings; the first LSTM layer has 64 nodes, the activation function is tanh, and the Dropout rate is set to 0.2; the number of nodes in the second LSTM layer is 32, also using tanh as the activation function, and the Dropout rate is also 0.2; the fully connected output layer has 1 node, the activation function is linear, and there is no Dropout rate setting.

[0133] Therefore, the predicted electricity price in the market next month is:

[0134] Px x-pre = Px x-pre × σ m + μ m (14)

[0135] Step S6, calculate the matching electricity price of the power plant next month.

[0136] According to Step S4, the running-in electricity price of the power plant next month can be known, and according to Step S5, the predicted electricity price of the power plant next month can be known. Taking power plant x as an example, the actual matching electricity price next month is:

[0137] P x-mat = α × P x-set + β × P x-pre (15)

[0138] Among them, α and β are user-defined weight parameters, which can be adjusted according to the actual situation, and the sum of α and β is always 1.

[0139] By adjusting α and β, the matching electricity price given next month can ensure the profit and loss balance among the power plants participating in the transaction, take into account market fluctuations and seasonal changes, ensure the scientific objectivity of the given electricity price, and avoid the impact of extreme values of a single parameter on the global transaction.

[0140] For the calculation of the matching electricity price by the power trading system, please refer to Figure 3 , and the specific work content is as follows:

[0141] 1) Collection of the declared electricity quantity in the current month. The declared electricity quantity 1 in the current month is declared by market entities according to market rules and their own electricity consumption needs or power generation capabilities in the current month, and this data is collected as the basis for subsequent prediction.

[0142] 2) Collection of past electricity prices and past electricity quantities: Through the historical transaction records of the market trading system, obtain the electricity price and electricity quantity data for past months. These data can reflect the trading situation and price fluctuation trends in the market over a past period, providing data support for the training and calibration of the prediction model.

[0143] 3) Establishment and calculation of the market prediction model: Use time series analysis to establish a market prediction model, and take the declared electricity quantity for the current month, past electricity prices, and past electricity quantities as input variables for model training and optimization. After obtaining a relatively accurate market prediction model, calculate the market predicted electricity price for the current month through this model.

[0144] 4) Implementation and calculation of the bilateral matching algorithm: The bilateral matching algorithm can be designed based on mechanisms such as entity negotiation and market supply and demand simulation. By simulating the negotiation and matching behaviors of the buyer and seller during the trading process, fully considering factors such as market supply and demand relationships and entity trading preferences, calculate the bilateral matching electricity price for the current month.

[0145] 5) Weighted calculation to finally confirm the electricity price: According to the trust or importance degree of market participants in the market predicted electricity price and the bilateral matching electricity price, determine the corresponding weighting coefficients α and β. Through this weighted calculation method, the finally confirmed electricity price for the current month can comprehensively reflect the market prediction trend and the actual trading matching result to a certain extent, providing a more reasonable and reliable electricity price reference basis for market entities.

[0146] Step S7, the allocation algorithm matches power plants and users.

[0147] The allocation algorithm matches users. According to the matching electricity price for the next month calculated in step S4, follow the principle of matching large customers with small power plants and minimizing the number of allocations for power plants to perform the mutual matching of power plants and users. The allocation algorithm performs the matching according to the planned power generation volume of the power plant for the next month and the planned electricity consumption volume of the user for the next month. To ensure the consistency of the transaction, the minimum number of transaction pens should be met during the transaction between both parties. Therefore, select the matching strategy of high electricity consumption customers and small power plants. For user x, it is expressed as:

[0148]

[0149] Among them, Q x-user is the planned electricity consumption volume of user x for the next month, Q i-gen is the planned power generation volume of power plant i for the next month, and G is the number of power plants required to match the planned electricity consumption volume of user x for the next month.

[0150] Most of the users participating in bilateral transactions are high electricity consumption users, but there are still some low electricity consumption users participating in the transaction. Following the principle of the minimum number of transaction pens, in some cases, one power plant needs to match multiple low electricity consumption users. For power plant x, it is expressed as:

[0151]

[0152] Among them, U is the number of users required to match the planned power generation of power plant x in the next month.

[0153] Step S8, generate a trading plan. The system will generate a power trading plan for the next month based on the calculation and matching results in the previous steps. This plan will include key information such as the matching details of each power plant and user, the trading power volume, and the electricity price. The generated trading plan will be sent to the relevant departments for review to ensure that all transactions comply with regulations and market rules.

[0154] The specific work content of the power trading system is as follows:

[0155] (1) Determination of the power generation plan of the power plant for the next month. On the 25th of each month, power plant 1 will lock in its power generation plan for the next month, which is the basis for the power trading system to calculate the theoretical value of the monthly revenue.

[0156] (2) Aggregation of user electricity price information. The system collects the electricity price information of all users and calculates the average electricity price P (theoretical) for the next month, which will be used to guide the power generation plan and electricity price setting of the power plant.

[0157] (3) Calculation of the potential revenue of the power plant for the current month. The power generation plan of power plant 1 is combined with the distribution coefficient MI, and the power volume allocated for running-in is calculated through the power trading system, which will be used to estimate the potential revenue of the power plant for the current month.

[0158] (4) Calculation of the profit and loss of the power plant for the previous month. The system will calculate the profit and loss situation of power plant 1 for the previous month, that is, the profit and loss Y1 of the power plant for the previous month. This calculation is based on the actual power generation and power sales of the power plant for the previous month.

[0159] (5) Matching of the potential revenue of the power plant with users. The potential revenue T1 of power plant 1 is matched with the electricity consumption demands of its users (user 1 and user 2). The system will allocate the power volume according to the power generation plan of the power plant and the electricity consumption demands of the users.

[0160] (6) Generation of the allocation result for the current month. Finally, the system will generate the power volume allocation result for the current month to ensure that the power generation plan of the power plant matches the electricity consumption demands of the users, while taking into account the potential revenue of the power plant and the profit and loss situation for the previous month.

[0161] Experimental verification:

[0162] The present invention selects an internal private dataset of an enterprise and selects different time series prediction models to compare the results. The selected models are: ARIMA, Prophet, and random forest. The experimental results of the LSTM model adopted by the present invention and other models are shown in Table 1. The present invention selects the mean absolute percentage error MAPE (Mean Absolute Percentage Error) and the relative standard deviation RSD (Relative Standard Deviation) for performance comparison.

[0163] Table 1 Comparison between the present invention and other time series prediction models

[0164]

[0165] As can be seen from Table 1, according to the MAPE and RSD performance comparisons in Table 1, compared with the best baseline, the LSTM model selected by the present invention has a significant reduction in errors, showing an average performance gap of 3%. It can be seen that the method of the present invention is superior to the previous methods. Compared with other classical deep learning methods, the method used in the present invention performs well and has a significant improvement in various performance indicators.

[0166] As described above, it is only used to help understand the method of the present invention and its core essence, but the protection scope of the present invention is not limited thereto. For those of ordinary skill in the art in the technical field of the present invention, any equivalent replacement or change made within the technical scope disclosed by the present invention according to the technical solution and inventive concept of the present invention should be covered within the protection scope of the present invention. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for collaborative optimization of electricity quantity and price in the electricity trading market, characterized in that, It includes the following steps: S1. Obtain the power generation plan of the power plants for the next month, and summarize the planned power generation volume and expected electricity price of all power plants; S2. Calculate the previous profit and loss situation of all power plants; S3. Obtain the matching power volume for participating in the bilateral matching in the next month from the planned power generation volume of the power plants; S4. Based on the previous profit and loss situation of the power plants, calculate the matching electricity price of the matching power volume through the bilateral matching algorithm to ensure the balanced income of each power plant participating in the transaction; S5. Use the time series prediction algorithm to predict the market electricity price for the next month to obtain the predicted electricity price; S6. Calculate the matching electricity price of the power plants for the next month based on the matching electricity price and the predicted electricity price; S7. Based on the matching power volume of the power plants for the next month, perform the matching of power plants and users according to the allocation principle; S8. Generate a trading plan based on the matching results of power plants and users.

2. The method according to claim 1, wherein The specific content of S2 is as follows: The profit and loss situation is the difference between the previous actual electricity price and the theoretical electricity price multiplied by the allocated power volume. If the result is positive, it is the previous income; if the result is negative, it is the previous loss. The calculation formula for the previous profit and loss situation of the power plants is: Y = (P - P * ) × Q Among them, Y is the previous revenue, P is the previous actual electricity price of the power plant, and P * is the previous theoretical electricity price of the power plant, that is, the average electricity price of each power plant participating in the transaction previously; Q is the electricity volume actually participated in the transaction by the previous power plant.

3. The method according to claim 2, wherein Calculate the previous profit and loss situation of the power plants within this year. The calculation formula for the profit and loss situation of power plant x is as follows: Among them, Y x is the previous revenue of power plant x in that year, Q i is the electricity generated by power plant x in the i-th month, P i is the electricity price at which power plant x closes a deal in the i-th month, m is the number of months with deals closed, Q j is the total electricity volume of the j-th power plant in the months with deals closed within this year, P j is the actual electricity price of the j-th power plant in the months with deals closed within this year, and n is the number of power plants participating in the transaction.

4. The method according to claim 3, wherein The specific content of S3 is as follows: Select the power volume according to the allocation coefficient and enter it into the bilateral matching algorithm. The matching power volume is the product of the allocation coefficient and the planned power generation volume. The calculation of the matching power volume is as follows: Q x-set = M x × Q x-dec Among them, M x is the allocation coefficient assigned by the trading platform to power plant x, and its value range is 0 to 1; Q x-dec is the planned power generation of power plant x for the next month, and Q x-set is the running-in power for power plant x to balance the profit and loss and for the bilateral running-in algorithm.

5. The method according to claim 4, characterized in that The specific content of S4 is as follows: Based on the balanced income of the power plants, the power plant transactions in the next month satisfy: Y x +Y x-next =0 Among them, Y x is the profit and loss situation of the cumulative trading months of power plant x in this year, and Y x-next is the expected profit and loss situation of the trading of power plant x in the next month; The power volume entering the bilateral matching algorithm is priced according to the matching electricity price, and the power volume not entering the bilateral matching algorithm is priced according to the method of centralized bidding. The expected power trading amount of power plant x for the next month is: T x = P x-set × Q x-set + P x-cen × (1 - M x ) × Q x-dec The calculation of the profit and loss situation of the expected transaction of power plant x for the next month is as follows: Y x-next = T x - P x-dec × Q x-dec That is: Y x-next = P x-set × Q x-set + P x-cen × (1 - M x ) × Q x-dec - P x-dec × Q x-dec where T x is the expected electricity trading amount of power plant x next month, P x-set is the negotiated electricity price obtained based on the bilateral negotiation algorithm, P x-cen is the electricity price determined through centralized bidding; P x-dec is the expected electricity price of power plant x next month; Therefore, the matching electricity price given by power plant x for participating in the bilateral matching calculation for the next month is: Among them, P x-set is the running-in electricity price obtained based on the bilateral running-in algorithm.

6. The method according to claim 5, wherein The specific content of S5 is as follows: Use the pre-trained LSTM model to predict the market electricity price for the next month. The prediction process of the LSTM model is as follows: Model training and fitting. The first LSTM module is used to receive the transaction electricity price data of the previous m months. After the operations of the internal forget gate, input gate and output gate, it outputs the predicted electricity price value for the (m + 1)-th month; in each subsequent LSTM module, each module receives the predicted value and the actual value of the previous module, combines its own operations, and outputs the predicted value for the next month, and so on until the prediction of all future months is completed; Future electricity price prediction. After completing the fitting of the previous m months, use the fitted data to drive the LSTM module to directly predict the market electricity price for the next 12 - m months.

7. The method according to claim 6, wherein The initial input of the LSTM model is: Among them, P i is the actual market electricity price in the i-th month, μ m is the average electricity price over the sliding m months, and σ m is the standard deviation for the corresponding period; Construct the sliding window as: Among them, X k is the input feature vector, i.e., the electricity price for consecutive m months, and Y k is the predicted target value, and P x-pre is the predicted electricity price of power plant x; the window step size is fixed at 1 month, and when the consecutive missing values are less than or equal to 2 months, cubic spline interpolation is used to fill them; The predicted market electricity price for the next month is: P x-pre = P x-pre × σ m + μ m Among them, P x-pre is the predicted electricity price of power plant x.

8. The method according to claim 6, wherein The network structure of the LSTM module in the LSTM model includes an input layer, two LSTM layers and a fully connected output layer; The number of nodes in the input layer is m, without activation function and Dropout rate setting; the first LSTM layer has 64 nodes, the activation function uses tanh, and the Dropout rate is set to 0.2; the second LSTM layer has 32 nodes, the activation function uses tanh, and the Dropout rate is set to 0.2; the fully connected output layer has 1 node, the activation function uses linear, and there is no Dropout rate setting The LSTM layer structure of the LSTM model is as follows: where ⊙ is the Hadamard product, and x t represents the input at the t-th time step; W f is the weight matrix of the forget gate, W i is the weight matrix of the input gate, W c is the weight matrix of the candidate state, W o is the weight matrix of the output gate; b f , b i , b c , b o correspond to the bias parameters of each gate; f t , i t , o t are the gating signals, f t determines how much of the previous state C t-1 should be retained, i t determines how much of the current candidate state should be accepted, and o t determines the output h t at the current time step, and h t-1 is the hidden state at the previous time step; the tanh function compresses the values to [-1, 1].

9. The method according to any one of claims 6 - 8, characterized in that The specific content of S6 is as follows: The actual electricity price matched next month is: P x-mat = α × P x-set + β × P x-pre Among them, P x-mat is the matching electricity price; α and β are user-defined weight parameters, satisfying that the sum of ɑ and β is always 1, and P x-pre is the predicted electricity price of power plant x.

10. The method according to claim 1, characterized in that, The specific content of S7 is as follows: The allocation principle follows the principle of the minimum number of transaction pens, including the matching strategy between high-power consumption customers and small power plants and the strategy of one power plant matching multiple low-power consumption users; Adopting the matching strategy between high-power consumption customers and small power plants, for user x, it is manifested as: Among them, Q x-user is the planned electricity consumption of user x next month, and Q i-gen is the planned electricity production of power plant i next month. G is the number of power plants required to match the planned electricity consumption of user x next month; Adopting the strategy of one power plant matching multiple low-power consumption users, for power plant x, it is manifested as: Among them, Q x-gen is the planned power generation of power plant x in the next month, Q i-user is the planned power consumption of user i in the next month, and U is the number of users required to match the planned power generation of power plant x in the next month.

Citation Information

Cited By

  • Power transaction optimization method based on multi-dimensional features and intelligent prediction

    CN121921025A