A virtual power plant participates in joint optimization regulation and control method and device of main and auxiliary market
By performing refined modeling and differential evolution algorithm solutions on various resources within the virtual power plant, the problem of the virtual power plant failing to fully demonstrate its flexible adjustment advantages in multi-market transactions is solved, achieving overall optimization of multi-market revenue and improved economic efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI ELECTRIC POWER TRADING CENT CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, virtual power plants have not fully demonstrated their flexible adjustment advantages in multi-market transactions, lack multi-market collaborative optimization design, resulting in insufficient exploration of revenue channels, and when modeled as a mixed-integer linear optimization problem, there is a problem of dimensional explosion in the feasible solution space.
By performing detailed modeling of resources such as new energy sources, adjustable loads, energy storage systems, and gas turbines within a virtual power plant, a joint optimization objective function is constructed. A hierarchical solution algorithm based on differential evolution is then adopted to coordinate multi-market transactions and optimize resource collaborative operation.
It improves the market incentive effect and the economic efficiency of regulation strategies for virtual power plants, solves the problem of dimensional explosion in feasible solution space, and achieves overall optimization of multi-market benefits.
Smart Images

Figure CN122394090A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity market technology, specifically to a method and apparatus for joint optimization and control of virtual power plants participating in primary and secondary markets. Background Technology
[0002] my country's installed capacity of new energy sources continues to grow, with wind power, photovoltaics, and other new energy sources increasingly penetrating the power system. However, the output of new energy sources exhibits significant randomness and volatility. Large-scale grid connection poses a severe challenge to the power system's power balance and frequency stability, leading to a sharp increase in peak-shaving and frequency regulation pressure. The traditional dispatching model, primarily based on centralized power sources, is no longer adequate to meet the operational needs of the new power system. Against this backdrop, virtual power plants integrate small-capacity, geographically dispersed distributed energy resources, along with flexible adjustment resources such as energy storage batteries and adjustable loads, forming "virtual" power generation entities with unified control and market trading qualifications. Participating in electricity market transactions as independent market entities, they provide an effective technical path and solution for improving new energy consumption, enhancing system flexibility, and alleviating grid operation pressure.
[0003] Currently, research on control strategies for virtual power plants participating in electricity market transactions mainly focuses on the dimension of single trading instruments, i.e., participating only in the energy market or a single ancillary service market, lacking systematic joint optimization design for scenarios involving multi-market collaborative participation. In some joint optimization methods involving multiple trading instruments, only a few types of aggregated resource entities are often considered, failing to fully encompass the diversity of adjustable resources and making it difficult to reflect the flexible adjustment advantages of virtual power plants. These methods have certain limitations in practical applications. On the one hand, because they ignore the coupling relationship between different markets, the optimization control strategy of virtual power plants in a single market cannot achieve overall economic optimization, and its comprehensive market value cannot be fully reflected. On the other hand, because the synergistic and complementary characteristics of multiple types of aggregated entities are not fully considered, the constructed virtual power plant model lacks flexibility and is difficult to adapt to the market demand for multi-resource collaborative regulation in actual operation. Furthermore, virtual power plant joint control optimization models that comprehensively consider multiple aggregated entities and multiple constraints are often modeled as mixed-integer linear optimization problems. When there are many aggregated units and simultaneous optimization at multiple time steps, there is a problem of dimensional explosion in the feasible solution space, resulting in poor model solution efficiency.
[0004] In summary, with the high proportion of new energy sources integrated into the power system, the joint optimization and control method involving virtual power plants with multiple aggregation entities in the energy market, ancillary service market, and demand market has become a development trend. Therefore, it is urgent to construct a joint optimization and control method for virtual power plants that comprehensively considers the operational characteristics of multiple types of aggregated resources and multiple market trading mechanisms. This method should also address the problem of dimensional explosion in the feasible solution space when modeling a mixed-integer linear optimization problem, especially when there are many aggregation units and simultaneous optimization at multiple time steps. This approach aims to fully leverage the aggregation advantages and flexible adjustment capabilities of virtual power plants, providing strong support for the safe and stable operation of the new power system. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method and apparatus for joint optimization and control of virtual power plants participating in the primary and secondary markets. This aims to address the problems of existing technologies that primarily focus on a few types of aggregated resources, lacking a systematic characterization of the collaborative operation characteristics of various heterogeneous resources within a virtual power plant, making it difficult to effectively quantify the overall adjustability of the virtual power plant; simultaneously, due to the limitation of a single market trading model, the diversity and flexible adjustment value of the revenue channels of virtual power plants are not fully explored, resulting in insufficient market incentive effects and limiting the application value of the method in actual market trading and scheduling operations; furthermore, this invention addresses the problem of dimensional explosion in the feasible solution space when modeling a mixed-integer linear optimization problem, especially when there are many aggregated units and simultaneous optimization at multiple time steps.
[0006] According to a first aspect of the present invention, a method for joint optimization and control of a virtual power plant participating in the primary and secondary markets is provided, the method comprising:
[0007] Acquire forecast data on the generated power of aggregated new energy sources, the power forecast data and adjustable load range data of aggregated loads within the virtual power plant, operating parameters, and forecast price data of the virtual power plant in the primary and secondary markets; Based on the power prediction data of the aggregated load and the adjustable load range data, the operating constraints of the adjustable load are constructed. The operating constraints of the adjustable load include: power adjustment range constraints of transferable load and interruptible load, and load balance constraints. Based on the gas turbine parameters in the operating parameters, the output constraints, ramping constraints, frequency regulation capacity constraints, and cost models of the gas turbine are constructed. Based on the energy storage system parameters in the operating parameters, construct the charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints, and cost model of the energy storage system. The virtual power plant's overall constraints are constructed based on the aforementioned operating parameters and the aggregated new energy power generation prediction data. The revenue of the virtual power plant participating in the electricity market is determined based on the predicted price data of the virtual power plant in the primary and secondary markets; the revenue of the virtual power plant participating in the frequency regulation market is determined based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; the revenue of the virtual power plant participating in demand response is determined based on the predicted price data of the virtual power plant in the primary and secondary markets. Based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of the virtual power plant participating in the electricity market, the revenue of the virtual power plant participating in the frequency regulation market, and the revenue of the virtual power plant participating in demand response, the overall revenue of the virtual power plant in all time periods is obtained, and a joint optimization objective function is constructed to maximize the overall revenue. Under the premise of satisfying all constraints, the joint optimization objective function is solved by a hierarchical solution algorithm based on differential evolution algorithm, so as to obtain the transaction power allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load.
[0008] Preferably, The aggregated new energy power generation prediction data in the virtual power plant includes: wind power generation prediction data and photovoltaic power generation prediction data for each time period in the virtual power plant. The power forecast data and adjustable load range data of the aggregated load include: the baseline load forecast data, upper limit and lower limit of transferable load for each time period within the virtual power plant; and the baseline load forecast data and upper limit of interruptible load for each time period within the virtual power plant. The operating parameters include: the average frequency regulation mileage call rate of the virtual power plant, historical comprehensive frequency regulation performance indicators, gas turbine parameters, energy storage system parameters, and the maximum input / output power capacity of the virtual power plant. The gas turbine parameters include: the number of gas turbines, the fixed cost and operating cost of each gas turbine, the start-up and shutdown costs of the gas turbine unit, the upper and lower limits of the output of the gas turbine unit, the upper limit of the ramp rate of the gas turbine unit, and the gas turbine reserve factor. The energy storage system parameters include: the number of energy storage devices, the charging and discharging cost of each energy storage device, the charging and discharging efficiency of each energy storage device, the upper limit of the charging and discharging power of each energy storage device, the upper and lower limits of the battery capacity, the initial battery capacity ratio, and the energy storage reserve coefficient. The predicted price data for the virtual power plant in the primary and secondary markets includes: the predicted electricity sales price and purchase price of the virtual power plant in the electricity market for each time period; the frequency regulation capacity compensation price and frequency regulation mileage compensation price of the virtual power plant in the frequency regulation market for each time period; the transferable load compensation price and interruptible load compensation price of the virtual power plant in the demand response market for each time period; and the electricity price for loads agreed upon by the virtual power plant and users for each time period.
[0009] Preferably, The operational constraints for constructing the adjustable load based on the power prediction data and adjustable load range data of the aggregated load include: Based on the baseline load forecast data, upper limit and lower limit of transferable load for each time period in the virtual power plant, the load transfer amount of the virtual power plant in each time period is used as the decision variable. The load transfer amount is within the range of the upper and lower limits of the transferable load, and the total load after the transfer remains unchanged. The actual electricity demand of the transferable load in each time period is calculated, and the power adjustment range constraint of the transferable load is established. Based on the baseline load forecast data of interruptible load in each time period within the virtual power plant and the upper limit of interruptible load, the load reduction amount of the virtual power plant in each time period is used as the decision variable. The load reduction amount is within the range of 0 to the upper limit of interruptible load. The actual power demand of interruptible load in each time period is calculated, and the power adjustment range constraint of interruptible load is established. The actual electricity demand of transferable load and the actual electricity demand of interruptible load in each time period are superimposed to obtain the actual electricity demand of total user load in each time period, and load balance constraints are established.
[0010] Preferably, The process of constructing the gas turbine's output constraints, ramp-up constraints, frequency regulation capacity constraints, and cost model based on the gas turbine parameters in the operating parameters includes: Based on the number of gas turbines and the upper and lower limits of the gas turbine unit's output, the state and output of the gas turbine unit at each time period are used as decision variables. The output of the gas turbine unit is within the upper and lower limits of the gas turbine unit's output, and the output constraint of the gas turbine is established. Based on the ramp limit of the gas turbine unit, a ramp constraint for the gas turbine is established so that the output change of the gas turbine in adjacent time periods does not exceed the ramp limit; Based on the gas turbine reserve coefficient, the frequency regulation capacity of any gas turbine in each time period is used as the decision variable. The gas turbine participates in the frequency regulation market according to the remaining electricity outside the electricity market, and the positive reserve capacity is considered. The frequency regulation capacity constraint of the gas turbine is established. A cost model for gas turbines is established based on the number of gas turbines, the fixed cost and operating cost of each gas turbine, and the start-up and shutdown costs of the gas turbine units.
[0011] Preferably, The construction of the energy storage system's charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints, and cost model based on the energy storage system parameters in the operating parameters includes: Based on the upper limit of the charging and discharging power of each energy storage device, the charging and discharging status and charging and discharging power of any energy storage device in each time period are used as decision variables. The charging and discharging power is within the range of 0 to the upper limit of the charging and discharging power, and the charging and discharging status of the same energy storage unit in any time period can only be charging or discharging. Thus, the charging and discharging power constraint of the energy storage system is established. Based on the upper and lower limits of battery power and the initial battery power ratio, the energy storage battery power is within the upper and lower limit range, and the energy storage battery power at the end of the period is restored to the initial period power; based on the charging and discharging efficiency of each energy storage device, the energy storage battery power of any energy storage device in each period is obtained, and the battery power constraint of the energy storage system is established. Based on the energy storage reserve coefficient, the frequency regulation capacity of any energy storage device in each time period is used as the decision variable, and the frequency regulation capacity constraint of the energy storage system is established under the condition of reserve. Based on the number of energy storage devices and the charging and discharging cost of each energy storage device, the operating cost of all energy storage devices in each time period is obtained, and a cost model of the energy storage system is established.
[0012] Preferably, The overall constraints for constructing the virtual power plant based on the operating parameters and the aggregated new energy power generation prediction data include: Based on the maximum input / output power capacity of the virtual power plant, the power purchase and sale status and power volume of the virtual power plant in each time period are used as decision variables, and the virtual power plant can only purchase or sell power in the power market at any time, thus establishing the power purchase and sale constraint of the virtual power plant. Based on the wind power generation forecast data and photovoltaic power generation forecast data, the number of gas turbines and the number of energy storage devices in the virtual power plant for each time period, the overall power balance constraint of the virtual power plant is established so that the sum of the internal power generation and the external power purchase is equal to the sum of the internal power consumption and the external power sales.
[0013] Preferably, The determination of the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets includes: Based on the predicted electricity sales price and purchase price of the virtual power plant in the electricity market at each time period, the revenue of the virtual power plant participating in the electricity market at each time period is determined by subtracting the purchase cost from the electricity sales revenue.
[0014] Preferably, The determination of the revenue of virtual power plants participating in the frequency regulation market based on the operating parameters and the predicted price data of virtual power plants in the primary and secondary markets includes: Based on the number of gas turbines, the number of energy storage devices, the frequency regulation capacity of any gas turbine in each time period, and the frequency regulation capacity of any energy storage device in each time period, the total frequency regulation capacity of the virtual power plant in each time period is obtained. Based on the average frequency regulation mileage call rate of the virtual power plant, the historical comprehensive frequency regulation performance index, and the total frequency regulation capacity, the comprehensive frequency regulation mileage of the virtual power plant in each time period is obtained; Based on the frequency regulation capacity compensation price, frequency regulation mileage compensation price, total frequency regulation capacity, and comprehensive frequency regulation mileage of the virtual power plant in the frequency regulation market at different times, the revenue of the virtual power plant participating in the frequency regulation market is obtained by adding the revenue from frequency regulation capacity to the revenue from frequency regulation mileage. The determination of the benefits of virtual power plants participating in demand response based on the predicted price data of the virtual power plants in the primary and secondary markets includes: Based on the transferable load compensation price and interruptible load compensation price of the virtual power plant in the demand response market for each time period, and the load electricity price agreed upon by the virtual power plant and the user for each time period; the revenue of the virtual power plant participating in demand response for each time period is determined by subtracting the load transfer compensation cost and the load interruption compensation cost from the electricity charges collected from the user.
[0015] Preferably, The step of solving the joint optimization objective function using a hierarchical solution algorithm based on differential evolution includes: The 0-1 decision variables are encoded using the differential evolution algorithm to obtain the encoding vector for any decision time period; the encoding vectors of all time steps are concatenated in chronological order to obtain the encoding vector for the entire scheduling cycle. Based on the preset population size, an initial population of individuals is randomly generated. Any component of each population individual is randomly generated within the range of 0 to 1, resulting in a continuous encoding vector. Discretize the continuous encoding vector of each individual in the initial population to obtain discrete state variables; Based on the joint optimization objective function and the discrete state variables of the initial population individuals, construct the optimization objective function of the lower-level linear programming model; Substitute each individual in the initial population into the lower-level linear programming model as a boundary condition for solving the model, and use the obtained overall revenue objective function value of the virtual power plant as the fitness value of that individual; if the lower-level linear programming problem has no feasible solution, then assign a preset fitness value to that individual. Initialize the fitness value of the globally optimal individual; Set the maximum number of iterations, and set the mutation operator, crossover probability factor, and selection operator for the population; Perform the following operations on each individual in the initial population in sequence: Mutation operation: Randomly select three different individuals from the initial population, perform differential evolution operation according to the set mutation operation operator, and perform boundary processing to obtain new mutated individuals; Crossover operation: For each individual in the initial population, crossover operation is performed between each individual and its corresponding mutant individual according to the set crossover probability factor to obtain a new experimental individual; Selection operation: Obtain the fitness value of each generated experimental individual, compare the fitness value of the current individual with that of the corresponding experimental individual, and select the individual with the larger fitness value as the corresponding individual in the next generation population; Select the individual with the highest fitness value from all individuals in the current population as the best individual in the present generation; If the fitness value of the current best individual is greater than the fitness value of the recorded global best individual, then the current best individual replaces the global best individual. Repeatedly perform mutation, crossover, and selection operations, and update the global best individual until the maximum number of iterations is reached. The binary code corresponding to the global best individual at this point and the optimal solution of the lower-level linear programming are then used as the final output.
[0016] According to a second aspect of the present invention, a device for joint optimization and control of virtual power plants participating in the primary and secondary markets is provided, the device comprising: Data acquisition module: used to acquire the predicted power generation data of aggregated new energy sources, the predicted power data of aggregated loads, the adjustable load range data, operating parameters, and the predicted price data of the virtual power plant in the primary and secondary markets; Adjustable load constraint module: used to construct operating constraints for adjustable loads based on the power prediction data of the aggregated loads and the adjustable load range data. The operating constraints for adjustable loads include: power adjustment range constraints for transferable loads and interruptible loads, as well as load balance constraints. Gas turbine operation constraints and cost module: Based on the gas turbine parameters in the operation parameters, construct the gas turbine output constraints, ramping constraints, frequency regulation capacity constraints and cost model; Energy storage operation constraints and cost module: used to construct the charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints and cost model of the energy storage system based on the energy storage system parameters in the operation parameters; Virtual power plant overall constraint module: used to construct virtual power plant overall constraints based on the operating parameters and the aggregated new energy power generation prediction data; Revenue Determination Module: Used to determine the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets; to determine the revenue of the virtual power plant participating in the frequency regulation market based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; and to determine the revenue of the virtual power plant participating in demand response based on the predicted price data of the virtual power plant in the primary and secondary markets. Objective function construction module: used to obtain the overall revenue of virtual power plants in all time periods based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of virtual power plants participating in the electricity market, the revenue of virtual power plants participating in the frequency regulation market, and the revenue of virtual power plants participating in demand response, and to construct a joint optimization objective function to maximize the overall revenue; The solution module is used to solve the joint optimization objective function using a hierarchical solution algorithm based on differential evolution, under the premise of satisfying all constraints, to obtain the transaction electricity allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load.
[0017] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This application employs refined modeling of various flexible resources within a virtual power plant, including new energy sources, adjustable loads, energy storage systems, and gas turbines. It systematically characterizes the collaborative operation mechanism of these diverse flexible resources, fully releasing the overall regulatory potential of the virtual power plant and enhancing the model's completeness and practicality. By coordinating the virtual power plant's participation in multiple market transactions, such as the electricity market, frequency regulation market, and demand response market, it achieves comprehensive optimization of multi-market revenue, fully exploring the diversity of revenue channels and the value of flexible regulation, thereby improving the market incentive effect of the virtual power plant. Furthermore, by organically combining the operational characteristics of multiple resources and the multi-market revenue mechanism, a joint optimization objective function is constructed and solved using a hierarchical solution algorithm based on differential evolution. This addresses the problem of dimensional explosion in the feasible solution space when modeling a mixed-integer linear optimization problem with a large number of aggregated units and simultaneous optimization at multiple time steps. This effectively improves the economy and practicality of the virtual power plant's regulation strategy, providing strong support for the application of virtual power plants in actual market transactions and dispatch operations.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0020] Figure 1This is a flowchart illustrating a method for joint optimization and control of a virtual power plant participating in the primary and secondary markets, according to an exemplary embodiment. Figure 2 This is a schematic diagram of the flow framework of the hierarchical solution algorithm of the differential evolution algorithm according to another exemplary embodiment; Figure 3 This is a schematic diagram of a system for a virtual power plant participating in the joint optimization and control of the primary and secondary markets, according to another exemplary embodiment. In the attached diagram: 1-Data acquisition module, 2-Adjustable load constraint module, 3-Gas turbine operation constraint and cost module, 4-Energy storage operation constraint and cost module, 5-Virtual power plant overall constraint module, 6-Revenue determination module, 7-Objective function construction module, 8-Solution module. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0022] Example 1 Figure 1 This is a flowchart illustrating a method for joint optimization and control of a virtual power plant participating in the primary and secondary markets, according to an exemplary embodiment. Figure 1 As shown, the method includes: S1, obtain the predicted power generation data of the aggregated new energy sources, the predicted power data of the aggregated loads, the adjustable load range data, the operating parameters, and the predicted price data of the virtual power plant in the main and auxiliary markets. S2, Based on the power prediction data of the aggregated load and the adjustable load range data, construct the operating constraints of the adjustable load. The operating constraints of the adjustable load include: power adjustment range constraints of the transferable load and the interruptible load, as well as load balance constraints. S3. Based on the gas turbine parameters in the operating parameters, construct the gas turbine's output constraints, ramping constraints, frequency regulation capacity constraints, and cost model. S4. Based on the energy storage system parameters in the operating parameters, construct the charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints, and cost model of the energy storage system. S5. Construct overall constraints for the virtual power plant based on the operating parameters and the aggregated new energy power generation prediction data. S6. Determine the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets; determine the revenue of the virtual power plant participating in the frequency regulation market based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; determine the revenue of the virtual power plant participating in demand response based on the predicted price data of the virtual power plant in the primary and secondary markets. S7. Based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of the virtual power plant participating in the electricity market, the revenue of the virtual power plant participating in the frequency regulation market, and the revenue of the virtual power plant participating in demand response, obtain the overall revenue of the virtual power plant for all time periods, and construct a joint optimization objective function to maximize the overall revenue. S8. Under the premise of satisfying all constraints, the joint optimization objective function is solved by a hierarchical solution algorithm based on differential evolution algorithm to obtain the transaction power allocation results of the virtual power plant in the power market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load. It is understood that this application specifically includes: Obtaining the predicted power generation data of aggregated new energy sources within a virtual power plant includes the following steps: Get virtual power plant t Wind power generation forecast data for different time periods , t =1,2,...,T, where T=96, indicating that there are 96 time intervals per day with 15-minute intervals; Get virtual power plant t Photovoltaic power generation forecast data for different time periods ; Obtaining power forecast data and adjustable load range data of aggregated loads within a virtual power plant includes the following steps: Get virtual power plant t Baseline load forecast data for transferable load during the time period Maximum transferable load Lower limit of transferable load ; Get virtual power plant t Baseline load forecast data for interruptible load during the time period Interruptible load limit ; Obtaining virtual power plant operating parameters includes the following steps: Obtain the average frequency regulation mileage call rate of the virtual power plant Historical comprehensive frequency modulation performance indicators ; Get the number of gas turbines in the virtual power plant , No. Fixed costs of a gas turbine Operating costs Start-up cost of the unit Shutdown costs of the unit upper limit of unit output Lower limit The unit's maximum ramp rate Gas turbine reserve factor ,in =1,2,...,N; Get the number of energy storage units in the virtual power plant , No. The charging and discharging costs of Taiwan's energy storage Charging efficiency Discharge efficiency Upper limit of charging and discharging power Battery capacity limit Lower limit Initial battery charge percentage Energy storage reserve coefficient ; Get the maximum input / output power capacity of the virtual power plant ; Obtaining predicted price data for virtual power plants in the primary and secondary markets includes the following steps: Get t Predicted electricity sales prices in the electricity market from virtual power plants during specific time periods Electricity purchase price ; Get t Frequency regulation capacity compensation price of virtual power plants in the frequency regulation market FM mileage compensation price ; Get t Time-based virtual power plants' transferable load compensation price in the demand response market Interruptible load compensation price ; Get t The load electricity price agreed upon between the virtual power plant and the user during the time period ; Constructing adjustable load operation constraints includes the following steps: Based on the data obtained above , , ,by t Load transfer volume of virtual power plants during time periods The decision variables are defined as follows: the load transfer amount must be within an adjustable range, and the total load after the transfer remains unchanged. The calculation is as follows: tActual electricity demand for load transfer during time periods Determine using the following formula:
[0023]
[0024]
[0025] Based on the data obtained above , ,by t Load reduction of virtual power plants during time periods For the decision variables, the load reduction amount needs to be within an adjustable range. Calculation t Interruptible load actual power demand Determine using the following formula:
[0026]
[0027] Based on the data calculated above and data Calculate the load after transfer and the load after reduction by superimposing the load. t Actual electricity demand of total user load during the time period Determine using the following formula:
[0028] Constructing a gas turbine operating constraint and benefit / cost model: Constructing gas turbine output constraints includes the following steps: Based on the data obtained above , with the first Taiwan gas turbine t State variables of a time period , , and contribution As decision variables, =1 indicates that the unit is in operation. =0 indicates that the unit is in a non-operating state. =1 indicates that the unit has undergone a status change (start-up). =0 indicates that the unit is not in a state of operation. =1 indicates that the unit status has changed (shutdown). =0 indicates that the unit is not in a shutdown state. The gas turbine output must be between the maximum and minimum technical output range. Therefore, the gas turbine output constraint is determined by the following formula:
[0029]
[0030]
[0031] Climbing constraints: Based on the data obtained above The output variation of the gas turbine in adjacent time periods does not exceed the maximum ramp limit of the unit. Therefore, the ramp constraint of the gas turbine is determined by the following formula:
[0032] Constructing frequency regulation capacity constraints for gas turbines includes the following steps: Based on the above or the data , with the first Taiwan gas turbine t Frequency modulation capacity during the time period As the decision variable, the remaining electricity not participating in the electricity market participates in the frequency regulation market, and considering positive capacity reserve, the frequency regulation capacity constraint of the gas turbine is determined as follows: 0
[0033] Constructing a gas turbine cost model includes the following steps: Based on the data obtained above , , , , Considering fixed costs, start-up and shutdown costs, and operating costs, calculate t Total cost of all gas turbines during the period Determine using the following formula:
[0034] Constructing energy storage operation constraints and benefit / cost models: Constructing energy storage output constraints includes the following steps: Based on the data obtained above , with the first Taiwan Energy Storage t Time-based charging and discharging state variables Charging power Discharge power As decision variables, Indicates charging. To indicate discharge, the energy storage charging and discharging power must be within the range of maximum and minimum output, and the same energy storage unit can only charge or discharge at any given time. Therefore, the energy storage charging and discharging power constraints are determined as follows:
[0035]
[0036] Energy storage battery power constraints: Based on the data obtained above , , The energy storage battery capacity must be within a safe range, and the capacity at the end of the period must be restored to the initial capacity. Therefore, the energy storage battery capacity constraint is determined as shown in the following formula:
[0037]
[0038] Among them, based on the data obtained above , ,calculate t Time period Taiwan energy storage unit battery capacity Determine using the following formula:
[0039] Constructing energy storage frequency regulation capacity constraints includes the following steps: Based on the data obtained above ,by t Time period Taiwan's energy storage frequency regulation capacity Taking reserve as a decision variable, the frequency regulation capacity constraint of energy storage is determined as shown in the following formula:
[0040]
[0041]
[0042] Constructing an energy storage cost model includes the following steps: Based on the data obtained above ,calculate t Operating costs of all energy storage devices during the period Determine using the following formula:
[0043] Construct a virtual power plant overall operation model and a comprehensive benefit and cost model: Constructing the overall constraints for the virtual power plant includes the following steps: Based on the data obtained above ,by t Purchase and sale status variables of virtual power plants during time periods Electricity sales Electricity purchase As decision variables, Indicates the electricity sales status. This indicates the power purchase status. At any given time, the virtual power plant can only purchase or sell electricity in the electricity market. The power purchase and sales constraints are determined by the following formula:
[0044]
[0045] Based on the data obtained above ,data , , The sum of the virtual power plant's internal power generation and external power purchase is equal to the sum of its internal power consumption and external power sales. Therefore, the overall power balance constraint of the virtual power plant is determined by the following formula:
[0046] Calculating the revenue of a virtual power plant participating in the electricity market includes the following steps: Based on the data obtained above , Calculate by subtracting the cost of purchasing electricity from the revenue from electricity sales. t Revenue of virtual power plants in the electricity market Determine using the following formula:
[0047] Calculating the revenue of virtual power plants participating in the frequency regulation market includes the following steps: Based on the data obtained above , ,calculate t Total frequency regulation capacity of virtual power plants during time periods Determine using the following formula:
[0048] Based on the data obtained above , ,calculate t Integrated frequency regulation mileage of virtual power plants during time periods Determine using the following formula:
[0049] Based on the data obtained above , Calculate based on the sum of frequency modulation capacity revenue and frequency modulation mileage revenue. t Revenue of Time-of-Use Virtual Power Plants in the Frequency Regulation Market Determine using the following formula:
[0050] Calculating the benefits of virtual power plants participating in demand response includes the following steps: Based on the data obtained above , , Calculate the cost based on the electricity charges collected from users minus load transfer compensation costs and load interruption compensation costs. t Benefits of time-limited virtual power plants in demand response Determine using the following formula:
[0051] Constructing the optimization objectives for the virtual power plant includes the following steps: Data obtained from the above calculations , , , , Calculate the overall revenue of the virtual power plant across all time periods by subtracting costs from revenue. With the goal of maximizing overall profit, the following formula is used to determine the optimal outcome:
[0052] The joint optimization objective function is solved using a hierarchical solution algorithm based on differential evolution, as shown in the appendix. Figure 2 As shown: Constructing a hierarchical optimization algorithm: Constructing the variable encoding for the upper-level differential evolution algorithm includes the following steps: Based on the 0-1 decision variable data in the above model , , , , Design variable encoding for differential evolution algorithm. t The variable coding for the decision-making period is determined by the following formula:
[0053] ,
[0054] For the entire scheduling cycle T The encoding vectors of the decision variables are concatenated over time steps and determined by the following formula:
[0055] Based on the data obtained above , Population Individual Encoding vector dimension Calculate using the following formula:
[0056] Based on population size NP Initialize the population and the optimal individual value, and the individual... The continuous encoding vector and the optimal individual value are determined by the following formula:
[0057]
[0058] individual The Each component Randomly generated between 0 and 1, and calculated using the following formula:
[0059] For individuals Discretization mapping of continuous encoded vectors , thus obtaining 0-1 discrete state variables Calculate using the following formula:
[0060]
[0061] Constructing the lower-level linear programming problem involves the following steps: Based on the objective function of the above model Discrete coding of individual populations With fixed output variables of 0-1, a lower-level linear programming model is constructed and solved using a linear programming solver. The optimization objective of the lower-level linear programming model is determined by the following formula:
[0062] Constructing the fitness function for individuals in the population involves the following steps: Based on the solution obtained from the lower-level linear programming model, the population individuals The fitness function is the objective function corresponding to the optimal solution of the linear programming problem. When there is no optimal solution to the lower-level linear programming problem, the fitness function of the population individuals... The fitness function is a local minimum. The fitness function is determined by the following formula:
[0063] Set the current iteration number to The optimal individual in the population is the individual corresponding to the maximum value of the fitness function, while the globally optimal individual is the optimal individual across all iterations. The optimal individual and the globally optimal individual are determined by the following formulas:
[0064]
[0065] Constructing mutation, crossover, and selection operators for a population involves the following steps: Based on all individuals in the current population, set the current algorithm iteration count to . Set the mutation factor Three different individuals were randomly selected from them. Differential evolution is performed, and boundary conditions are adjusted to obtain new mutated individuals. Determine using the following formula:
[0066]
[0067] in, The mutation factor of the algorithm determines the difference step size of individuals in the population, increasing... F This can increase population diversity and enhance the algorithm's search capabilities; reduce... It may enhance the development capability of the algorithm, improve the convergence speed of the algorithm, and generate a mutant individual with new genes by performing mutation operations on the basis of the current individual.
[0068] Set the crossover probability factor based on all individuals in the current population. Each individual is cross-crossed with its mutated counterparts to obtain new experimental individuals. Determine using the following formula:
[0069]
[0070] in, CR The crossover probability factor of the algorithm is increased. CR It can increase population diversity; reduce CR It can improve the convergence speed of the algorithm. By performing crossover operations, the genes at certain points of the current individual can be crossovered with the superior genes of other individuals.
[0071] Based on the new experimental individuals in the current population, the fitness function is calculated. Then, using a greedy selection operation, a better next-generation population individual is selected from both the target individual and the experimental individuals. The next-generation population individual is determined by the following formula:
[0072] Through the above mutation, crossover, and selection operations, individuals in the population are selected to enter the next generation based on their fitness function evaluation, and the process is repeated iteratively. When the algorithm reaches the set maximum number of iterations, the algorithm ends and outputs the optimal solution.
[0073] Finally, the joint optimization model is solved using a hierarchical solution algorithm based on differential evolution, yielding the electricity allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage within the virtual power plant, and the demand response plan of the adjustable load.
[0074] Example 2 Figure 3 This is a schematic diagram of a system for a virtual power plant participating in the joint optimization and control of the primary and secondary markets, according to another exemplary embodiment. The device includes: Data acquisition module 1: used to acquire the predicted power generation data of aggregated new energy sources, the predicted power data of aggregated loads, the adjustable load range data, operating parameters, and the predicted price data of the virtual power plant in the primary and secondary markets. Adjustable load constraint module 2: used to construct operating constraints for adjustable loads based on the power prediction data of the aggregated loads and the adjustable load range data. The operating constraints for adjustable loads include: power adjustment range constraints for transferable loads and interruptible loads, as well as load balancing constraints. Gas turbine operation constraints and cost module 3: Based on the gas turbine parameters in the operation parameters, construct the gas turbine output constraints, ramping constraints, frequency regulation capacity constraints and cost model; Energy storage operation constraints and cost module 4: Used to construct the charging and discharging power constraints, energy storage battery power constraints, frequency regulation capacity constraints and cost model of the energy storage system based on the energy storage system parameters in the operation parameters; Virtual power plant overall constraint module 5: used to construct virtual power plant overall constraints based on the operating parameters and the aggregated new energy power generation prediction data; Revenue Determination Module 6: Used to determine the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets; to determine the revenue of the virtual power plant participating in the frequency regulation market based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; and to determine the revenue of the virtual power plant participating in demand response based on the predicted price data of the virtual power plant in the primary and secondary markets. Objective function construction module 7: is used to obtain the overall revenue of the virtual power plant in all time periods based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of the virtual power plant participating in the electricity market, the revenue of the virtual power plant participating in the frequency regulation market, and the revenue of the virtual power plant participating in demand response, and to construct a joint optimization objective function to maximize the overall revenue; Solution module 8: Under the premise of satisfying all constraints, it uses a hierarchical solution algorithm based on differential evolution to solve the joint optimization objective function, and obtains the transaction power allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load.
[0075] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0076] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0077] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0078] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0079] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0080] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0081] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0082] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0083] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for joint optimization and control of virtual power plants participating in the primary and secondary markets, characterized in that, The method includes: Acquire forecast data on the generated power of aggregated new energy sources, the power forecast data and adjustable load range data of aggregated loads within the virtual power plant, operating parameters, and forecast price data of the virtual power plant in the primary and secondary markets; Based on the power prediction data of the aggregated load and the adjustable load range data, the operating constraints of the adjustable load are constructed. The operating constraints of the adjustable load include: power adjustment range constraints of transferable load and interruptible load, and load balance constraints. Based on the gas turbine parameters in the operating parameters, the output constraints, ramping constraints, frequency regulation capacity constraints, and cost models of the gas turbine are constructed. Based on the energy storage system parameters in the operating parameters, construct the charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints, and cost model of the energy storage system. The virtual power plant's overall constraints are constructed based on the aforementioned operating parameters and the aggregated new energy power generation prediction data. The revenue of the virtual power plant participating in the electricity market is determined based on the predicted price data of the virtual power plant in the primary and secondary markets; the revenue of the virtual power plant participating in the frequency regulation market is determined based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; the revenue of the virtual power plant participating in demand response is determined based on the predicted price data of the virtual power plant in the primary and secondary markets. Based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of the virtual power plant participating in the electricity market, the revenue of the virtual power plant participating in the frequency regulation market, and the revenue of the virtual power plant participating in demand response, the overall revenue of the virtual power plant in all time periods is obtained, and a joint optimization objective function is constructed to maximize the overall revenue. Under the premise of satisfying all constraints, the joint optimization objective function is solved by a hierarchical solution algorithm based on differential evolution algorithm, so as to obtain the transaction power allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load.
2. The method according to claim 1, characterized in that, The aggregated new energy power generation prediction data in the virtual power plant includes: wind power generation prediction data and photovoltaic power generation prediction data for each time period in the virtual power plant. The power forecast data and adjustable load range data of the aggregated load include: the baseline load forecast data, upper limit and lower limit of transferable load for each time period within the virtual power plant; and the baseline load forecast data and upper limit of interruptible load for each time period within the virtual power plant. The operating parameters include: the average frequency regulation mileage call rate of the virtual power plant, historical comprehensive frequency regulation performance indicators, gas turbine parameters, energy storage system parameters, and the maximum input / output power capacity of the virtual power plant. The gas turbine parameters include: the number of gas turbines, the fixed cost and operating cost of each gas turbine, the start-up and shutdown costs of the gas turbine unit, the upper and lower limits of the output of the gas turbine unit, the upper limit of the ramp rate of the gas turbine unit, and the gas turbine reserve factor. The energy storage system parameters include: the number of energy storage devices, the charging and discharging cost of each energy storage device, the charging and discharging efficiency of each energy storage device, the upper limit of the charging and discharging power of each energy storage device, the upper and lower limits of the battery capacity, the initial battery capacity ratio, and the energy storage reserve coefficient. The predicted price data for the virtual power plant in the primary and secondary markets includes: the predicted electricity sales price and purchase price of the virtual power plant in the electricity market for each time period; the frequency regulation capacity compensation price and frequency regulation mileage compensation price of the virtual power plant in the frequency regulation market for each time period; the transferable load compensation price and interruptible load compensation price of the virtual power plant in the demand response market for each time period; and the electricity price for loads agreed upon by the virtual power plant and users for each time period.
3. The method according to claim 2, characterized in that, The operational constraints for constructing the adjustable load based on the power prediction data and adjustable load range data of the aggregated load include: Based on the baseline load forecast data, upper limit and lower limit of transferable load for each time period in the virtual power plant, the load transfer amount of the virtual power plant in each time period is used as the decision variable. The load transfer amount is within the range of the upper and lower limits of the transferable load, and the total load after the transfer remains unchanged. The actual electricity demand of the transferable load in each time period is calculated, and the power adjustment range constraint of the transferable load is established. Based on the baseline load forecast data of interruptible load in each time period within the virtual power plant and the upper limit of interruptible load, the load reduction amount of the virtual power plant in each time period is used as the decision variable. The load reduction amount is within the range of 0 to the upper limit of interruptible load. The actual power demand of interruptible load in each time period is calculated, and the power adjustment range constraint of interruptible load is established. The actual electricity demand of transferable load and the actual electricity demand of interruptible load in each time period are superimposed to obtain the actual electricity demand of total user load in each time period, and load balance constraints are established.
4. The method according to claim 3, characterized in that, The process of constructing the gas turbine's output constraints, ramp-up constraints, frequency regulation capacity constraints, and cost model based on the gas turbine parameters in the operating parameters includes: Based on the number of gas turbines and the upper and lower limits of the gas turbine unit's output, the state and output of the gas turbine unit at each time period are used as decision variables. The output of the gas turbine unit is within the upper and lower limits of the gas turbine unit's output, and the output constraint of the gas turbine is established. Based on the ramp limit of the gas turbine unit, a ramp constraint for the gas turbine is established so that the output change of the gas turbine in adjacent time periods does not exceed the ramp limit; Based on the gas turbine reserve coefficient, the frequency regulation capacity of any gas turbine in each time period is used as the decision variable. The gas turbine participates in the frequency regulation market according to the remaining electricity outside the electricity market, and the positive reserve capacity is considered. The frequency regulation capacity constraint of the gas turbine is established. A cost model for gas turbines is established based on the number of gas turbines, the fixed cost and operating cost of each gas turbine, and the start-up and shutdown costs of the gas turbine units.
5. The method according to claim 4, characterized in that, The construction of the energy storage system's charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints, and cost model based on the energy storage system parameters in the operating parameters includes: Based on the upper limit of the charging and discharging power of each energy storage device, the charging and discharging status and charging and discharging power of any energy storage device in each time period are used as decision variables. The charging and discharging power is within the range of 0 to the upper limit of the charging and discharging power, and the charging and discharging status of the same energy storage unit in any time period can only be charging or discharging. Thus, the charging and discharging power constraint of the energy storage system is established. Based on the upper and lower limits of battery power and the initial battery power ratio, the energy storage battery power is within the upper and lower limit range, and the energy storage battery power at the end of the period is restored to the initial period power; based on the charging and discharging efficiency of each energy storage device, the energy storage battery power of any energy storage device in each period is obtained, and the battery power constraint of the energy storage system is established. Based on the energy storage reserve coefficient, the frequency regulation capacity of any energy storage device in each time period is used as the decision variable, and the frequency regulation capacity constraint of the energy storage system is established under the condition of reserve. Based on the number of energy storage devices and the charging and discharging cost of each energy storage device, the operating cost of all energy storage devices in each time period is obtained, and a cost model of the energy storage system is established.
6. The method according to claim 5, characterized in that, The overall constraints for constructing the virtual power plant based on the operating parameters and the aggregated new energy power generation prediction data include: Based on the maximum input / output power capacity of the virtual power plant, the power purchase and sale status and power volume of the virtual power plant in each time period are used as decision variables, and the virtual power plant can only purchase or sell power in the power market at any time, thus establishing the power purchase and sale constraint of the virtual power plant. Based on the wind power generation forecast data and photovoltaic power generation forecast data, the number of gas turbines and the number of energy storage devices in the virtual power plant for each time period, the overall power balance constraint of the virtual power plant is established so that the sum of the internal power generation and the external power purchase is equal to the sum of the internal power consumption and the external power sales.
7. The method according to claim 6, characterized in that, The determination of the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets includes: Based on the predicted electricity sales price and purchase price of the virtual power plant in the electricity market at each time period, the revenue of the virtual power plant participating in the electricity market at each time period is determined by subtracting the purchase cost from the electricity sales revenue.
8. The method according to claim 7, characterized in that, The determination of the revenue of virtual power plants participating in the frequency regulation market based on the operating parameters and the predicted price data of virtual power plants in the primary and secondary markets includes: Based on the number of gas turbines, the number of energy storage devices, the frequency regulation capacity of any gas turbine in each time period, and the frequency regulation capacity of any energy storage device in each time period, the total frequency regulation capacity of the virtual power plant in each time period is obtained. Based on the average frequency regulation mileage call rate of the virtual power plant, the historical comprehensive frequency regulation performance index, and the total frequency regulation capacity, the comprehensive frequency regulation mileage of the virtual power plant in each time period is obtained; Based on the frequency regulation capacity compensation price, frequency regulation mileage compensation price, total frequency regulation capacity, and comprehensive frequency regulation mileage of the virtual power plant in the frequency regulation market at different times, the revenue of the virtual power plant participating in the frequency regulation market is obtained by adding the revenue from frequency regulation capacity to the revenue from frequency regulation mileage. The determination of the benefits of virtual power plants participating in demand response based on the predicted price data of the virtual power plants in the primary and secondary markets includes: Based on the transferable load compensation price and interruptible load compensation price of the virtual power plant in the demand response market for each time period, and the load electricity price agreed upon by the virtual power plant and the user for each time period; the revenue of the virtual power plant participating in demand response for each time period is determined by subtracting the load transfer compensation cost and the load interruption compensation cost from the electricity charges collected from the user.
9. The method according to claim 8, characterized in that, The step of solving the joint optimization objective function using a hierarchical solution algorithm based on differential evolution includes: The 0-1 decision variables are encoded using the differential evolution algorithm to obtain the encoding vector for any decision time period; the encoding vectors of all time steps are concatenated in chronological order to obtain the encoding vector for the entire scheduling cycle. Based on the preset population size, an initial population of individuals is randomly generated. Any component of each population individual is randomly generated within the range of 0 to 1, resulting in a continuous encoding vector. Discretize the continuous encoding vector of each individual in the initial population to obtain discrete state variables; Based on the joint optimization objective function and the discrete state variables of the initial population individuals, construct the optimization objective function of the lower-level linear programming model; Substitute each individual in the initial population into the lower-level linear programming model as a boundary condition for solving the model, and use the obtained overall revenue objective function value of the virtual power plant as the fitness value of that individual; if the lower-level linear programming problem has no feasible solution, then assign a preset fitness value to that individual. Initialize the fitness value of the globally optimal individual; Set the maximum number of iterations, and set the mutation operator, crossover probability factor, and selection operator for the population; Perform the following operations on each individual in the initial population in sequence: Mutation operation: Randomly select three different individuals from the initial population, perform differential evolution operation according to the set mutation operation operator, and perform boundary processing to obtain new mutated individuals; Crossover operation: For each individual in the initial population, crossover operation is performed between each individual and its corresponding mutant individual according to the set crossover probability factor to obtain a new experimental individual; Selection operation: Obtain the fitness value of each generated experimental individual, compare the fitness value of the current individual with that of the corresponding experimental individual, and select the individual with the larger fitness value as the corresponding individual in the next generation population; Select the individual with the highest fitness value from all individuals in the current population as the best individual in the present generation; If the fitness value of the current best individual is greater than the fitness value of the recorded global best individual, then the current best individual replaces the global best individual. Repeatedly perform mutation, crossover, and selection operations, and update the global best individual until the maximum number of iterations is reached. The binary code corresponding to the global best individual at this point and the optimal solution of the lower-level linear programming are then used as the final output.
10. A joint optimization and control device for virtual power plants participating in the primary and secondary markets, characterized in that, The device includes: Data acquisition module: used to acquire the predicted power generation data of aggregated new energy sources, the predicted power data of aggregated loads, the adjustable load range data, operating parameters, and the predicted price data of the virtual power plant in the primary and secondary markets; Adjustable load constraint module: used to construct operating constraints for adjustable loads based on the power prediction data of the aggregated loads and the adjustable load range data. The operating constraints for adjustable loads include: power adjustment range constraints for transferable loads and interruptible loads, as well as load balance constraints. Gas turbine operation constraints and cost module: Based on the gas turbine parameters in the operation parameters, construct the gas turbine output constraints, ramping constraints, frequency regulation capacity constraints and cost model; Energy storage operation constraints and cost module: used to construct the charging and discharging power constraints, energy storage battery capacity constraints, frequency regulation capacity constraints and cost model of the energy storage system based on the energy storage system parameters in the operation parameters; Virtual power plant overall constraint module: used to construct virtual power plant overall constraints based on the operating parameters and the aggregated new energy power generation prediction data; Revenue Determination Module: Used to determine the revenue of the virtual power plant participating in the electricity market based on the predicted price data of the virtual power plant in the primary and secondary markets; to determine the revenue of the virtual power plant participating in the frequency regulation market based on the operating parameters and the predicted price data of the virtual power plant in the primary and secondary markets; and to determine the revenue of the virtual power plant participating in demand response based on the predicted price data of the virtual power plant in the primary and secondary markets. Objective function construction module: used to obtain the overall revenue of virtual power plants in all time periods based on the cost model of the gas turbine, the cost model of the energy storage system, the revenue of virtual power plants participating in the electricity market, the revenue of virtual power plants participating in the frequency regulation market, and the revenue of virtual power plants participating in demand response, and to construct a joint optimization objective function to maximize the overall revenue; The solution module is used to solve the joint optimization objective function using a hierarchical solution algorithm based on differential evolution, under the premise of satisfying all constraints, to obtain the transaction electricity allocation results of the virtual power plant in the electricity market and frequency regulation market, the output plan of the gas turbine and energy storage system inside the virtual power plant, and the demand response plan of the adjustable load.