Virtual power plant day-ahead transaction two-stage optimization scheduling method and system, equipment and medium

Through the two-stage optimization scheduling method, combined with the first-stage model of maximizing profits and the second-stage dynamic adjustment of deep reinforcement learning, the challenge of virtual power plants in the trading market recently was solved, and efficient resource management and economic benefits were achieved.

CN119721659AInactive Publication Date: 2025-03-28BEIJING TENGINEER AIOT TECH CO LTD

Patent Information

Application Number
CN202510234514.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

How to formulate reasonable scheduling strategies in the trading market recently to maximize the economic benefits of virtual power plants, especially under the challenges brought by the intermittent and volatility of renewable energy.

Method used

The two-stage optimization scheduling method is adopted. The first stage is to build an optimized scheduling model that maximizes the profits of virtual power plants. The second stage is to dynamically adjust the charging and discharging strategies of the energy storage system and optimize the distribution of electric vehicle loads using deep reinforcement learning algorithms.

Benefits of technology

It realizes efficient scheduling of virtual power plant resources, improves the utilization efficiency of renewable energy, maximizes the economic benefits of virtual power plants, promotes the sustainable development of green energy, and ensures the reliability and adaptability of virtual power plants under different operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721659A_ABST
    Figure CN119721659A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual power plant day-ahead transaction two-stage optimization scheduling method and system, equipment and a medium, and the method comprises the steps: firstly, predicting and formulating the day-ahead electricity purchasing amount and the day-ahead electricity selling amount according to the market electricity price and the load, and fully utilizing the fluctuation of the market electricity price to optimize the electricity purchasing time point and the electricity selling time point; according to the method, profit maximization of the virtual power plant in the day-ahead transaction market is realized, then the charge and discharge strategy of the energy storage system is dynamically adjusted through deep reinforcement learning, the distribution of the electric vehicle load is optimized, the power grid load fluctuation is further balanced, and the operation cost minimization of the virtual power plant is realized. According to the two-stage optimization strategy, a day-ahead duration power transaction strategy and real-time resource scheduling optimization are combined, collaborative management of various resources such as wind power, photovoltaic and energy storage systems and electric vehicles is achieved, and efficient scheduling of virtual power plant resources can be achieved; and the utilization efficiency of renewable energy sources can be improved, and the economic benefits of the virtual power plant are maximized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual power plant scheduling optimization, and in particular, to a two-stage optimization scheduling method and system for day-ahead transactions of a virtual power plant, electronic equipment, and a computer-readable storage medium. Background Art

[0002] With the growth of global energy demand and the increasing pressure of environmental protection, the development and utilization of clean energy has become increasingly important. Renewable energy such as wind power and solar energy, as low-carbon clean energy, has gradually become an important part of the power system. However, these renewable energy sources are intermittent and volatile, which brings challenges to the stability of the power grid and the optimal scheduling of the power system. In order to cope with these problems, virtual power plants, as an emerging power scheduling mode, can achieve optimal scheduling and efficient utilization of power resources by integrating distributed energy resources such as wind power, solar power, battery energy storage systems and electric vehicle charging facilities, thereby improving the flexibility, reliability and economy of the power system. With the development of the power market, the trading model of virtual power plants has also evolved. How to formulate reasonable scheduling strategies in the day-ahead trading market and maximize economic benefits has become a key issue that needs to be solved urgently. Summary of the invention

[0003] The present invention provides a two-stage optimization scheduling method and system for day-ahead transactions of a virtual power plant, an electronic device, and a computer-readable storage medium, which realizes the coordinated management of multiple resources such as wind power, photovoltaics, energy storage systems, and electric vehicles. It can not only realize the efficient scheduling of virtual power plant resources, but also improve the utilization efficiency of renewable energy and maximize the economic benefits of virtual power plants, thereby promoting the sustainable development of green energy and ensuring the reliability and adaptability of virtual power plants under different operating conditions.

