A frequency regulation method for virtual power plant based on balance margin mechanism
Through the method based on the balanced signal-efficient mechanism, the microgrid power data is predicted and the ant colony algorithm is used to optimize the power scheduling, which solves the problem of poor frequency regulation of virtual power plants, and achieves more stable and efficient power resource management.
Patent Information
- Application Number
- CN202411154463.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Virtual power plants are difficult to predict the relationship between distributed energy resources and loads, resulting in poor frequency regulation robustness and poor system stability.
Using a method based on the balanced signal-efficient mechanism, the power data of the microgrid in the next 1 hour is predicted through the DeepAR model, divided into balanced stable and unbalanced stable microgrids, and the power scheduling is optimized using the ant colony algorithm to establish a target optimization function to achieve the effectiveness of power resources. Scheduling.
It improves the stability and reliability of frequency adjustment of virtual power plants, reduces waste of power resources, and improves scheduling response speed and resource utilization.
Smart Images

Figure CN118659412B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of frequency regulation of virtual power plants, and in particular to a frequency regulation method for virtual power plants based on a balance margin mechanism. Background Art
[0002] With the advancement of global energy transformation and the rapid development of renewable energy, traditional power systems face many challenges, such as the instability of power supply and the load pressure of the power grid. As an innovative solution, virtual power plants (VPPs) have gradually attracted widespread attention and application. VPPs integrate distributed energy resources to optimize energy management and scheduling, thereby improving the flexibility and reliability of power systems. However, the frequency regulation of virtual power plants faces some unique challenges. Virtual power plants are composed of multiple distributed energy resources, each of which has independent response capabilities and regulation capabilities. Virtual power plants need to coordinate and operate these resources in a collaborative manner to achieve overall performance optimization and frequency regulation goals; and the frequency regulation of virtual power plants requires effective scheduling strategies and algorithms. At the same time, virtual power plants need to be able to adjust the output power of energy resources according to grid demand and market signals, and need to flexibly control the response degree and adjustment speed of distributed energy resources.
[0003] CN108429280A, a patent document entitled A method and system for controlling wide-area virtual frequency of a passive power grid, comprises: calculating a virtual frequency according to the actual active power, power frequency and preset planned power of a converter station; calculating the required power adjustment of a new energy power station according to the virtual frequency; determining the power adjustment amount of the new energy power station according to the required power adjustment amount and the adjustable power amount of the new energy power station, and controlling each new energy power station to generate electricity according to the adjustment amount. This invention provides a virtual frequency through a substation to reflect the degree of fluctuation of the new energy power station in the sending-end passive power grid that deviates from its plan, and reduces the fluctuation as much as possible, thereby improving the intermittent and volatility problems of wind power and photovoltaic power generation, reducing the pressure on the pumped storage power station to adjust the fluctuation of new energy power, and reducing the adjustment frequency of the pumped storage power station. However, the uncertainty of distributed energy resources and loads is not taken into account, resulting in poor robustness of grid frequency regulation.
[0004] CN114938006A, a patent document entitled "A method and system for controlling grid frequency based on virtual inertia", comprises: obtaining the change value of grid angular frequency; when the grid angular frequency decreases, the DC voltage of the multi-active bridge is reduced based on the DC capacitor of the multi-active bridge of the energy router, active power is injected into the medium-voltage AC port of the power router, and active power is released to the grid, completing the DC voltage control of the multi-active bridge; when the grid angular frequency increases, the DC voltage of the multi-active bridge is increased based on the DC capacitor of the multi-active bridge, the medium-voltage AC port of the power router absorbs active power from the grid, releases the active frequency of the grid, controls the DC voltage of the multi-active bridge through virtual inertia, reduces the rate of increase of the grid angular frequency, and adjusts the grid frequency. The invention improves the frequency characteristics of the grid by simulating the control strategy of virtual inertia; however, it does not take into account the abnormality of the grid frequency, so the stability of the system is poor. Summary of the invention
[0005] The main technical problem solved by the present invention is to provide a virtual power plant frequency regulation method based on a balance margin mechanism, which can solve the problem that the relationship between distributed energy resources and loads cannot be predicted in the future and the virtual power plant cannot make resource scheduling and frequency regulation in advance.
[0006] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a frequency adjustment method of a virtual power plant based on a balance margin mechanism, the method comprising:
[0007] S100: Acquire a microgrid set, microgrid location information, weather conditions, and historical power data, and pre-process the historical power data;
[0008] S200: Based on the historical power data, use the DeepAR model to predict the future power situation of each microgrid to obtain the power data of each microgrid in the next hour;
[0009] S300: Setting a microgrid balance margin mechanism, dividing all microgrids into balanced stable microgrids and unbalanced stable microgrids according to the power data of each microgrid in the next hour, and further dividing the unbalanced stable microgrid into oversupplied microgrids and overloaded microgrids;
[0010] S400: For the unbalanced stable microgrid, a target optimization function is established with the goal of transferring the excess power to the overloaded microgrid with the lowest loss cost;
[0011] S500: using an ant colony algorithm to solve the target optimization function to obtain a regulation strategy for each unbalanced stable microgrid;
[0012] S600: According to the regulation strategies of the respective unbalanced stable microgrids, grid operation constraints are added to obtain a frequency regulation strategy of the virtual power plant;
[0013] The microgrid location information is expressed as: ,in, For the The longitude of the microgrid, For the The latitude of a microgrid;
[0014] The microgrid set is expressed as: ,in, For the Microgrids, is the number of microgrids;
[0015] The historical power data includes: power supply power, power load power, state of energy storage system, charging power and discharging power of energy storage system;
[0016] The power supply power refers to the power generation power of all power generation equipment in the microgrid, including: the power generation power of wind power generation equipment, the power generation power of photovoltaic power generation equipment and the power generation power of micro gas units;
[0017] The electric load power includes the load power of various electrical equipment in life and the charging power of the energy storage system;
[0018] The energy storage system refers to a system that stores electric energy in a microgrid and is composed of several energy storage devices to achieve a balance between power supply and demand within the microgrid and maintain voltage and frequency stability. The energy storage devices include: batteries, fuel cells, electrolytic cells, supercapacitors, and flywheels.
[0019] The states of the energy storage system include: a discharge state and a charge state;
[0020] The preprocessing refers to normalizing the historical power data, removing outliers, and filling missing values.
[0021] Furthermore, the step S200 includes:
[0022] S210: Divide the historical power data of each microgrid into a 70% training set and a 30% test set;
[0023] S220: Build a DeepAR model using an autoregressive recurrent network, specifying the hidden layer dimension, RNN type, number of RNN layers, dropout rate, learning rate, and batch size;
[0024] S230: using a negative log-likelihood loss function as a loss function of the model, using the training set to train the model, and using an Adam optimizer to optimize model parameters;
[0025] S240: Using the trained DeepAR model for each microgrid, using the test set to obtain the probability distribution of the power data of each microgrid in the next hour, using the quantile of the predicted value as the prediction result, and obtaining the power data of each microgrid in the next hour;
[0026] The quantile is the median in the probability distribution;
[0027] The power data of each microgrid for the next hour includes: power supply power, power load power, status of the energy storage system, and charging power and discharging power of the energy storage system.
[0028] Furthermore, the setting of the microgrid balance margin mechanism refers to setting a power balance discriminant of the microgrid, and judging all microgrids according to the power data of each microgrid in the next hour. If the power balance discriminant is satisfied, it is a balanced and stable microgrid, otherwise it is an unbalanced and stable microgrid;
[0029] The power balance discriminant of the microgrid is:
[0030] ;
[0031] ;
[0032] ;
[0033] in, is the lower limit of equilibrium, is the upper limit of balance, is the lower limit coefficient of equilibrium, , is the upper balance coefficient, , For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, For the Power generation equipment The power generation at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of power generation equipment, is the current electrical energy of the energy storage system, is the rated power of the energy storage system;
[0034] The power generation equipment includes: wind power generation equipment, photovoltaic power generation equipment and micro gas generator set;
[0035] The micro gas generator set refers to a power generation group composed of several micro gas generators in a virtual power plant;
[0036] The oversupplied microgrid refers to an unbalanced stable microgrid whose power supply power is greater than the power load power;
[0037] The overloaded microgrid refers to an unbalanced stable microgrid whose power supply power is less than the power load power.
[0038] Furthermore, the S400 includes:
[0039] S410: Establishing a power overload function to calculate the overload power of the microgrid;
[0040] S420: Establishing a power surplus function to calculate the excess power of the microgrid;
[0041] S430: Establishing a power conversion loss function to calculate the dispatching loss power caused by the conversion between voltages during microgrid power dispatching;
[0042] S440: Establish a weather condition index and calculate the stability index of the renewable energy power generation power of the microgrid;
[0043] S450: Establishing a power transmission loss function to calculate the transmission loss power between microgrids as the distance is transmitted;
[0044] S460: Establishing a target optimization function according to the microgrid overload power, excess power, dispatch loss power, stability index and transmission loss power;
[0045] The power overload function is calculated as follows:
[0046] ;
[0047] in, is the power overload function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment;
[0048] The power surplus function is calculated as follows:
[0049] ;
[0050] in, is the power surplus function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment;
[0051] The power conversion loss function is calculated as follows:
[0052] ;
[0053] in, is the power conversion loss function, is the voltage of the microgrid before conversion, is the output voltage of the microgrid after conversion, is the current converted by the microgrid, is the conversion efficiency;
[0054] The weather condition index is calculated based on the weather. When the weather is sunny, the weather condition index is 1.0, and when the weather is other than sunny, the weather condition index is 0.6. The calculation formula is:
[0055] ;
[0056] in, is the weather condition index;
[0057] The power transmission loss function is calculated as follows:
[0058] ;
[0059] in, is the power transmission loss function, is the current converted by the microgrid, is the resistance of the transmission line, is the length of the transmission line between microgrids, is the current speed;
[0060] The objective optimization function is calculated as follows:
[0061] ;
[0062] in, is the target optimization function, and the constraints of the target optimization function include: , ,as well as , is the weight parameter, and , is the length of the transmission line between microgrids, is a distance constant, is the power overload function, is the power surplus function, is the power conversion loss function, is the weather condition index, is the power transmission loss function, For the The maximum power load power of a microgrid, For the The maximum power supply power of a microgrid.
[0063] Furthermore, the S500 includes:
[0064] S510: Initialize the ant colony size, pheromone factor, heuristic function factor, pheromone, volatility factor, pheromone constant, maximum number of iterations, and location information of each microgrid;
[0065] S520: Randomly place ants in different microgrids, and calculate the next microgrid to be visited for each ant, until the updated pheromone table contains all the microgrids visited by the ants;
[0066] S530: Calculate the length of the path that each ant has passed, record the optimal solution in the current iteration number, and update the pheromone concentration on each microgrid connection path;
[0067] S540: Determine whether the maximum number of iterations has been reached. If not, return to step S520. If yes, terminate the program to obtain the regulation strategy of each unbalanced stable microgrid.
[0068] The regulation strategy refers to finding a way to transfer the electric energy of the oversupplied microgrid to the overloaded microgrid with the lowest loss cost.
[0069] Furthermore, the operation constraints refer to adding operation constraints to each device in the virtual power plant to ensure the safe operation of the virtual power plant, including: power balance constraints, micro gas unit operation constraints, energy storage system constraints and interactive power constraints;
[0070] The power balance constraint means that in order to maintain the balance between the power supply power and the power load power in the virtual power plant, it is necessary to constrain the power generation equipment and load equipment in the virtual power plant. The power generation equipment includes wind power generation equipment, photovoltaic power generation equipment and micro gas units. The power balance constraint formula is:
[0071] ;
[0072] in, For the Wind power generation equipment The power generation at the moment, is the number of wind power generation equipment, For the Photovoltaic power generation equipment The power generation at the moment, is the number of photovoltaic power generation equipment, For the Micro gas unit The power generation at the moment, is the number of micro gas units, For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, Virtual Power Plant The interaction power at each moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices;
[0073] The micro gas unit operation constraints include: micro gas unit power generation constraints and micro gas unit power generation ramp constraints;
[0074] The power generation constraint formula of the micro gas turbine unit is:
[0075] ;
[0076] in, For the Micro gas unit The power generation at the moment, They are the lower and upper limits of power generation of the micro gas generator set respectively;
[0077] The power generation ramp constraint formula of the micro gas turbine is:
[0078] ;
[0079] in, For the The power generation ramp rate of the micro gas turbine unit, for Micro gas unit The power generation at the moment, for Micro gas unit The power generation at the time;
[0080] The energy storage system constraint formula is:
[0081] ;
[0082] ;
[0083] in, For energy storage system Energy storage equipment The discharge power at the moment, For energy storage system Maximum discharge power of energy storage equipment, For energy storage system Energy storage equipment Charging power at the moment, For energy storage system Maximum charging power of energy storage equipment;
[0084] The interactive power constraint formula is:
[0085] ;
[0086] in, Virtual Power Plant The interaction power at each moment, They are the lower and upper limits of the interactive power of the virtual power plant respectively.
[0087] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0088] 1. The present invention provides a virtual power plant frequency regulation method based on a balance margin mechanism. The DeepAR model is used to predict the power data of each microgrid in the next hour, which effectively ensures that the virtual power plant can make corresponding power dispatching and control decisions for each microgrid in advance and reduce operation risks.
[0089] 2. The present invention provides a virtual power plant frequency regulation method based on a balance margin mechanism, which determines the balance and stability of each microgrid in the virtual power plant through the balance margin mechanism, thereby ensuring the stability and reliability of the frequency regulation of the virtual power plant system.
[0090] 3. The present invention provides a virtual power plant frequency regulation method based on a balance margin mechanism, which takes into account various factors affecting the scheduling of power resources, establishes a target optimization function, and uses an ant colony algorithm to solve the optimal solution, thereby effectively reducing the waste of power resources and improving the utilization rate of power resources and the scheduling response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 It is a flow chart of a virtual power plant frequency regulation method based on a balance margin mechanism provided by the present invention.
[0092] Figure 2 This is a prediction flow chart of the DeepAR model for a virtual power plant frequency regulation method based on a balance margin mechanism provided by the present invention.
[0093] Figure 3 It is a flow chart of establishing a target optimization function for a virtual power plant frequency regulation method based on a balance margin mechanism provided by the present invention.
[0094] Figure 4 It is a flow chart of an ant colony algorithm solution for a frequency regulation method of a virtual power plant based on a balance margin mechanism provided by the present invention. DETAILED DESCRIPTION
[0095] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0096] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present invention, rather than all of the embodiments.
[0097] See also Figure 1 , Figure 2 , Figure 3 and Figure 4 , the embodiment of the present invention includes:
[0098] like Figure 1 As shown, a flow chart of a frequency regulation method of a virtual power plant based on a balance margin mechanism includes:
[0099] S100: Acquire a microgrid set, microgrid location information, weather conditions, and historical power data, and pre-process the historical power data.
[0100] Furthermore, the microgrid location information is expressed as: ,in, For the The longitude of the microgrid, For the The latitude of a microgrid;
[0101] The microgrid set is expressed as: ,in, For the Microgrids, is the number of microgrids;
[0102] The historical power data includes: power supply power, power load power, state of energy storage system, charging power and discharging power of energy storage system;
[0103] The power supply power refers to the power generation power of all power generation equipment in the microgrid, including: the power generation power of wind power generation equipment, the power generation power of photovoltaic power generation equipment and the power generation power of micro gas units;
[0104] The electric load power includes the load power of various electrical equipment in life and the charging power of the energy storage system;
[0105] The energy storage system refers to a system that stores electric energy in a microgrid and is composed of several energy storage devices to achieve a balance between power supply and demand within the microgrid and maintain voltage and frequency stability. The energy storage devices include: batteries, fuel cells, electrolytic cells, supercapacitors, and flywheels.
[0106] The states of the energy storage system include: a discharge state and a charge state;
[0107] The preprocessing refers to normalizing the historical power data, removing outliers, and filling missing values.
[0108] S200: Based on the historical power data, use the DeepAR model to predict the future power situation of each microgrid to obtain the power data of each microgrid in the next hour.
[0109] Furthermore, if Figure 2 As shown, the S200 includes:
[0110] S210: Divide the historical power data of each microgrid into a 70% training set and a 30% test set;
[0111] S220: Build a DeepAR model using an autoregressive recurrent network, specifying the hidden layer dimension, RNN type, number of RNN layers, dropout rate, learning rate, and batch size;
[0112] S230: using a negative log-likelihood loss function as a loss function of the model, using the training set to train the model, and using an Adam optimizer to optimize model parameters;
[0113] S240: Using the trained DeepAR model for each microgrid, using the test set to obtain the probability distribution of the power data of each microgrid in the next hour, using the quantile of the predicted value as the prediction result, and obtaining the power data of each microgrid in the next hour;
[0114] The quantile is the median in the probability distribution;
[0115] The power data of each microgrid for the next hour includes: power supply power, power load power, status of the energy storage system, and charging power and discharging power of the energy storage system.
[0116] S300: Setting a microgrid balance margin mechanism, dividing all microgrids into balanced stable microgrids and unbalanced stable microgrids according to the power data of each microgrid in the next hour, and further dividing the unbalanced stable microgrid into oversupplied microgrids and overloaded microgrids.
[0117] Furthermore, the setting of the microgrid balance margin mechanism refers to setting a power balance discriminant of the microgrid, and judging all microgrids according to the power data of each microgrid in the next hour. If the power balance discriminant is satisfied, it is a balanced and stable microgrid, otherwise it is an unbalanced and stable microgrid;
[0118] The power balance discriminant of the microgrid is:
[0119] ;
[0120] ;
[0121] ;
[0122] in, is the lower limit of equilibrium, is the upper limit of balance, is the lower limit coefficient of equilibrium, , is the upper balance coefficient, , For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, For the Power generation equipment The power generation at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of power generation equipment, is the current electrical energy of the energy storage system, is the rated power of the energy storage system;
[0123] The power generation equipment includes: wind power generation equipment, photovoltaic power generation equipment and micro gas generator set;
[0124] The micro gas generator set refers to a power generation group composed of several micro gas generators in a virtual power plant;
[0125] The oversupplied microgrid refers to an unbalanced stable microgrid whose power supply power is greater than the power load power;
[0126] The overloaded microgrid refers to an unbalanced stable microgrid whose power supply power is less than the power load power.
[0127] S400: For the unbalanced stable microgrid, a target optimization function is established with the goal of transferring the oversupplied electric energy to the overloaded microgrid with the lowest loss cost.
[0128] Furthermore, if Figure 3 As shown, the S400 includes:
[0129] S410: Establishing a power overload function to calculate the overload power of the microgrid;
[0130] S420: Establishing a power surplus function to calculate the excess power of the microgrid;
[0131] S430: Establishing a power conversion loss function to calculate the dispatching loss power caused by the conversion between voltages during microgrid power dispatching;
[0132] S440: Establish a weather condition index and calculate the stability index of the renewable energy power generation power of the microgrid;
[0133] S450: Establishing a power transmission loss function to calculate the transmission loss power between microgrids as the distance is transmitted;
[0134] S460: Establishing a target optimization function according to the microgrid overload power, excess power, dispatch loss power, stability index and transmission loss power;
[0135] The power overload function is calculated as follows:
[0136] ;
[0137] in, is the power overload function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment;
[0138] The power surplus function is calculated as follows:
[0139] ;
[0140] in, is the power surplus function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment;
[0141] The power conversion loss function is calculated as follows:
[0142] ;
[0143] in, is the power conversion loss function, is the voltage of the microgrid before conversion, is the output voltage of the microgrid after conversion, is the current converted by the microgrid, is the conversion efficiency;
[0144] The weather condition index is calculated based on the weather. When the weather is sunny, the weather condition index is 1.0, and when the weather is other than sunny, the weather condition index is 0.6. The calculation formula is:
[0145] ;
[0146] in, is the weather condition index;
[0147] The power transmission loss function is calculated as follows:
[0148] ;
[0149] in, is the power transmission loss function, is the current converted by the microgrid, is the resistance of the transmission line, is the length of the transmission line between microgrids, is the current speed;
[0150] The objective optimization function is calculated as follows:
[0151] ;
[0152] in, is the target optimization function, and the constraints of the target optimization function include: , ,as well as , is the weight parameter, and , is the length of the transmission line between microgrids, is a distance constant, is the power overload function, is the power surplus function, is the power conversion loss function, is the weather condition index, is the power transmission loss function, For the The maximum power load power of a microgrid, For the The maximum power supply power of a microgrid.
[0153] S500: using an ant colony algorithm to solve the target optimization function to obtain a regulation strategy for each unbalanced stable microgrid.
[0154] Furthermore, if Figure 4 As shown, the S500 includes:
[0155] S510: Initialize the ant colony size, pheromone factor, heuristic function factor, pheromone, volatility factor, pheromone constant, maximum number of iterations, and location information of each microgrid;
[0156] S520: Randomly place ants in different microgrids, and calculate the next microgrid to be visited for each ant, until the updated pheromone table contains all the microgrids visited by the ants;
[0157] S530: Calculate the length of the path that each ant has passed, record the optimal solution in the current iteration number, and update the pheromone concentration on each microgrid connection path;
[0158] S540: Determine whether the maximum number of iterations has been reached. If not, return to step S520. If yes, terminate the program to obtain the regulation strategy of each unbalanced stable microgrid.
[0159] The regulation strategy refers to finding a way to transfer the electric energy of the oversupplied microgrid to the overloaded microgrid with the lowest loss cost.
[0160] S600: According to the regulation strategies of the various unbalanced stable microgrids, grid operation constraints are added to obtain a frequency regulation strategy for the virtual power plant.
[0161] Furthermore, the operation constraints refer to adding operation constraints to each device in the virtual power plant to ensure the safe operation of the virtual power plant, including: power balance constraints, micro gas unit operation constraints, energy storage system constraints and interactive power constraints;
[0162] The power balance constraint means that in order to maintain the balance between the power supply power and the power load power in the virtual power plant, it is necessary to constrain the power generation equipment and load equipment in the virtual power plant. The power generation equipment includes wind power generation equipment, photovoltaic power generation equipment and micro gas units. The power balance constraint formula is:
[0163] ;
[0164] in, For the Wind power generation equipment The power generation at the moment, is the number of wind power generation equipment, For the Photovoltaic power generation equipment The power generation at the moment, is the number of photovoltaic power generation equipment, For the Micro gas unit The power generation at the moment, is the number of micro gas units, For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, Virtual Power Plant The interaction power at each moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices;
[0165] The micro gas unit operation constraints include: micro gas unit power generation constraints and micro gas unit power generation ramp constraints;
[0166] The power generation constraint formula of the micro gas turbine unit is:
[0167] ;
[0168] in, For the Micro gas unit The power generation at the moment, They are the lower and upper limits of power generation of the micro gas generator set respectively;
[0169] The power generation ramp constraint formula of the micro gas turbine is:
[0170] ;
[0171] in, For the The power generation ramp rate of the micro gas turbine unit, for Micro gas unit The power generation at the moment, for Micro gas unit The power generation at the time;
[0172] The energy storage system constraint formula is:
[0173] ;
[0174] ;
[0175] in, For energy storage system Energy storage equipment The discharge power at the moment, For energy storage system Maximum discharge power of energy storage equipment, For energy storage system Energy storage equipment Charging power at the moment, For energy storage system Maximum charging power of energy storage equipment;
[0176] The interactive power constraint formula is:
[0177] ;
[0178] in, Virtual Power Plant The interaction power at each moment, They are the lower and upper limits of the interactive power of the virtual power plant respectively.
[0179] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A frequency regulation method for a virtual power plant based on a balance margin mechanism, characterized in that: include: S100: Acquire a microgrid set, microgrid location information, weather conditions, and historical power data, and pre-process the historical power data; S200: Based on the historical power data, use the DeepAR model to predict the future power situation of each microgrid to obtain the power data of each microgrid in the next hour; S300: Setting a microgrid balance margin mechanism, dividing all microgrids into balanced stable microgrids and unbalanced stable microgrids according to the power data of each microgrid in the next hour, and further dividing the unbalanced stable microgrid into oversupplied microgrids and overloaded microgrids; S400: For the unbalanced stable microgrid, a target optimization function is established with the goal of transferring the excess power to the overloaded microgrid with the lowest loss cost; S500: using an ant colony algorithm to solve the target optimization function to obtain a regulation strategy for each unbalanced stable microgrid; S600: According to the regulation strategies of the respective unbalanced stable microgrids, grid operation constraints are added to obtain a frequency regulation strategy of the virtual power plant; The microgrid location information is expressed as: ,in, For the The longitude of the microgrid, For the The latitude of a microgrid; The microgrid set is expressed as: ,in, For the Microgrids, is the number of microgrids; The historical power data includes: power supply power, power load power, state of energy storage system, charging power and discharging power of energy storage system; The power supply power refers to the power generation power of all power generation equipment in the microgrid, including: the power generation power of wind power generation equipment, the power generation power of photovoltaic power generation equipment and the power generation power of micro gas units; The electric load power includes the load power of various electrical equipment in life and the charging power of the energy storage system; The energy storage system refers to a system that stores electric energy in a microgrid and is composed of several energy storage devices to achieve a balance between power supply and demand within the microgrid and maintain voltage and frequency stability. The energy storage devices include: batteries, fuel cells, electrolytic cells, supercapacitors, and flywheels. The states of the energy storage system include: a discharge state and a charge state; The preprocessing refers to normalizing the historical power data, removing outliers, and filling missing values; The setting of the microgrid balance margin mechanism refers to setting the power balance discriminant of the microgrid, and judging all microgrids according to the power data of each microgrid in the next one hour. If the power balance discriminant is satisfied, it is a balanced and stable microgrid, otherwise it is an unbalanced and stable microgrid; The power balance discriminant of the microgrid is: ; ; ; in, is the lower limit of equilibrium, is the upper limit of balance, is the lower limit coefficient of equilibrium, , is the upper balance coefficient, , For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, For the Power generation equipment The power generation at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of power generation equipment, is the current electrical energy of the energy storage system, is the rated power of the energy storage system; The power generation equipment includes: wind power generation equipment, photovoltaic power generation equipment and micro gas generator set; The micro gas generator set refers to a power generation group composed of several micro gas generators in a virtual power plant; The oversupplied microgrid refers to an unbalanced stable microgrid whose power supply power is greater than the power load power; The overloaded microgrid refers to an unbalanced stable microgrid whose power supply power is less than the power load power.
2. A virtual power plant frequency regulation method based on a balance margin mechanism as claimed in claim 1, characterized in that: The S200 includes: S210: Divide the historical power data of each microgrid into a 70% training set and a 30% test set; S220: Build a DeepAR model using an autoregressive recurrent network, specifying the hidden layer dimension, RNN type, number of RNN layers, dropout rate, learning rate, and batch size; S230: using a negative log-likelihood loss function as a loss function of the model, using the training set to train the model, and using an Adam optimizer to optimize model parameters; S240: Using the trained DeepAR model for each microgrid, using the test set to obtain the probability distribution of the power data of each microgrid in the next hour, using the quantile of the predicted value as the prediction result, and obtaining the power data of each microgrid in the next hour; The quantile is the median in the probability distribution; The power data of each microgrid for the next hour includes: power supply power, power load power, status of the energy storage system, and charging power and discharging power of the energy storage system.
3. A virtual power plant frequency regulation method based on a balance margin mechanism as claimed in claim 1, characterized in that: The S400 includes: S410: Establishing a power overload function to calculate the overload power of the microgrid; S420: Establishing a power surplus function to calculate the excess power of the microgrid; S430: Establishing a power conversion loss function to calculate the dispatching loss power caused by the conversion between voltages during microgrid power dispatching; S440: Establish a weather condition index and calculate the stability index of the renewable energy power generation power of the microgrid; S450: Establishing a power transmission loss function to calculate the transmission loss power between microgrids as the distance is transmitted; S460: Establishing a target optimization function according to the microgrid overload power, excess power, dispatch loss power, stability index and transmission loss power; The power overload function is calculated as follows: ; in, is the power overload function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment; The power surplus function is calculated as follows: ; in, is the power surplus function, For the Power generation equipment The power generation at the moment, For energy storage system Energy storage equipment The discharge power at the moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices, is the number of energy storage devices in the energy storage system, is the number of power generation equipment; The power conversion loss function is calculated as follows: ; in, is the power conversion loss function, is the voltage of the microgrid before conversion, is the output voltage of the microgrid after conversion, is the current converted by the microgrid, is the conversion efficiency; The weather condition index is calculated based on the weather. When the weather is sunny, the weather condition index is 1.0, and when the weather is other than sunny, the weather condition index is 0.
6. The calculation formula is: ; in, is the weather condition index; The power transmission loss function is calculated as follows: ; in, is the power transmission loss function, is the current converted by the microgrid, is the resistance of the transmission line, is the length of the transmission line between microgrids, is the current speed; The target optimization function is calculated as follows: ; in, is the target optimization function, and the constraints of the target optimization function include: , ,as well as , is the weight parameter, and , is the length of the transmission line between microgrids, is a distance constant, is the power overload function, is the power surplus function, is the power conversion loss function, is the weather condition index, is the power transmission loss function, For the The maximum power load power of a microgrid, For the The maximum power supply power of a microgrid.
4. A virtual power plant frequency regulation method based on a balance margin mechanism as claimed in claim 1, characterized in that: The S500 comprises: S510: Initialize the ant colony size, pheromone factor, heuristic function factor, pheromone, volatility factor, pheromone constant, maximum number of iterations, and location information of each microgrid; S520: Randomly place ants in different microgrids, and calculate the next microgrid to be visited for each ant, until the updated pheromone table contains all the microgrids visited by the ants; S530: Calculate the length of the path that each ant has passed, record the optimal solution in the current iteration number, and update the pheromone concentration on each microgrid connection path; S540: Determine whether the maximum number of iterations has been reached. If not, return to step S520. If yes, terminate the program to obtain the regulation strategy of each unbalanced stable microgrid. The regulation strategy refers to finding a way to transfer the electric energy of the oversupplied microgrid to the overloaded microgrid with the lowest loss cost.
5. A virtual power plant frequency regulation method based on a balance margin mechanism as claimed in claim 1, characterized in that: The operation constraints refer to adding operation constraints to each device in the virtual power plant to ensure the safe operation of the virtual power plant, including: power balance constraints, micro gas unit operation constraints, energy storage system constraints and interactive power constraints; The power balance constraint means that in order to maintain the balance between the power supply power and the power load power in the virtual power plant, it is necessary to constrain the power generation equipment and load equipment in the virtual power plant. The power generation equipment includes wind power generation equipment, photovoltaic power generation equipment and micro gas units. The power balance constraint formula is: ; in, For the Wind power generation equipment The power generation at the moment, is the number of wind power generation equipment, For the Photovoltaic power generation equipment The power generation at the moment, is the number of photovoltaic power generation equipment, For the Micro gas unit The power generation at the moment, is the number of micro gas units, For energy storage system Energy storage equipment The discharge power at the moment, is the number of energy storage devices in the energy storage system, Virtual Power Plant The interaction power at each moment, For the Load equipment The load power at each moment, including the load power of various electrical equipment in life and the charging power of the energy storage system, is the number of load devices; The micro gas unit operation constraints include: micro gas unit power generation constraints and micro gas unit power generation ramp constraints; The power generation constraint formula of the micro gas turbine unit is: ; in, For the Micro gas unit The power generation at the moment, They are the lower and upper limits of power generation of the micro gas generator set respectively; The power generation ramp constraint formula of the micro gas turbine is: ; in, For the The power generation ramp rate of the micro gas turbine unit, for Micro gas unit The power generation at the moment, for Micro gas unit The power generation at the time; The energy storage system constraint formula is: ; ; in, For energy storage system Energy storage equipment The discharge power at the moment, For energy storage system Maximum discharge power of energy storage equipment, For energy storage system Energy storage equipment Charging power at the moment, For energy storage system Maximum charging power of energy storage equipment; The interactive power constraint formula is: ; in, Virtual Power Plant The interaction power at each moment, are the lower and upper limits of the interactive power of the virtual power plant respectively.
