A method and system for optimizing energy management of interconnected microgrids
Through data-driven training networks, the optimal control strategy for supply and demand balance between interconnected microgrids is solved, and the problem of supply and demand imbalance between internal microgrids is reduced, cost and resource waste is reduced, and system stability is improved.
Patent Information
- Application Number
- CN202210445729.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-04-26
AI Technical Summary
The problem of unbalanced supply and demand within the microgrid leads to wasting resources when the power generation is surplus, and the load demand is difficult to meet when the power generation is short, causing bad experiences to users.
Through data-driven training networks, the network can gradually learn the optimal control strategy to achieve supply and demand balance between interconnected microgrids, avoiding resource waste. Specific steps include classifying microgrid equipment, configuring a cost function, inputting a state vector to the power control network and cost estimating network, outputting a power control vector and the expected value of the accumulated cost, performing scheduling and parameter updates.
The supply and demand balance of the interconnected microgrid is achieved, which reduces the cost required to achieve supply and demand balance, avoids resource waste, and improves the stability of the system.
Smart Images

Figure CN114792974B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and system for optimizing energy management of an interconnected microgrid, and belongs to the technical field of microgrid power dispatching. Background Art
[0002] With the depletion of fossil fuels and the increasingly serious environmental pollution problems, the use of renewable energy sources such as solar energy and wind energy has received widespread attention. In recent years, microgrids have been widely adopted and deployed in modern power systems. Microgrids refer to small-scale power generation and distribution systems composed of renewable energy power generation equipment, energy storage devices, loads, power conversion devices, monitoring and protection devices, etc. Although renewable energy generation has the advantages of environmental friendliness and sustainable utilization, its power generation is subject to environmental factors and has the disadvantages of volatility and randomness. Coupled with the uncertainty of loads, it is easy to cause an imbalance between supply and demand within the microgrid. When there is surplus power generation, resources will be abandoned, which will also threaten the safety of the microgrid. When there is a shortage of power generation, the demand for loads is difficult to meet, which will cause a bad experience for users.
[0003] Microgrid energy management is to adapt to the randomness of renewable energy generation and load, adjust the power of power-controllable devices, and optimize operating costs while achieving supply and demand balance. In previous studies, most of them focused on a single microgrid, which required complex modeling of the microgrid and relied on accurate prediction of renewable energy generation. However, the types of equipment in a single microgrid may not be perfect, and the ability to achieve internal balance is limited. There are few studies on the joint economic dispatch of interconnected microgrids composed of multiple microgrids connected in a certain topological relationship. At the same time, relying on accurate predictions will not only waste a lot of computing power, but also make it difficult to guarantee the accuracy and stability of predictions in actual operations. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method and system for optimizing energy management of interconnected microgrids, which does not require the establishment of complex physical models. The network is trained with data as the driving force, so that the network gradually learns the optimal control strategy for achieving supply and demand balance of interconnected microgrids at the lowest cost, thereby avoiding waste of resources.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] In a first aspect, the present invention provides a method for optimizing energy management of an interconnected microgrid, the method comprising the following steps:
[0007] Step 1: Classify the devices in the microgrid into power-uncontrollable devices and power-controllable devices; obtain the topology of the interconnected microgrid according to the geographical distribution and interconnection of the microgrids, set the number of rounds of optimization management within a day, and initialize the network parameters;
[0008] Step 2: Construct a cost function for energy optimization management of interconnected microgrids according to the characteristics of different devices in the microgrid;
[0009] Step 3: According to the historical data of the power uncontrollable devices and the current operating status of the power controllable devices, the state vector of the interconnected microgrid in the current round is expressed;
[0010] Step 4: Input the state vector into the power control network and the cost estimation network; the power control network outputs a power control vector for controlling the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required to perform multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day;
[0011] Step 5: According to the topological structure of the interconnected microgrid, the unbalanced power in the microgrid is dispatched between the microgrids to achieve power balance of the entire interconnected microgrid;
[0012] Step 6: At the end of this round of optimization management, the real cost of this round of energy optimization management is calculated according to the cost function, and the next round is entered. At the end of the day, the parameters of the power control network and the cost estimation network are updated according to the difference between the real accumulated cost of each round and the expected value estimated by the cost estimation network.
[0013] Furthermore, the devices in the microgrid are classified into power uncontrollable devices and power controllable devices; according to the geographical distribution and interconnection of the microgrids, the topological structure of the interconnected microgrids is obtained, the number of rounds of optimization management in a day is set, and the network parameters are initialized, including the following steps:
[0014] Step 1-1: The system obtains the status of the equipment in the interconnected microgrid and classifies it. The components contained in each microgrid include: photovoltaic power generation equipment, wind power generation equipment, diesel generator, micro gas turbine, energy storage equipment and load, which are respectively recorded as PV, WTG, DEG, MT, ESS, Load; among them, photovoltaic power generation equipment and wind power generation equipment are power generation equipment with uncontrollable power, and load is power consumption equipment with uncontrollable power. Accordingly, the power uncontrollable equipment set is recorded as U = {PV, WTG, Load}; diesel generator and micro gas turbine are power controllable power generation equipment, and energy storage equipment is charge and discharge power controllable equipment. Accordingly, the power controllable equipment set is recorded as Q = {DEG, MT, ESS};
[0015] Step 1-2: Construct an interconnected microgrid topology graph G(V, E) based on the geographical distribution of the microgrids and their interconnection; N microgrids are represented by the node set V = {1, 2, ..., N}, and the power lines between the microgrids are represented by the edge set E = {(1, 2), ..., (a, b), ...}; the i-th microgrid in the interconnected microgrid is MG i ;
[0016] Step 1-3: Divide a day [0, 24h] into K time slots, perform a round of energy optimization management in each time slot, and the time step is Δt = 24h / K; the kth time slot is [kΔt, (k+1)Δt]; at the start time kΔt of the kth time slot, execute the control and scheduling scheme on the interconnected microgrid until the end time (k+1)Δt; at the same time, the end time of the kth time slot is also the start time of the k+1th time slot;
[0017] Step 1-4: Parameters θ of the power control network and the yield estimation network u ,θ v Random initialization.
[0018] Furthermore, according to the characteristics of different devices in the microgrid, the method of constructing a cost function for energy optimization management of an interconnected microgrid includes:
[0019] The cost function of the k-th round of interconnected microgrid energy optimization management is: Where, subscript k is the kth round of optimization management, are the power generation costs of DEG and MT respectively, is the loss cost of the energy storage equipment, is the loss cost of power transmission between microgrids, is the cost of trading with the main grid.
[0020] Furthermore, according to the historical data of the power uncontrollable devices and the current operating status of the power controllable devices, the state vector of the interconnected microgrid in the current round is represented, including:
[0021] Step 3-1: For example, the power of uncontrollable devices such as photovoltaic power generation is random and volatile. The average value of its real historical data in the past seven days is used to approximate the state of the day; the real data of the kth time slot of the uncontrollable power devices in the interconnected microgrid in the past mth day is expressed as vector It indicates that, MG i The photovoltaic power generation, wind power generation, and load power at the kth time slot on the mth day in the past; therefore, the state of the power uncontrollable device at the kth time slot can be approximately expressed as:
[0022] Step 3-2: The state of charge of the energy storage device in the interconnected microgrid at the initial time of the kth time slot can be expressed as a vector: in, SOC i,k For MG i The state of charge of the energy storage device at the initial time of the kth time slot, η i , Q i are the charge and discharge coefficient and battery capacity respectively, For MG i The charging and discharging power of the energy storage device in the k-1th time slot;
[0023] Step 3-3: Denote the state vector of the interconnected microgrid at the initial time of the kth time slot as z k =[kΔt,e k ,s k ].
[0024] Further, inputting the state vector into a power control network and a cost estimation network includes:
[0025] Step 4-1: Construct a power control network that implements the state vector z of the interconnected microgrid k The power control vector u k Mapping
[0026] Power Control Vector
[0027] in For MG i The power of the power controllable device q in the kth time slot is The standardized value of They are The minimum and maximum power values allowed within a safe range.
[0028] Step 4-2: The system is based on the state of the interconnected microgrid k And the mapping relationship The cumulative cost of multiple rounds of energy optimization management until the end of the day is c t+k is the cost of energy optimization management in the k+t round; due to the randomness and mapping relationship of the power of uncontrollable devices The uncertainty of In the formula is the mathematical expectation, which is the expected value of the cumulative cost and serves as a baseline for measuring the quality of a round of control signal selection. If G(z k )-V π (z k) is a positive value, which means that the control effect is better than the average value, and the probability of this mapping is increased in the last network update, otherwise it is reduced;
[0029] Step 4-3: Construct a cost estimation module, which completes the state vector z of the interconnected microgrid t Towards The mapping of
[0030] is the cost function V in step 4-2 π (z k ) is the estimated value; the output layer of the cost estimation module is V(z k )=W v f3+b v , the overall parameter of the cost estimation module is recorded as θ v .
[0031] Furthermore, the power control network includes a 4-layer structure:
[0032] The first layer is the input layer, and the input is the state vector z of the interconnected microgrid k , denoted as f1=z k ;
[0033] The second and third layers are processing layers, denoted by f l =max(W l f l-1 +b l ,0),W l , b l are the weight matrix and bias vector of the lth layer, l = 2, 3;
[0034] The fourth layer is the output layer, which is divided into two parts, and the dimensions of the two parts are the same as the control signal vector u k The same, respectively μ t =tanh(W μ f3+b μ ), σ t =softplus(W σ f3+b σ ), in μ t As the mean vector, σ t As the standard deviation vector, we can get a multidimensional Gaussian distribution Control signal u k Can, by Sampling shows that the value range of the sigmoid function is between 0 and 1, so the value of the elements in the control vector is between 0 and 1;
[0035] In the above formula, tanh is the hyperbolic tangent function, softplus(x)=log(1+e x),sigmoid(x)=1 / (1+e -x );W l , W μ , W σ are weight matrices, b l , b μ , b σ are all bias vectors, and the above parameters of the power control module are recorded as θ u .
[0036] Furthermore, according to the topological structure of the interconnected microgrid, the unbalanced power in the microgrid is dispatched between the microgrids to achieve power balance of the entire interconnected microgrid, including:
[0037] Dispatch unbalanced power between microgrids, and use the main grid as a coordinator to sell or purchase power from the main grid;
[0038] If the microgrid MG i Connected to the main grid, then record MG i The power transmitted between the main grid is and If MG i Not connected to the mains, then Remember MG i To MG j (i<j) The transmitted power is P i→j With P j→i The relationship can be expressed as: in, For MG i To MG j The transmission power loss, r (i,j) 、V (i,j) For MG i and MG j the resistance and voltage of the power lines between them;
[0039] Step 5-2: MG i The unbalanced power that still exists in the can be expressed as: Therefore, after optimized scheduling, each microgrid should meet the power balance: In the above formula, ∑ (i,j)∈E P i→j Represents connection to MG i The sum of the power on all power lines on the interconnected microgrid indicates that MG i The sum of the power traded with other microgrids; the interconnected microgrid should meet the power balance: Therefore, in order to minimize the power loss in transmission scheduling, the interconnected microgrid optimization scheduling problem can be transformed into a convex optimization problem:
[0040]
[0041] st(*)(1)(2)
[0042] In the formula, ρ buy , sell are the prices of purchasing and selling unit power from the main grid respectively. After solving, we can get and {P i→j} (i,j)∈E , completing the optimal dispatch of electricity.
[0043] Furthermore, according to the difference between the actual accumulated cost of each round and the expected value estimated by the cost estimation network, the parameters of the power control network and the cost estimation network are updated, including:
[0044] Calculate the cost c of this round of interconnected microgrid optimization management k , enter the next round of optimization management;
[0045] The loss function of the power control module is The loss function of the cost estimation module is
[0046] At the end of the day, the operation trajectory of the interconnected microgrid can be obtained Then the cumulative cost C(z k ), update the parameters of the power control module:
[0047] Update the parameters of the cost estimation module: Enter the next day's optimization management.
[0048] In a second aspect, the present invention provides an interconnected microgrid energy optimization management system, the system comprising:
[0049] Classification module: used to classify the devices in the microgrid into power-uncontrollable devices and power-controllable devices; according to the geographical distribution and interconnection of the microgrids, the topology of the interconnected microgrids is obtained, the number of rounds of optimization management in a day is set, and the network parameters are initialized;
[0050] Cost function module: used to construct a cost function for energy optimization management of an interconnected microgrid according to the characteristics of different devices in the microgrid;
[0051] State vector module: used to represent the state vector of the interconnected microgrid in the current round based on the historical data of the power uncontrollable devices and the current operating status of the power controllable devices;
[0052] Power cost module: used to input the state vector into the power control network and the cost estimation network; the power control network outputs a power control vector for controlling the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required for multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day;
[0053] Scheduling module: used to dispatch the unbalanced power in the microgrid between microgrids according to the topological structure of the interconnected microgrid, so as to achieve power balance of the entire interconnected microgrid;
[0054] Update module: used to calculate the real cost of this round of energy optimization management according to the cost function at the end of this round of optimization management, and enter the next round. At the end of the day, the parameters of the power control network and the cost estimation network are updated according to the difference between the real accumulated cost of each round and the expected value estimated by the cost estimation network.
[0055] In a third aspect, the present application provides an interconnected microgrid energy optimization management system, including a processor and a storage medium;
[0056] The storage medium is used to store instructions;
[0057] The processor is used to operate according to the instructions to execute the steps of the method described in the first aspect.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] 1. The present invention proposes a method and system for optimizing energy management of interconnected microgrids. With the depletion of fossil fuels and the increasing severity of environmental pollution problems, the use of renewable energy sources such as solar energy and wind energy has received widespread attention. In recent years, microgrids have been widely adopted and deployed in modern power systems. Microgrids refer to small-scale power generation and distribution systems composed of renewable energy power generation equipment, energy storage devices, loads, power conversion devices, monitoring and protection devices, etc. Although renewable energy power generation has the advantages of environmental friendliness and sustainable utilization, its power generation is subject to environmental factors and has the disadvantages of volatility and randomness. Coupled with the uncertainty of loads, it is easy to have an imbalance between supply and demand within the microgrid. When there is surplus power generation, resources will be wasted, and it will also pose a threat to the safety of the microgrid. When there is a shortage of power generation, the load demand is difficult to meet, resulting in a bad experience for users.
[0060] 2. In actual operation, at the beginning, the network parameters are randomly set, the control effect of the control signal output by the power control network is not ideal, and the cost estimation network's estimate of the mean cost is not accurate. The two networks are trained with historical data, so that the network parameters gradually stabilize during training, the power control network gradually learns the optimal mapping from the state of the interconnected microgrid to the power control vector, and the cost estimation network's estimate of the cumulative mean cost is more accurate. In addition, there is no need to use predicted data in the network's input data, which overcomes the reliance of traditional methods on predicted data.
[0061] 3. After the control signal is formed, the supply and demand balance of the interconnected microgrids is achieved by optimizing the scheduling between the microgrids according to the topological structure of the interconnected microgrids, and the cost function is calculated after the optimization scheduling is completed. The cost function comprehensively considers the transmission loss, the loss of the energy storage equipment, the power generation cost and the cost of trading with the main grid. Compared with the energy management of each microgrid separately, it has better system stability and further reduces the cost required to achieve supply and demand balance. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is the overall structure diagram of the system of the present invention. DETAILED DESCRIPTION
[0063] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0064] Embodiment 1:
[0065] This embodiment provides a method and system for optimizing energy management of interconnected microgrids. The method includes five steps:
[0066] In the first step, the devices in the microgrid are divided into power controllable devices and power uncontrollable devices, a cost function for energy optimization management of the interconnected microgrid is constructed, the system is initialized, and parameters are set.
[0067] In the second step, the state vector of the interconnected microgrid is represented according to the state of the power controllable devices and the historical data of the power uncontrollable devices.
[0068] In the third step, the state vector of the interconnected microgrid is input into the power control network and the cost estimation network. The power control network outputs a power control vector, which is used to control the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required to perform multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day.
[0069] The fourth step is to dispatch the still unbalanced power in the microgrid according to the topological structure of the interconnected microgrid to achieve power balance of the entire interconnected microgrid and enter the next round of optimization management.
[0070] The fifth step is to update the parameters of the power control network and the cost estimation network at the end of the day based on the gap between the actual accumulated cost of each round of energy optimization management and the expected value estimated by the cost estimation network, and enter the next day's optimization management.
[0071] In a round of interconnected microgrid energy optimization management, the system manager obtains the state vector z of each microgrid k , using the power control vector u k Adjust the power of power-controllable devices to Determine the power traded between each microgrid and the main grid, and then use {P i→j} (i,j)∈E Determine the power transmitted between microgrids to achieve the supply and demand balance of interconnected microgrids. At the end of the day, based on the gap between the actual cumulative cost of each round of optimization management and the expected value estimated by the cost estimation network, update the network parameters so that the power control network learns the optimal mapping, with the goal of minimizing the cost to achieve the supply and demand balance of interconnected microgrids, and regulate the power of various power controllable devices. The specific operation process is as follows:
[0072] Step 1: Classify the devices in the microgrid into power uncontrollable devices and power controllable devices. Obtain the topology of the interconnected microgrid, set the number of rounds of optimization management within a day, and initialize the network parameters.
[0073] Step 1-1: The system obtains the status of the equipment in the interconnected microgrid and classifies it. Without loss of generality, it is assumed that each microgrid may contain the following components: photovoltaic power generation equipment, wind power generation equipment, diesel generator, micro gas turbine, energy storage equipment and load, which are respectively denoted as PV, WTG, DEG, MT, ESS, and Load. Among them, photovoltaic power generation equipment and wind power generation equipment are power generation equipment with uncontrollable power, and load is power consumption equipment with uncontrollable power. Accordingly, the power uncontrollable equipment set is denoted as U = {PV, WTG, Load}; diesel generator and micro gas turbine are power controllable power generation equipment, and energy storage equipment is charge and discharge power controllable equipment. Accordingly, the power controllable equipment set is denoted as Q = {DEG, MT, ESS}.
[0074] Step 1-2: Construct the interconnected microgrid topology graph G(V, E) based on the geographical distribution of the microgrids and their interconnection. The N microgrids are represented by the node set V = {1, 2, ..., N}, and the power lines between the microgrids are represented by the edge set E = {(1, 2), ..., (a, b), ...}. The i-th microgrid in the interconnected microgrid is MG i .
[0075] Step 1-3: Divide a day [0, 24h] into K time slots, and perform a round of energy optimization management in each time slot, with a time step of Δt = 24h / K. For example, the kth time slot is [kΔt, (k+1)Δt]. The control and scheduling scheme is executed on the interconnected microgrid at the start time kΔt of the kth time slot, and lasts until the end time (k+1)Δt. At the same time, the end time of the kth time slot is also the start time of the k+1th time slot.
[0076] In steps 1-3, a day is divided into k time slots, and each time slot undergoes a round of optimization management. For example, we divide it into 24 time slots, then each time slot is 1 hour, and a round of optimization management is performed every hour. Entering the next round of optimization management means entering the optimization management of the next hour. Step 5 is to update the network parameters at the end of the day, that is, the network parameters are updated after 24 rounds of optimization management are completed.
[0077] Step 1-4: Parameters θ of the power control module and the benefit estimation module u ,θ v Random initialization.
[0078] Step 2: Construct a cost function for energy optimization management of interconnected microgrids. The cost function for energy optimization management of the kth round of interconnected microgrids in a day is Where, subscript k is the kth round of optimization management, are the power generation costs of DEG and MT respectively, is the loss cost of the energy storage equipment, is the loss cost of power transmission between microgrids, is the cost of trading with the main grid.
[0079] The goal of the entire system is to achieve power balance in interconnected microgrids while minimizing the required cost. In step 4, if the control signal output by the power control network is different, the cost of a round of optimization management will also be different. Therefore, in fact, when training the two networks in step 4, we hope that the control signal output by the power control network is optimal (that is, we hope to adjust it according to this signal, and the cost required after a round of optimization management is minimized); at the same time, we also hope that the cost estimation network's estimate of the average cost of each round of optimization management is accurate.
[0080] Therefore, these two networks need to be trained jointly. In step 6, according to the difference between the actual cost and the estimated average cost, if the cost of this control is lower than the average cost, the network parameters are adjusted to make the power control network output more control signals similar to this regulation, which can make the cost lower after regulation.
[0081] Step 3: Based on the historical data of the power uncontrollable devices in the past seven days and the operating status of the power controllable devices, the state vector of the interconnected microgrid is represented.
[0082] Step 3-1: For example, the power of uncontrollable devices such as photovoltaic power generation is random and volatile. The average value of its real historical data in the past seven days is used to approximate the state of the day. The real data of the kth time slot of the uncontrollable power devices in the interconnected microgrid in the past mth day is represented by the vector It indicates that, MG i The photovoltaic power generation, wind power generation, and load power at the kth time slot on the past mth day. Therefore, the state of the power uncontrollable device at the kth time slot can be approximately expressed as:
[0083] Step 3-2: The state of charge of the energy storage device in the interconnected microgrid at the initial time of the kth time slot can be expressed as a vector: in, SOC i,k For MG i The state of charge of the energy storage device at the initial time of the kth time slot, η i , Q i are the charge and discharge coefficient and battery capacity respectively, For MG i The charging and discharging power of the energy storage device in the k-1th time slot.
[0084] Step 3-3: Denote the state vector of the interconnected microgrid at the initial time of the kth time slot as z k =[kΔt,e k ,s k ].
[0085] Step 4: Input the state vector of the interconnected microgrid into the power control network and the cost estimation network. The power control network outputs a power control vector, which is used to control the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required to perform multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day.
[0086] Step 4-1: Construct a power control network that implements the state vector z of the interconnected microgrid k The power control vector u k Mapping Power Control Vector in For MG i The power of the power controllable device q in the kth time slot is The standardized value of They are The minimum and maximum power values allowed within a safe range. Specifically, the power control network contains a multi-layer structure. The higher the complexity of the microgrid, the more layers there are. Without loss of generality, the network contains a 4-layer structure: the first layer is the input layer, and the input is the state vector z of the interconnected microgrid k , denoted as f1=z k ; The second and third layers are processing layers, denoted by f l =max(W l f l-1 +b l ,0),W l 、b l are the weight matrix and bias vector of the lth layer, l = 2, 3; the 4th layer is the output layer, which is divided into two parts, and the dimensions of the two parts are the same as the control signal vector u k The same, respectively μ t =tanh(W μ f3+b μ ), σ t =softplus(W σ f3+b σ ), in μ t As the mean vector, σ t As the standard deviation vector, we can get a multidimensional Gaussian distribution Control signal u k can be Sampling shows that the value range of the sigmoid function is between 0 and 1, so the value of the elements in the control vector is between 0 and 1, which ensures that the control signal will not exceed the safety limit. In the above formula, tanh hyperbolic tangent function, softplis(x) = log(1+e x ),sigmoid(x)=1 / (1+e -x ). l , W μ , W σ are weight matrices, b l , b μ , b σ are all bias vectors, and the above parameters of the power control module are recorded as θ u .
[0087] Step 4-2: The system is based on the state of the interconnected microgrid k And the mapping relationship in step 4-1 The cumulative cost of multiple rounds of energy optimization management until the end of the day is c t+k is the cost of energy optimization management in the k+t round. Due to the randomness and mapping relationship of the power of uncontrollable devices The uncertainty of In the formula is the mathematical expectation, which is the expected value of the cumulative cost and serves as a baseline for measuring the quality of a round of control signal selection. If C(z k )-V π (z k ) is a positive value, which means that the control effect is better than the average value, and the probability of this mapping is increased during the last network update, otherwise it is reduced.
[0088] Step 4-3: Construct a cost estimation module, which completes the state vector z of the interconnected microgrid t Towards 's mapping. is the cost function V in step 4-2 π (z k ) is an estimated value. The structure of this module is similar to that of the power control module. The difference is that the output layer is V(z k )=W v f3+b v , the overall parameter of the cost estimation module is recorded as θ v .
[0089] Step 5: According to the topological structure of the interconnected microgrid, the unbalanced power in the microgrid is dispatched between the microgrids to achieve power balance in the entire interconnected microgrid.
[0090] Step 5-1: After the above steps, the controllable devices in the interconnected microgrid are However, there may still be unbalanced power in a single microgrid, such as excess power generation or insufficient load power consumption. The system dispatches the unbalanced power between microgrids and uses the main grid as a coordination mechanism to sell or purchase power from the main grid. i Connected to the main grid, then record MG i The power transmitted between the main grid is and If MG i Not connected to the mains, then Remember MG i To MG j (i<j) The transmitted power is P i→j With P j→i The relationship can be expressed as: in, For MG i To MG j The transmission power loss, r (i,j) 、V (i,j) For MGi and MG j The resistance and voltage between power lines.
[0091] Step 5-2: MG i The unbalanced power that still exists in the can be expressed as: Therefore, after optimized scheduling, each microgrid should meet the power balance: In the above formula, ∑ (i,j)∈E P i→j Represents connection to MG i The sum of the power on all power lines on the interconnected microgrid indicates that MG i The sum of the power traded with other microgrids. The interconnected microgrid should satisfy the power balance: Therefore, in order to minimize the power loss in transmission scheduling, the interconnected microgrid optimization scheduling problem can be transformed into a convex optimization problem:
[0092]
[0093] st(*)(1)(2)
[0094] In the formula, ρ buy , sell are the prices of purchasing and selling unit power from the main grid respectively. After solving, we can get and {P i→j} (i,j)∈E , the optimal dispatch of electricity is completed. st(*)(1)(2) represents the constraint condition of the min optimization formula (*)(1)(2), which has been marked in steps 5-1 and 5-2.
[0095] Step 6: At the end of the day, the parameters of the power control network and the cost estimation network are updated according to the difference between the actual accumulated cost of each round of energy optimization management and the expected value estimated by the cost estimation network.
[0096] Calculate the cost c of this round of interconnected microgrid optimization management k , enter the next round of optimization management. The loss function of the power control module is The loss function of the cost estimation module is At the end of the day, the operation trajectory of the interconnected microgrid can be obtained Then the cumulative cost C(z k ), update the parameters of the power control module: Update the parameters of the cost estimation module: Enter the next day's optimization management.
[0097] Step 7: Enter the next round of optimization management and repeat steps 3 to 6.
[0098] The method of the present invention is actually an online sequential decision-making process. As long as the interconnected microgrid is running, it is always in a cycle. For example, the method performs optimization management once every hour. The current round is from 12:00 to 13:00. When the current round ends, the method enters the next round, which is from 13:00 to 14:00.
[0099] The present invention proposes a method and system for optimizing energy management of interconnected microgrids. With the depletion of fossil fuels and the increasingly serious environmental pollution problems, the use of renewable energy sources such as solar energy and wind energy has received widespread attention. In recent years, microgrids have been widely adopted and deployed in modern power systems. Microgrids refer to small-scale power generation and distribution systems composed of renewable energy power generation equipment, energy storage devices, loads, power conversion devices, monitoring and protection devices, etc. Although renewable energy power generation has the advantages of environmental friendliness and sustainable utilization, its power generation is subject to environmental factors and has the disadvantages of volatility and randomness. Coupled with the uncertainty of loads, it is easy to have an imbalance between supply and demand within the microgrid. When there is surplus power generation, resources will be wasted, and it will also threaten the safety of the microgrid. When there is a shortage of power generation, the demand for loads is difficult to meet, resulting in a bad experience for users.
[0100] Microgrid energy management is to adapt to the randomness of renewable energy generation and load, adjust the power of power-controllable devices, and optimize operating costs while achieving supply and demand balance. In previous studies, most of them focused on a single microgrid, which required complex modeling of the microgrid and relied on accurate prediction of renewable energy generation. However, the types of equipment in a single microgrid may not be perfect, and the ability to achieve internal balance is limited. There are few studies on the joint economic dispatch of interconnected microgrids composed of multiple microgrids connected in a certain topological relationship. At the same time, relying on accurate predictions will not only waste a lot of computing power, but also make it difficult to guarantee the accuracy and stability of predictions in actual operations.
[0101] In actual operation, at the beginning, the network parameters were randomly set, the control effect of the control signal output by the power control network was not ideal, and the cost estimation network's estimate of the mean cost was not accurate. By training the two networks with historical data, the network parameters gradually stabilized during training, the power control network gradually learned the optimal mapping from the state of the interconnected microgrid to the power control vector, and the cost estimation network's estimate of the cumulative mean cost was more accurate. In addition, there is no need to use predicted data in the network's input data, which overcomes the reliance of traditional methods on predicted data.
[0102] After the control signal is formed, optimal scheduling is performed between the microgrids according to the topological structure of the interconnected microgrids to achieve the supply and demand balance of the interconnected microgrids, and the cost function is calculated after the optimization scheduling is completed. The cost function comprehensively considers the transmission loss, the loss of energy storage equipment, the power generation cost and the cost of trading with the main grid. Compared with each microgrid performing energy management separately, it has better system stability and further reduces the cost required to achieve supply and demand balance.
[0103] Embodiment 2:
[0104] This embodiment provides an interconnected microgrid energy optimization management system, the system comprising:
[0105] Classification module: used to classify the devices in the microgrid into power-uncontrollable devices and power-controllable devices; obtain the topological structure of the interconnected microgrid, set the number of rounds of optimization management within a day, and initialize network parameters;
[0106] Cost function module: used to construct the cost function of energy optimization management of a round of interconnected microgrids;
[0107] State vector module: used to represent the state vector of the interconnected microgrid based on the historical data of the power uncontrollable devices in the past seven days and the operating status of the power controllable devices;
[0108] Power cost module: used to input the state vector of the interconnected microgrid into the power control network and the cost estimation network; the power control network outputs a power control vector for controlling the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required for multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day;
[0109] Scheduling module: used to dispatch the unbalanced power in the microgrid between microgrids according to the topological structure of the interconnected microgrid, so as to achieve power balance of the entire interconnected microgrid;
[0110] Update module: used to calculate the real cost of this round of energy optimization management and enter the next round; at the end of the day, the parameters of the power control network and the cost estimation network are updated according to the gap between the real accumulated cost of each round and the expected value estimated by the cost estimation network.
[0111] The system of this embodiment can be used to implement the method described in the first embodiment.
[0112] Embodiment three:
[0113] This embodiment provides an interconnected microgrid energy optimization management system, including a processor and a storage medium;
[0114] The storage medium is used to store instructions;
[0115] The processor is used to operate according to the instructions to execute the steps of the method described in embodiment 1.
[0116] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0117] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0120] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for optimizing energy management of interconnected microgrids, characterized in that: The method comprises the following steps: Classify the devices in the microgrid into power-uncontrollable devices and power-controllable devices; obtain the topology of the interconnected microgrid based on the geographical distribution and interconnection of the microgrids, set the number of rounds of optimization management within a day, and initialize the network parameters; According to the characteristics of different devices in the microgrid, a cost function for energy optimization management of a round of interconnected microgrids is constructed; According to the historical data of the power uncontrollable devices and the current operating status of the power controllable devices, the state vector of the interconnected microgrid in the current round is represented; The state vector is input into a power control network and a cost estimation network; the power control network outputs a power control vector for controlling the power of power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required for multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day; According to the topological structure of the interconnected microgrid, the unbalanced power in the microgrid is dispatched between microgrids to achieve power balance of the entire interconnected microgrid; At the end of this round of optimization management, the real cost of this round of energy optimization management is calculated according to the cost function, and the next round is entered; at the end of the day, the parameters of the power control network and the cost estimation network are updated according to the difference between the real accumulated cost of each round and the expected value estimated by the cost estimation network; Inputting the state vector into a power control network and a cost estimation network comprises: Construct a power control network that realizes the state vector z of the interconnected microgrid k The power control vector u k Mapping Power Control Vector in For MG i The power of the power controllable device q in the kth time slot is The standardized value of They are The minimum and maximum power values allowed within a safe range; The system is based on the state of the interconnected microgrid. k And the mapping relationship The cumulative cost of multiple rounds of energy optimization management until the end of the day is c t+k The cost of energy optimization management in the k+t round; due to the randomness and mapping relationship of the power of uncontrollable devices The uncertainty of In the formula is the mathematical expectation, which is the expected value of the cumulative cost and serves as a baseline for measuring the quality of a round of control signal selection. If C(z k )-V π (z k ) is a positive value, which means that the control effect is better than the average value, and the probability of this mapping is increased in the last network update, otherwise it is reduced; Construct a cost estimation module, which completes the state vector z of the interconnected microgrid t Towards The mapping of is the cost function V in step 4-2 π (z k ) is the estimated value; the output layer of the cost estimation module is V(z k )=W v f3+b v , the overall parameter of the cost estimation module is recorded as θ v .
2. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: The devices in the microgrid are classified into power-uncontrollable devices and power-controllable devices; according to the geographical distribution and interconnection of the microgrids, the topology of the interconnected microgrids is obtained, the number of rounds of optimization management in a day is set, and the network parameters are initialized, including the following steps: The system obtains the status of the equipment in the interconnected microgrid and classifies them. The components contained in each microgrid include: photovoltaic power generation equipment, wind power generation equipment, diesel generators, micro gas turbines, energy storage equipment and loads, which are recorded as PV, WTG, DEG, MT, ESS, Load respectively; among them, photovoltaic power generation equipment and wind power generation equipment are power generation equipment with uncontrollable power, and loads are power consumption equipment with uncontrollable power. Accordingly, the power uncontrollable equipment set is recorded as U = {PV, WTG, Load}; diesel generators and micro gas turbines are power controllable power generation equipment, and energy storage equipment is charge and discharge power controllable equipment. Accordingly, the power controllable equipment set is recorded as Q = {DEG, MT, ESS}; According to the geographical distribution of microgrids and their interconnection, the interconnected microgrid topology graph G(V,E) is constructed; N microgrids are represented by the node set V = {1,2,…,N}, and the power lines between microgrids are represented by the edge set E = {(1,2),…,(a,b),…}; the i-th microgrid in the interconnected microgrid is MG i ; A day [0, 24h] is divided into K time slots, and a round of energy optimization management is performed in each time slot, with a time step of Δt = 24h / K; the kth time slot is [kΔt, (k+1)Δt]; at the start time kΔt of the kth time slot, the control and scheduling scheme is executed on the interconnected microgrid, and lasts until the end time (k+1)Δt; at the same time, the end time of the kth time slot is also the start time of the k+1th time slot; Parameters θ of the power control network and the revenue estimation network u ,θ v Random initialization.
3. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: According to the characteristics of different devices in the microgrid, the method of constructing the cost function of energy optimization management of a round of interconnected microgrids includes: The cost function of the k-th round of interconnected microgrid energy optimization management is: Where, subscript k is the kth round of optimization management, are the power generation costs of DEG and MT respectively, is the loss cost of the energy storage equipment, is the loss cost of power transmission between microgrids, is the cost of trading with the main grid.
4. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: According to the historical data of the power uncontrollable devices and the current operating status of the power controllable devices, the state vector of the interconnected microgrid in the current round is represented, including: The power of the power uncontrollable device is random and volatile. The average value of its real historical data in the past seven days is used to approximate the state of the day. The real data of the power uncontrollable device in the interconnected microgrid in the kth time slot on the mth day in the past is represented by the vector It indicates that, MG i The photovoltaic power generation, wind power generation, and load power at the kth time slot on the mth day in the past; therefore, the state of the power uncontrollable device at the kth time slot can be approximately expressed as: The charge state of the energy storage device in the interconnected microgrid at the initial time of the kth time slot can be expressed by the vector in, SOC i,k For MG i The state of charge of the energy storage device at the initial time of the kth time slot, η i , Q i are the charge and discharge coefficient and battery capacity respectively, For MG i The charging and discharging power of the energy storage device in the k-1th time slot; The state vector of the interconnected microgrid at the initial time of the kth time slot is represented as z k =[kΔt,e k ,s k ].
5. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: The power control network includes a 4-layer structure: The first layer is the input layer, and the input is the state vector z of the interconnected microgrid k , denoted as f1=z k ; The second and third layers are processing layers, denoted by f l =max(W l f l-1 +b l ,0),W l , b l are the weight matrix and bias vector of the lth layer, l=2,3; The fourth layer is the output layer, which is divided into two parts, and the dimensions of the two parts are the same as the control signal vector u k The same, respectively μ t =tanh(W μ f3+b μ ), σ t =softplus(W σ f3+b σ ), in μ t As the mean vector, σ t As the standard deviation vector, we can get a multidimensional Gaussian distribution Control signal u k Can, by Sampling shows that the value range of the sigmoid function is between 0 and 1, so the value of the elements in the control vector is between 0 and 1; In the above formula, tanh is the hyperbolic tangent function, softplus(x)=log(1+e x ),sigmoid(x)=1 / (1+e -x );W l , W μ , W σ are weight matrices, b l , b μ , b σ are all bias vectors, and the above parameters of the power control module are recorded as θ u .
6. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: According to the topological structure of the interconnected microgrid, the unbalanced power in the microgrid is dispatched between microgrids to achieve power balance of the entire interconnected microgrid, including: Dispatch unbalanced power between microgrids, and use the main grid as a coordinator to sell or purchase power from the main grid; If the microgrid MG i is connected to the main grid, then the power transmitted between MG i and the main grid is and If MG i is not connected to the main grid, then denote the power transmitted from MG i to MG j (i < j) as P i→j The relationship between P j→i and P can be expressed as: where i is the transmission power loss from MG j to MG (i,j) , r (i,j) and V i are the resistance and voltage of the power line between MG j and MG MG i The unbalanced power that still exists in the can be expressed as: Therefore, after optimized scheduling, each microgrid should meet the power balance: In the above formula, ∑ (i,j)∈E P i→j Represents connection to MG i The sum of the power on all power lines on the interconnected microgrid indicates that MG i The sum of the power traded with other microgrids; the interconnected microgrid should meet the power balance: Therefore, in order to minimize the power loss in transmission scheduling, the interconnected microgrid optimization scheduling problem can be transformed into a convex optimization problem: st(*)(1)(2) In the formula, ρ buy , sell are the prices of purchasing and selling unit power from the main grid respectively. After solving, we can get and {P i→j } (i,j)∈E , completing the optimal dispatch of electricity.
7. The method for optimizing energy management of interconnected microgrids according to claim 1, characterized in that: According to the difference between the actual accumulated cost of each round and the expected value estimated by the cost estimation network, the parameters of the power control network and the cost estimation network are updated, including: Calculate the cost c of this round of interconnected microgrid optimization management k , enter the next round of optimization management; The loss function of the power control module is The loss function of the cost estimation module is At the end of the day, the operation trajectory of the interconnected microgrid can be obtained Then the cumulative cost C(z k ), update the parameters of the power control module: Update the parameters of the cost estimation module: Enter the next day's optimization management.
8. An interconnected microgrid energy optimization management system, characterized in that: The system comprises: Classification module: used to classify the devices in the microgrid into power-uncontrollable devices and power-controllable devices; according to the geographical distribution and interconnection of the microgrids, the topology of the interconnected microgrids is obtained, the number of rounds of optimization management in a day is set, and the network parameters are initialized; Cost function module: used to construct a cost function for energy optimization management of an interconnected microgrid according to the characteristics of different devices in the microgrid; State vector module: used to represent the state vector of the interconnected microgrid in the current round based on the historical data of the power uncontrollable devices and the current operating status of the power controllable devices; Power cost module: used to input the state vector into the power control network and the cost estimation network; the power control network outputs a power control vector for controlling the power of the power controllable devices in the interconnected microgrid; the cost estimation network outputs an estimate of the expected value of the cumulative cost required for multiple rounds of optimization management of the interconnected microgrid in the current state until the end of the day; Scheduling module: used to dispatch the unbalanced power in the microgrid between microgrids according to the topological structure of the interconnected microgrid, so as to achieve power balance of the entire interconnected microgrid; Update module: used to calculate the real cost of this round of energy optimization management according to the cost function at the end of this round of optimization management, and enter the next round; at the end of the day, update the parameters of the power control network and the cost estimation network according to the difference between the real accumulated cost of each round and the expected value estimated by the cost estimation network; Inputting the state vector into a power control network and a cost estimation network comprises: Construct a power control network that realizes the state vector z of the interconnected microgrid k The power control vector u k Mapping Power Control Vector in For MG i The power of the power controllable device q in the kth time slot is The standardized value of They are The minimum and maximum power values allowed within a safe range; The system is based on the state of the interconnected microgrid. k And the mapping relationship The cumulative cost of multiple rounds of energy optimization management until the end of the day is c t+k The cost of energy optimization management in the k+t round; due to the randomness and mapping relationship of the power of uncontrollable devices The uncertainty of In the formula is the mathematical expectation, which is the expected value of the cumulative cost and serves as a baseline for measuring the quality of a round of control signal selection. If C(z k )-V π (z k ) is a positive value, which means that the control effect is better than the average value, and the probability of this mapping is increased in the last network update, otherwise it is reduced; Construct a cost estimation module, which completes the state vector z of the interconnected microgrid t Towards The mapping of is the cost function V in step 4-2 π (z k ) is the estimated value; the output layer of the cost estimation module is V(z k )=W v f3+b v , the overall parameter of the cost estimation module is recorded as θ v .
9. An interconnected microgrid energy optimization management system, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Microgrid energy scheduling method based on double-Q-value network deep reinforcement learning
CN112117760A
Microgrid energy storage scheduling method, device and equipment based on deep reinforcement learning
CN112529727A