[0004] According to one aspect of the present invention, a two-stage optimization scheduling method for day-ahead trading of a virtual power plant is provided, comprising the following contents: The first-stage optimization dispatch model is constructed with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, the second-stage optimization dispatch model is constructed with the goal of minimizing the operating cost of the virtual power plant, and the operation constraint model of various dispatch resources of the virtual power plant is constructed; Optimize and solve the first-stage optimization scheduling model to obtain the first-stage decision variables; The decision variables of the first stage are used as the input of the second stage optimization scheduling model. The deep reinforcement learning algorithm is used to optimize and solve the second stage optimization scheduling model to obtain the decision variables of the second stage.

[0005] Furthermore, the objective function of the first-stage optimization scheduling model is: in, f obj1 represents the objective function, T represents the total number of time steps, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the time period.

[0006] Furthermore, the objective function of the second-stage optimization scheduling model is: in, f obj2 represents the objective function, T represents the total number of time steps, It represents the change of electric quantity caused by charging and discharging of energy storage system in time period t, λ represents the cost parameter of the energy storage system, represents the charging power of the energy storage system during period t, It represents the discharge power of the energy storage system in the period t. At any time, , represents the unschedulable load, represents the charging power of the electric vehicle during period t, represents the photovoltaic power generation in period t, represents the wind power generation in period t, Indicates the time interval, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the time period.

[0007] Furthermore, the operation constraint models of various dispatching resources of the virtual power plant include: Renewable Energy Operation Constraint Model: ,in, and Respectively expressed in t The predicted output power of photovoltaic power generation and wind power generation in each period, and They represent the minimum output power of photovoltaic power generation and the minimum output power of wind power generation, respectively. is a binary variable, which indicates the on / off state of wind power, with a value of 1 for on and a value of 0 for off; Energy storage system operation constraint model: in, Indicates the rated power of the energy storage system, is a binary variable, which means t The energy storage system is either charging or discharging during the time period, but not both operations at the same time. A value of 0 indicates that the energy storage system is charging, and a value of 1 indicates that the energy storage system is discharging. represents the energy level of the energy storage system during period t, represents the energy level of the energy storage system in the t-1 period, Represents the charging and discharging efficiency of the energy storage system, Indicates the rated energy level of the energy storage system; Day-ahead market transaction constraint model: in, and They represent the upper limits of electricity that a virtual power plant can sell and purchase from the day-ahead market, It is a binary variable, which indicates whether the virtual power plant sells or purchases electricity from the day-ahead trading market. A value of 1 indicates that the virtual power plant sells electricity from the day-ahead trading market, and a value of 0 indicates that the virtual power plant purchases electricity from the day-ahead trading market. Active power operation balance constraint model: .

[0008] Furthermore, the energy storage system operation constraint model also includes: in, Represents the initial energy level of the energy storage system.

[0009] Furthermore, the process of optimizing and solving the second-stage optimization scheduling model using the deep reinforcement learning algorithm includes the following contents: Establish the state space and action space of the agent, where the state space can be expressed as: , the action space can be expressed as: , represents the photovoltaic power generation at time t, represents the wind power generation at time t, represents the energy level of the energy storage system at time t, and They represent the electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, represents the charging power of the energy storage system during period t, represents the discharge power of the energy storage system during period t, represents the charging power of the electric vehicle during period t, Indicates undispatched load; Establish reward function; The deep Q learning model is used to iteratively train the agent. After the training is completed, the optimal action strategy learned by the agent is output as the decision variable of the second stage.

[0010] Furthermore, the reward function is: in, r t Indicates the comprehensive reward, r 1,t , r 2,t , r 3,t , r 4,t , r 5,t They represent the profit reward item, the penalty item of renewable energy constraints, the penalty item of energy storage system constraints, the penalty item of energy storage system charging and discharging costs, and the penalty item of active power balance. Indicates the time interval, and Represent the maximum power of photovoltaic power generation and wind power generation, Indicates the rated power of the energy storage system, Indicates the rated energy level of the energy storage system, λ represents the cost parameter of the energy storage system, Represents the penalty factor.

[0011] In addition, the present invention also provides a two-stage optimization scheduling system for day-ahead trading of a virtual power plant, comprising: The optimization dispatch model construction module is used to construct the first-stage optimization dispatch model with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, to construct the second-stage optimization dispatch model with the goal of minimizing the operating cost of the virtual power plant, and to construct the operation constraint model of various dispatch resources of the virtual power plant; The first-stage optimization solution module is used to optimize and solve the first-stage optimization scheduling model to obtain the decision variables of the first stage; The second-stage optimization solution module is used to use the decision variables of the first stage as the input of the second-stage optimization scheduling model, and adopt the deep reinforcement learning algorithm to optimize and solve the second-stage optimization scheduling model to obtain the decision variables of the second stage.

[0012] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.

[0013] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for performing two-stage optimal scheduling of day-ahead transactions on a virtual power plant, wherein the computer program executes the steps of the method described above when running on a computer.

[0014] The present invention has the following beneficial effects: The two-stage optimization scheduling method for day-ahead trading of virtual power plants of the present invention first formulates the day-ahead purchase and sales of electricity according to the market electricity price and load forecast, and makes full use of the fluctuation of the market electricity price to optimize the purchase and sales time points, thereby achieving higher returns and realizing the maximization of the profit of virtual power plants in the day-ahead trading market, and then dynamically adjusts the charging and discharging strategy of the energy storage system and optimizes the distribution of electric vehicle loads through deep reinforcement learning, further balancing the load fluctuation of the power grid, and effectively solving the impact of the uncertainty of photovoltaic and wind power generation output and load demand on the operation strategy of the virtual power plant, realizing the minimization of the operating cost of the virtual power plant. This two-stage optimization method combines the day-ahead time power trading strategy and real-time resource scheduling optimization, realizes the coordinated management of multiple resources such as wind power, photovoltaic, energy storage system and electric vehicles, and can not only realize the efficient scheduling of virtual power plant resources, but also improve the utilization efficiency of renewable energy and maximize the economic benefits of virtual power plants, thereby promoting the sustainable development of green energy and ensuring the reliability and adaptability of virtual power plants under different operating conditions.

[0015] In addition, the two-stage optimization scheduling system for day-ahead trading of the virtual power plant of the present invention also has the above advantages.

[0016] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 It is a flow chart of a two-stage optimization scheduling method for day-ahead trading of a virtual power plant in a preferred embodiment of the present application; Figure 2 yes Figure 1 Schematic diagram of the sub-process of step S3; Figure 3 It is a schematic diagram of the module structure of a two-stage optimization scheduling system for day-ahead trading of a virtual power plant in another embodiment of the present application. DETAILED DESCRIPTION

[0018] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0019] Reference Figure 1 The preferred embodiment of the present application provides a two-stage optimization scheduling method for day-ahead trading of a virtual power plant, comprising the following contents: Step S1: construct the first-stage optimization dispatching model with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, construct the second-stage optimization dispatching model with the goal of minimizing the operating cost of the virtual power plant, and construct the operation constraint model of various dispatching resources of the virtual power plant; Step S2: Optimize and solve the first-stage optimization scheduling model to obtain the decision variables of the first stage; Step S3: Using the decision variables of the first stage as the input of the second stage optimization scheduling model, the deep reinforcement learning algorithm is used to optimize and solve the second stage optimization scheduling model to obtain the decision variables of the second stage.

[0020] It can be understood that the two-stage optimization scheduling method for day-ahead trading of virtual power plants in this embodiment constructs a first-stage optimization scheduling model with the goal of maximizing the total expected profit of the virtual power plant in the day-ahead trading market, and constructs a second-stage optimization scheduling model with the goal of minimizing the operating cost of the virtual power plant. The first-stage optimization scheduling model is first optimized and solved to obtain the decision variables of the first stage, and then the decision variables of the first stage are used as the input of the second-stage optimization scheduling model, and the second-stage optimization scheduling model is optimized and solved using a deep reinforcement learning algorithm to obtain the decision variables of the second stage. This method first formulates the day-ahead power purchase and sales according to market electricity prices and load forecasts, and makes full use of market electricity price fluctuations to optimize the purchase and sales time points, thereby achieving higher returns and maximizing the profits of virtual power plants in the day-ahead trading market. It then dynamically adjusts the charging and discharging strategies of the energy storage system and optimizes the distribution of electric vehicle loads through deep reinforcement learning, further balancing the grid load fluctuations and effectively addressing the impact of the uncertainty of photovoltaic and wind power generation output and load demand on the virtual power plant operation strategy, thereby minimizing the operating costs of the virtual power plant. This two-stage optimization method combines the day-ahead time-based power trading strategy with real-time resource scheduling optimization, and realizes the coordinated management of multiple resources such as wind power, photovoltaics, energy storage systems and electric vehicles. It can not only achieve efficient scheduling of virtual power plant resources, but also improve the utilization efficiency of renewable energy and maximize the economic benefits of virtual power plants, thereby promoting the sustainable development of green energy and ensuring the reliability and adaptability of virtual power plants under different operating conditions.

[0021] It can be understood that in the present invention, the dispatchable loads of the virtual power plant include photovoltaic power generation, wind power, energy storage system and electric vehicle charging station. The virtual power plant participates in the day-ahead trading market as both a buyer and a seller. The virtual power plant maximizes operating profits in the day-ahead market by formulating the best operating strategy. When the power generation exceeds the local demand, the virtual power plant operator can sell the excess power to the power market to make a profit; on the contrary, when the power generation is not enough to meet the demand, the virtual power plant operator can purchase additional power from the market to make up for the shortfall. The purchased power can also be stored in the energy storage system and sold back to the market to obtain income when the electricity price is high. Secondly, when the local demand is high, the stored power can be used to supply the power grid to avoid power shortages.

[0022] In step S1, a first-stage optimization scheduling model is constructed with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, wherein the objective function of the first-stage optimization scheduling model is: in, f obj1 represents the objective function, T represents the total number of time steps, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the period. The decision variables solved in the first stage are and .

[0023] The second-stage optimization scheduling model is constructed with the goal of minimizing the operating cost of the virtual power plant, and all constraints in the scenario are ensured to be met. The objective function of the second-stage optimization scheduling model is: in, f obj2 represents the objective function, T represents the total number of time steps, It represents the change of electric quantity caused by charging and discharging of energy storage system in time period t, λ Represents the cost parameter of the energy storage system (which can be expressed as loss or depreciation). This cost exists when it is not 0. represents the charging power of the energy storage system during period t, It represents the discharge power of the energy storage system in the period t. At any time, , represents the unschedulable load, represents the charging power of the electric vehicle during period t, represents the photovoltaic power generation in period t, represents the wind power generation in period t, Indicates the time interval, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the period. It can be seen that the second-stage optimization scheduling model ensures the feasibility and economy of the first-stage decision under the uncertainty scenario by minimizing the operating cost in the scenario.

[0024] In addition, in order to ensure that the second-stage optimization scheduling model meets all constraints in the scenario, it is necessary to build an operation constraint model for various scheduling resources of the virtual power plant. Specifically, the operation constraint model for various scheduling resources of the virtual power plant includes: Renewable Energy Operation Constraint Model: ,in, and Respectively expressed in t The predicted output power of photovoltaic power generation and wind power generation in each period, and They represent the minimum output power of photovoltaic power generation and the minimum output power of wind power generation, respectively. is a binary variable, which indicates the on / off state of wind power, with a value of 1 for on and a value of 0 for off. It can be seen that the power output of photovoltaic power generation and wind power generation is limited by their predicted power and also by their respective minimum power generation. This constraint model is more in line with the actual power consumption scenario.

[0025] The operation constraint model also includes the energy storage system operation constraint model: in, Indicates the rated power of the energy storage system, is a binary variable, which means t The energy storage system is either charging or discharging during the time period, but not both operations at the same time. A value of 0 indicates that the energy storage system is charging, and a value of 1 indicates that the energy storage system is discharging. represents the energy level of the energy storage system during period t, represents the energy level of the energy storage system in the t-1 period, Represents the charging and discharging efficiency of the energy storage system, Indicates the rated energy level of the energy storage system, subscript s It can be seen that the constraint model limits the charging and discharging power and energy storage level of the energy storage system, and considers the influence of the charging and discharging efficiency of the energy storage system, which can more accurately reflect the operating status of the energy storage system.

[0026] In addition, the energy storage system operation constraint model also includes: in, Represents the initial energy level of the energy storage system. It can be seen that this constraint stipulates that at the end of the day, the energy level of the energy storage system must be restored to its initial state to ensure the role of the energy storage system in the next operating day, ensuring the sustainable role of the energy storage system, which is conducive to the long-term operation of the virtual power plant.

[0027] The operation constraint model also includes the day-ahead market transaction constraint model: in, and They represent the upper limits of electricity that a virtual power plant can sell and purchase from the day-ahead market, is a binary variable, which indicates that the virtual power plant sells or purchases electricity from the day-ahead trading market. The value of 1 indicates that the virtual power plant sells electricity from the day-ahead trading market, and the value of 0 indicates that the virtual power plant purchases electricity from the day-ahead trading market. It can be seen that the constraint model restricts the virtual power plant to only buy or sell electricity in each transaction, and the electricity that can be sold to the market and the electricity that can be purchased from the market have upper limits, which is conducive to maximizing the profit of the virtual power plant in the day-ahead trading market.

[0028] The operation constraint model also includes the active power operation balance constraint model: .

[0029] It can be seen that the constraint model limits the active power operation balance of the virtual power plant and ensures the reliability of the virtual power plant under different operating conditions.

[0030] In step S2, the day-ahead trading market decision is made in the first stage, and the first stage optimization scheduling model is optimized and solved using a mixed integer linear programming algorithm (MILP). For example, the commonly used solvers CPLEX or Gurobi can be used to solve the problem, and the decision variables of the first stage, i.e., the amount of electricity purchased, are obtained. And sell electricity , in order to maximize the profits of virtual power plants in the day-ahead trading market.

[0031] In step S3, the purchased electricity amount obtained by the first stage optimization is And sell electricity As the input of the second-stage optimization scheduling model, a deep reinforcement learning algorithm is used to optimize and solve the second-stage optimization scheduling model to obtain the decision variables of the second stage to minimize the operating costs of the virtual power plant. It can be understood that the second stage optimizes the operating parameters of the virtual power plant for each power consumption scenario, such as the charging and discharging behavior of the energy storage system. The deep reinforcement learning algorithm can effectively deal with the impact of the uncertainty of renewable energy (RES) output and electric vehicle (EV) charging demand in the environment on the operating strategy of the virtual power plant, and formulate highly adaptable operating strategies to ensure the adaptability of the virtual power plant under different operating conditions. Among them, when using deep reinforcement learning to optimize the operation of the virtual power plant, the operation of the virtual power plant needs to be regarded as a Markov decision process (MDP). In this process, the agent (Agent) chooses actions according to the current state of the environment to optimize the scheduling of the virtual power plant. Specifically, such as Figure 2 As shown, the process of optimizing and solving the second-stage optimization scheduling model using the deep reinforcement learning algorithm includes the following contents: Step S31: Establish the state space and action space of the agent; Step S32: Establish a reward function; Step S33: Use the deep Q learning model to iteratively train the intelligent agent. After the training is completed, the optimal action strategy learned by the intelligent agent is output as the decision variable of the second stage.

[0032] Specifically, the state space describes the state of the virtual power plant at time t, which can be expressed as: , action space a t Describes the action strategies that the agent can take, which can be expressed as: .in, represents the photovoltaic power generation at time t, represents the wind power generation at time t, represents the energy level of the energy storage system at time t, and They represent the electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, represents the charging power of the energy storage system during period t, represents the discharge power of the energy storage system during period t, represents the charging power of the electric vehicle during period t, Indicates unschedulable load.

[0033] The reward function is a function used to evaluate the results of each time step operation, with the goal of maximizing the benefits of the virtual power plant or reducing losses. The reward function can be expressed as: in, r t Indicates the comprehensive reward, r 1,t , r 2,t , r 3,t , r 4,t , r 5,t They represent the profit reward item, the penalty item of renewable energy constraints, the penalty item of energy storage system constraints, the penalty item of energy storage system charging and discharging costs, and the penalty item of active power balance. Indicates the time interval, and Represent the maximum power of photovoltaic power generation and wind power generation, Indicates the rated power of the energy storage system, Indicates the rated energy level of the energy storage system, λ represents the cost parameter of the energy storage system, Represents the penalty factor, which can be set according to actual needs.

[0034] Understandably, profit incentives r 1,t Considering the power sales and purchases of virtual power plants in the market, this item will directly reward the profit-making behavior of virtual power plants; the penalty item r 2,t It means that a penalty is imposed when the renewable energy output exceeds its maximum power; the penalty term r 3,t It means that any behavior of the energy storage system exceeding the power limit or energy level constraint should be punished; the penalty term r 4,t This means that the use of energy storage systems will incur costs and penalties are required to ensure that the virtual power plant takes into account the economic feasibility of the energy storage system when charging and discharging. r 5,t It means that if the operation of the virtual power plant does not meet the active power balance constraint, it will be punished; the reward function of the present invention not only takes into account the reward for the profitable behavior of the virtual power plant, but also takes into account the penalty for violating the renewable energy constraint, the penalty for violating the energy storage system constraint, the penalty for the energy storage system operating cost and the penalty for violating the active power balance constraint of the virtual power plant. It can more accurately characterize the reward obtained by the intelligent agent for any action, ensure that the intelligent agent can learn the optimal action strategy to minimize the operating cost of the virtual power plant, and effectively solve the impact of the uncertainty of photovoltaic and wind power generation output and load demand on the virtual power plant operation strategy, ensuring the reliability and adaptability of the virtual power plant under different operating conditions.

[0035] In order to enable the intelligent agent to learn effectively in this complex environment, the present invention uses a deep Q learning model (DQN) to optimize operations, where the Q value function of the deep Q learning model is Indicates that in a given state Take action The expected future cumulative reward is expressed as: , γ represents the discount factor, which is used to measure the importance of future rewards. It uses a neural network to approximate the Q value, and the network parameters are updated through training to maximize the cumulative reward. Specifically, the training framework of the DQN model for the agent is: A: Initialize Q network parameters first , Target Q Network Parameters ( ), experience replay pool D, which is used to store the experience and learning rate gained by the agent in interacting with the environment , Discount Factor , Exploration Rate (used for the balance between exploration and exploitation), the minimum batch size B (the number of samples drawn from the experience pool), and the frequency of updating the target Q network (usually once every certain number of steps).

[0036] B: In each training round, perform the following steps: b1: At the beginning of the round, set the initial state ; b2: At each time t, loop through the following steps: b21: Select an action. Select an action based on the following strategy: ; b22: Execute action, execute the selected action in the environment , and observe the next state and rewards ; b23: store experience, Deposit into experience replay pool D; b24: Sample from the experience replay pool, randomly sample a small batch of experience B Calculate the target Q value. For each sampled sample, calculate the target Q value: ; b25: Update the Q network, minimize the loss function, and update the parameters of the Q network, where the loss function is ; b26: Update the target Q network. Every certain number of steps, the parameters of the Q network are updated. Copy to target Q network .

[0037] C: As training progresses, gradually reduce the exploration rate and increase the utilization rate, so that the agent can rely more on the learned strategy.

[0038] D: When training is completed, the agent has learned the optimal action strategy .

[0039] After the training is completed, the optimal action strategy learned by the agent is As the decision variable output of the second stage, the variables of the second stage optimization scheduling model are solved by the deep learning algorithm: the charging and discharging strategy of the energy storage system and the distribution of electric vehicle loads, and the operating cost is minimized.

[0040] In addition, if Figure 3 As shown, another embodiment of the present invention further provides a two-stage optimization scheduling system for day-ahead trading of a virtual power plant, preferably using the two-stage optimization scheduling method for day-ahead trading of a virtual power plant as described above, including: The optimization dispatch model construction module is used to construct the first-stage optimization dispatch model with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, to construct the second-stage optimization dispatch model with the goal of minimizing the operating cost of the virtual power plant, and to construct the operation constraint model of various dispatch resources of the virtual power plant; The first-stage optimization solution module is used to optimize and solve the first-stage optimization scheduling model to obtain the decision variables of the first stage; The second-stage optimization solution module is used to use the decision variables of the first stage as the input of the second-stage optimization scheduling model, and adopt the deep reinforcement learning algorithm to optimize and solve the second-stage optimization scheduling model to obtain the decision variables of the second stage.

[0041] It can be understood that the two-stage optimization scheduling system for day-ahead trading of virtual power plants in this embodiment constructs a first-stage optimization scheduling model with the goal of maximizing the total expected profit of the virtual power plant in the day-ahead trading market, and constructs a second-stage optimization scheduling model with the goal of minimizing the operating costs of the virtual power plant. The first-stage optimization scheduling model is first optimized and solved to obtain the decision variables of the first stage, and then the decision variables of the first stage are used as the input of the second-stage optimization scheduling model, and the second-stage optimization scheduling model is optimized and solved using a deep reinforcement learning algorithm to obtain the decision variables of the second stage. The system first formulates the day-ahead power purchase and sales according to market electricity prices and load forecasts, and makes full use of market electricity price fluctuations to optimize the purchase and sales time points, thereby achieving higher returns and maximizing the profits of virtual power plants in the day-ahead trading market. It then dynamically adjusts the charging and discharging strategies of the energy storage system and optimizes the distribution of electric vehicle loads through deep reinforcement learning, further balancing the grid load fluctuations and effectively addressing the impact of the uncertainty of photovoltaic and wind power generation output and load demand on the virtual power plant operation strategy, thereby minimizing the operating costs of the virtual power plant. This two-stage optimization strategy combines the day-ahead time-based power trading strategy with real-time resource scheduling optimization, and realizes the coordinated management of multiple resources such as wind power, photovoltaics, energy storage systems and electric vehicles. It can not only achieve efficient scheduling of virtual power plant resources, but also improve the utilization efficiency of renewable energy and maximize the economic benefits of virtual power plants, thereby promoting the sustainable development of green energy and ensuring the reliability and adaptability of virtual power plants under different operating conditions.

[0042] In addition, another embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.

[0043] In addition, another embodiment of the present invention also provides a computer-readable storage medium for storing a computer program for performing two-stage optimal scheduling of day-ahead transactions on a virtual power plant, characterized in that the computer program executes the steps of the method described above when running on a computer.

[0044] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tapes, any other physical media with patterns of holes, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash-erasable programmable read-only memory (FLASH-EPROM), any other memory chip or cartridge, or any other medium that can be read by a computer. Instructions can further be transmitted or received by a transmission medium. The term transmission medium may include any tangible or intangible medium that can be used to store, encode or carry instructions for execution by a machine, and includes digital or analog communication signals or intangible media that facilitate communication of the above instructions. Transmission media include coaxial cables, copper wire, and optical fiber, including the wires of a bus used to transmit a computer data signal.

[0045] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present application may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0046] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0047] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0048] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0049] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0050] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0051] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A two-stage optimization scheduling method for day-ahead trading of a virtual power plant, characterized in that: Includes the following: The first-stage optimization dispatch model is constructed with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, the second-stage optimization dispatch model is constructed with the goal of minimizing the operating cost of the virtual power plant, and the operation constraint model of various dispatch resources of the virtual power plant is constructed; Optimize and solve the first-stage optimization scheduling model to obtain the first-stage decision variables; The decision variables of the first stage are used as the input of the second stage optimization scheduling model. The deep reinforcement learning algorithm is used to optimize and solve the second stage optimization scheduling model to obtain the decision variables of the second stage.

2. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 1 is characterized in that: The objective function of the first-stage optimization scheduling model is: in, f obj1 represents the objective function, T represents the total number of time steps, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the time period.

3. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 1 is characterized in that: The objective function of the second-stage optimization scheduling model is: in, f obj2 represents the objective function, T represents the total number of time steps, It represents the change of electric quantity caused by charging and discharging of energy storage system in time period t, λ represents the cost parameter of the energy storage system, represents the charging power of the energy storage system during period t, It represents the discharge power of the energy storage system in the period t. At any time, , represents the unschedulable load, represents the charging power of the electric vehicle during period t, represents the photovoltaic power generation in period t, represents the wind power generation in period t, Indicates the time interval, and Respectively expressed in t The electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market during the time period.

4. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 3 is characterized in that: The operation constraint models of various dispatching resources of virtual power plants include: Renewable Energy Operation Constraint Model: ,in, and Respectively expressed in t The predicted output power of photovoltaic power generation and wind power generation in each period, and They represent the minimum output power of photovoltaic power generation and the minimum output power of wind power generation, respectively. is a binary variable, which indicates the on / off state of wind power, with a value of 1 for on and a value of 0 for off; Energy storage system operation constraint model: in, Indicates the rated power of the energy storage system, is a binary variable, which means t The energy storage system is charging or discharging during the time period, and cannot perform both operations at the same time. A value of 0 indicates that the energy storage system is charging, and a value of 1 indicates that the energy storage system is discharging. represents the energy level of the energy storage system during period t, represents the energy level of the energy storage system in the t-1 period, Represents the charging and discharging efficiency of the energy storage system, Indicates the rated energy level of the energy storage system; Day-ahead market transaction constraint model: in, and They represent the upper limits of electricity that a virtual power plant can sell and purchase from the day-ahead market, It is a binary variable, which indicates whether the virtual power plant sells or purchases electricity from the day-ahead trading market. A value of 1 indicates that the virtual power plant sells electricity from the day-ahead trading market, and a value of 0 indicates that the virtual power plant purchases electricity from the day-ahead trading market. Active power operation balance constraint model: 。 5. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 4 is characterized in that: The energy storage system operation constraint model also includes: in, Represents the initial energy level of the energy storage system.

6. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 1 is characterized in that: The process of optimizing and solving the second-stage optimization scheduling model using the deep reinforcement learning algorithm includes the following contents: Establish the state space and action space of the agent, where the state space can be expressed as: , the action space can be expressed as: , represents the photovoltaic power generation at time t, represents the wind power generation at time t, represents the energy level of the energy storage system at time t, and They represent the electricity selling price and electricity purchasing price of the virtual power plant in the day-ahead trading market, and Respectively expressed in t The amount of electricity sold and purchased by the virtual power plant in the day-ahead trading market during the period, represents the charging power of the energy storage system during period t, represents the discharge power of the energy storage system during period t, represents the charging power of the electric vehicle during period t, Indicates undispatched load; Establish reward function; The deep Q learning model is used to iteratively train the agent. After the training is completed, the optimal action strategy learned by the agent is output as the decision variable of the second stage.

7. The two-stage optimization scheduling method for day-ahead trading of a virtual power plant according to claim 6 is characterized in that: The reward function is: in, r t Indicates the comprehensive reward, r 1,t , r 2,t , r 3,t , r 4,t , r 5,t They represent the profit reward item, the penalty item of renewable energy constraints, the penalty item of energy storage system constraints, the penalty item of energy storage system charging and discharging costs, and the penalty item of active power balance. Indicates the time interval, and Represent the maximum power of photovoltaic power generation and wind power generation, Indicates the rated power of the energy storage system, Indicates the rated energy level of the energy storage system, λ represents the cost parameter of the energy storage system, Represents the penalty factor.

8. A two-stage optimization dispatching system for day-ahead trading of a virtual power plant, characterized in that: include: The optimization dispatch model construction module is used to construct the first-stage optimization dispatch model with the goal of maximizing the total expected value of the profit of the virtual power plant in the day-ahead trading market, to construct the second-stage optimization dispatch model with the goal of minimizing the operating cost of the virtual power plant, and to construct the operation constraint model of various dispatch resources of the virtual power plant; The first-stage optimization solution module is used to optimize and solve the first-stage optimization scheduling model to obtain the decision variables of the first stage; The second-stage optimization solution module is used to use the decision variables of the first stage as the input of the second-stage optimization scheduling model, and adopt the deep reinforcement learning algorithm to optimize and solve the second-stage optimization scheduling model to obtain the decision variables of the second stage.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the steps of the method according to any one of claims 1 to 7 by calling the computer program stored in the memory.

10. A computer-readable storage medium for storing a computer program for performing two-stage optimization scheduling of day-ahead trading on a virtual power plant, characterized in that: When the computer program is run on a computer, the steps of the method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Virtual power plant optimization trading strategy model based on two-stage stochastic programming

    CN108960510A

  • Power system regulation and control method based on deep reinforcement learning

    CN115663804A

  • Multi-stage optimization operation method, device and equipment of virtual power plant and storage medium

    CN117458615A

  • Novel virtual power plant system based on ubiquitous interconnection

    CN117559557A

  • Multi-energy virtual power plant optimization scheduling method and system

    CN118801386A

Cited By

  • Virtual power plant transaction management system and method based on artificial intelligence

    CN120580020A

  • Virtual power plant response optimization scheduling system and method based on reinforcement learning

    CN120728750A