Photovoltaic absorption supporting micro-grid day-ahead-day voltage regulation method
By using reinforcement learning algorithms and flexible topology to optimize voltage regulation in microgrids, the problem that traditional microgrids cannot meet the daily voltage regulation needs is solved, the photovoltaic consumption rate and grid control economy are improved, and voltage security issues are solved. effective relief.
Patent Information
- Application Number
- CN202410685407.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-21
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
AI Technical Summary
Traditional microgrid voltage regulation cannot effectively meet the voltage regulation needs brought by distributed power sources and rooftop photovoltaic installations, especially when it comes to intraday voltage regulation.
A day-ahead-day voltage regulation method for microgrids that supports photovoltaic consumption is adopted. Through topological data acquisition, historical data collection, data analysis and reinforcement learning model establishment, day-ahead hour-level voltage regulation and intra-day real-time voltage regulation are achieved, using reinforcement learning algorithms. Optimize microgrid voltage regulation and combine flexible topology for voltage control.
It improves the photovoltaic consumption rate, improves the economy of power grid operation control, effectively alleviates the voltage security problems caused by large-scale photovoltaic grid connection, and has high economic value.
Smart Images

Figure CN118659469A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microgrid voltage regulation, and in particular to a day-ahead and intra-day voltage regulation method for a microgrid supporting photovoltaic consumption. Background Art
[0002] Traditional microgrid voltage regulation mainly relies on externally installed equipment, including substation on-load voltage regulators, smart inverters, and shunt capacitors, and only smart inverters are used for online voltage regulation. In recent years, the rapid development of distributed power sources in microgrids has increased the pressure on microgrid voltage regulation. The large-scale installation of rooftop photovoltaics has led to the situation where existing voltage regulation resources cannot fully meet the online voltage regulation needs. With the development of smart grids, a new type of online regulation resource, flexible topology, has emerged, which can be used as an online regulation resource for microgrids.
[0003] Therefore, it is an urgent problem for technicians in this field to propose a microgrid day-ahead and intraday voltage regulation method to support photovoltaic consumption to solve the difficulties existing in the prior art. Summary of the invention
[0004] In view of this, the present invention provides a microgrid day-ahead and intraday voltage regulation method that supports photovoltaic absorption. The provided voltage regulation method improves the photovoltaic absorption rate and the economy of grid operation control while achieving the voltage control target.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A method for regulating voltage of a microgrid before and during the day to support photovoltaic consumption includes the following steps:
[0007] S1, topology data acquisition step: collecting microgrid grid topology data, including capacitor bank information, line impedance information and node branch information;
[0008] S2, historical data collection step: collect historical operation data of the microgrid as learning sample data of the reinforcement learning model, including photovoltaic output data and load level data;
[0009] S3, data analysis step: based on the microgrid grid topology data obtained in S1, the photovoltaic and load forecasts are performed on the day before, and the hourly voltage regulation of the capacitor bank in the microgrid is performed based on the photovoltaic and load forecast results;
[0010] S4, microgrid voltage regulation model establishment step: based on the historical operation data of the microgrid, the microgrid voltage regulation problem is modeled by reinforcement learning to obtain the microgrid voltage regulation model;
[0011] S5, voltage regulation step: based on the real-time photovoltaic and load information obtained during the day, real-time voltage regulation is performed through the microgrid voltage regulation model obtained in S4.
[0012] In the above method, optionally, the voltage regulation mathematical model in S3 can be described as:
[0013]
[0014] subject to:
[0015]
[0016] V i,min ≤V i ≤V i,max
[0017]
[0018] Among them, B and N represent the branches and nodes in the distribution system, G ij , B ij ,θ ij is the conductance, susceptance and voltage phase angle difference between nodes i and j; is the maximum current allowed to flow through branch i; V i and V j is the voltage amplitude at nodes i and j; P G,i and P L,i is the active power of the generator and load at node i; Q G,i and Q L,i is the reactive power of the generator and load at node i; V i is the voltage amplitude of node i, V i,min 、V i,max are the upper and lower limits of the voltage amplitude at node i, and is the capacity and upper and lower limits of the capacitor bank installed on node i.
[0019] The above method, optional, Q value iterative update formula of reinforcement learning in S4:
[0020]
[0021] Where α and β are learning and discount factors, respectively, 0<α, β<1; R is the reward function for the k+1th iteration, s k is the environment in the kth iteration, a is the action, Q(s,a) is the Q value corresponding to the agent in state s and action a, It is the maximum value of Q value corresponding to all actions of the agent in state s.
[0022] In the above method, optionally, the state S in the Q-value iterative update formula of reinforcement learning is expressed as follows:
[0023] s=(G,P net ,Q net )
[0024] where G=(V,L)
[0025] P net =P load +P dg +P dlc
[0026] Q net =Q load +Q dg +Q cap
[0027] In the formula, s is the state of the agent, G is the current network topology, P net is the active power on the network node, including active load P load , new energy active output P dg and direct load control P dlc , Q net is the reactive power on the network node, including reactive load Q load , new energy reactive power output Q dg And the reactive value Q of the parallel capacitor cap .
[0028] In the above method, optionally, the action definition in the Q-value iterative update formula of reinforcement learning is divided into two parts: one is to select a disconnection from the closed branch set in the current microgrid topology based on the Q-value network, and the other is to select a branch closure that makes the control objective function the lowest from the basic cut set of the closed branch based on the flow calculation.
[0029] The above method, optionally, the calculation of the objective function in reinforcement learning is as follows:
[0030]
[0031] Where f1, f2 and f3 are the three components of the objective function, which are voltage offset, the number of switches that change, i.e., network loss, α, β, δ are weight coefficients, and v i is the node voltage, is the node standard voltage, is the initial state of each line, s i is the state of each line after topology adjustment, r ij is the resistance of each line, P ij , Q ij is the active and reactive power on the closed branch.
[0032] In the above method, optionally, the Q value network includes three layers of GCN, wherein a multi-layer perceptron is arranged after each layer of GCN;
[0033] The input information of the Q-value network includes the node feature matrix, the node adjacency matrix and the line feature matrix; the output is the line feature matrix;
[0034] The third-layer line adjacency matrix has the following form:
[0035]
[0036] In the formula, l e is the e-th line, n i represents the i-th node, Lon is the closed branch set, and Loff is the open branch set.
[0037] In the above method, optionally, the reward function execution process in reinforcement learning includes the following steps:
[0038] (1) Input the current state s = {NAM, LAM, NFM} and select a disconnected path from the set of closed branches based on the Q-value network;
[0039] (2) closing the optimal branch of the basic cut set of disconnected branches according to the objective function;
[0040] (3) Determine whether the open branch and the closed branch are the same branch, and select an output strategy based on the judgment result.
[0041] In the above method, optionally, the output strategy specifically includes:
[0042] If the disconnected branch and the closed branch are the same branch, a larger reward is given to the agent, the iterative learning is terminated, and a new state s′={NAM′,LAM′,NFM′} is output. The reward is negatively correlated with the currently calculated objective function value.
[0043] If the open branch is not the same branch as the closed branch, the agent reward value is 0, and iterative learning continues to output a new state s′={NAM′,LAM′,NFM′}.
[0044] It can be seen from the above technical solution that, compared with the prior art, the method for regulating voltage of a microgrid before and during the day supporting photovoltaic consumption in the present invention has the following beneficial effects:
[0045] Recently, hourly voltage regulation is carried out based on traditional reactive voltage regulation resources such as capacitors, and 15-minute real-time voltage regulation is carried out based on flexible topology during the day. This method makes full use of the regulation characteristics of different voltage regulation resources, can effectively alleviate the voltage safety problems caused by large-scale photovoltaic grid-connected, can support photovoltaic consumption, and has certain economic value. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0047] Figure 1 A flow chart of a method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption provided by the present invention;
[0048] Figure 2 A schematic diagram of a day-ahead and intraday voltage regulation model of a microgrid supporting photovoltaic consumption provided by the present invention;
[0049] Figure 3 A Q value network structure diagram provided by the present invention;
[0050] Figure 4 This is a node voltage diagram of a 14-node system provided by the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0053] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.
[0054] Reference Figure 1-2 As shown, the present invention discloses a method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption, comprising the following steps:
[0055] S1, topology data acquisition step: collecting microgrid grid topology data, including capacitor bank information, line impedance information and node branch information;
[0056] S2, historical data collection step: collect historical operation data of the microgrid as learning sample data of the reinforcement learning model, including photovoltaic output data and load level data;
[0057] S3, data analysis step: based on the microgrid grid topology data obtained in S1, the photovoltaic and load forecasts are performed on the day before, and the hourly voltage regulation of the capacitor bank in the microgrid is performed based on the photovoltaic and load forecast results;
[0058] S4, microgrid voltage regulation model establishment step: based on the historical operation data of the microgrid, the microgrid voltage regulation problem is modeled by reinforcement learning to obtain the microgrid voltage regulation model;
[0059] S5, voltage regulation step: based on the real-time photovoltaic and load information obtained during the day, real-time voltage regulation is performed through the microgrid voltage regulation model obtained in S4.
[0060] Specifically, IEEE 14-node and 33-node systems are selected as simulation objects in S1, where the load data in the network comes from the Pecan Streetpot database.
[0061] Furthermore, the voltage regulation mathematical model in S3 can be described as:
[0062]
[0063] subject to:
[0064]
[0065] V i,min ≤V i ≤V i,max
[0066]
[0067] Among them, B and N represent the branches and nodes in the distribution system, G ij , B ij ,θ ij is the conductance, susceptance and voltage phase angle difference between nodes i and j; is the maximum current allowed to flow through branch i; V i and V j is the voltage amplitude at nodes i and j; P G,i and P L,i is the active power of the generator and load at node i; Q G,i and Q L,i is the reactive power of the generator and load at node i; V i is the voltage amplitude of node i, V i,min 、V i,max are the upper and lower limits of the voltage amplitude at node i, and is the capacity and upper and lower limits of the capacitor bank installed on node i.
[0068] Specifically, S3 implements hourly voltage regulation based on reactive power optimization. Taking the 14-node system as an example, there is a voltage over-limit problem when the photovoltaic power generation is high at 2 pm. After the capacitor is adjusted, the voltage problem is solved. Figure 4 As shown:
[0069] Furthermore, the Q-value iterative update formula of reinforcement learning in S4 is:
[0070]
[0071] Where α and β are learning and discount factors, respectively, 0<α, β<1; R is the reward function for the k+1th iteration, s k is the environment in the kth iteration, a is the action, Q(s,a) is the Q value of the agent in state s and action a, m a∈ a A xQ(s,a) is the maximum Q value corresponding to all actions of the agent in state s.
[0072] Specifically, reinforcement learning is used to achieve voltage regulation at the 15-minute level within a day. Although reactive power optimization was performed a few days ago, voltage problems may still occur within a day due to the random volatility of photovoltaic power and load. At this time, adjustment is made based on the flexible topology. The parameter settings of reinforcement learning are shown in Table 1.
[0073] Table 1 Setting related parameters
[0074] parameter 14 nodes 33 nodes Activation Function Relu Relu Discount Factor 0.99 0.99 Reward Factor 0.01 0.01 Memory pool size 1024 1024
[0075] In order to verify the superiority of the proposed algorithm, it is compared with two heuristic algorithms and one optimization method. The heuristic algorithms include particle swarm optimization (PSO) and genetic algorithm (GA). The optimization method is an optimization method based on second-order cone optimization (SOCP). The four algorithms are solved 10 times each, and the results of the 10 solutions are statistically shown in Table 2-3.
[0076] Table 2 Solution results of 14-node network
[0077]
[0078] Table 3 Solution results of 33-node network
[0079]
[0080] As shown in Table 2, all four methods can find the optimal solution for the 14-node network. The results in Table 3 show that for the 33-node network, the SOCP method obtains the optimal solution, while the GA method obtains the worst solution. For both networks, the proposed reinforcement learning-based method always obtains better results. From the perspective of computational time, the advantages of this method are more obvious, especially for larger networks. In the GA, PSO and SOCPA algorithms, the computational time increases rapidly with the increase of network size. For example, the PSO method requires 30.53 seconds and 85.21 seconds to find solutions for 14-node and 33-node networks, respectively. The GA method requires less time than PSO, but the quality of the solution is slightly worse. It is worth noting that the DRL-based method proposed in the present invention requires less than 3 seconds for all network sizes. The main reason for its speed is that neither the SOCP method nor the heuristic algorithms (including PSO and GA) can use prior knowledge. For each voltage regulation problem, these methods search for solutions from scratch, which requires a lot of computational time. In contrast, the DRL algorithm of the present invention will learn offline based on historical training data and save this learning information in the Q network. When solving online problems, DRL-based methods can quickly find the optimal solution based on the knowledge learned and saved offline.
[0081] Furthermore, the state S in the Q-value iterative update formula of reinforcement learning is expressed as follows:
[0082] s=(G,P net ,Q net )
[0083] where G=(V,L)
[0084] Pnet =P load +P dg +P dlc
[0085] Q net =Q load +Q dg +Q cap
[0086] In the formula, s is the state of the agent, G is the current network topology, P net is the active power on the network node, including active load P load , new energy active output P dg and direct load control P dlc , Q net is the reactive power on the network node, including reactive load Q load , new energy reactive power output Q dg And the reactive value Q of the parallel capacitor cap .
[0087] Furthermore, the action definition in the Q-value iterative update formula of reinforcement learning is divided into two parts: one is to select a disconnected branch from the closed branch set in the current microgrid topology based on the Q-value network, and the other is to select a branch closure that minimizes the control objective function from the basic cut set of the closed branch based on the power flow calculation.
[0088] Furthermore, the objective function in reinforcement learning is calculated as follows:
[0089]
[0090] Where f1, f2 and f3 are the three components of the objective function, which are voltage offset, the number of switches that change, i.e., network loss, α, β, δ are weight coefficients, and v i is the node voltage, is the node standard voltage, is the initial state of each line, s i is the state of each line after topology adjustment, r ij is the resistance of each line, P ij , Q ij is the active and reactive power on the closed branch.
[0091] Furthermore, Figure 3 As shown, the Q-value network includes three layers of GCN, where a multi-layer perceptron is set after each layer of GCN;
[0092] The input information of the Q-value network includes the node feature matrix, the node adjacency matrix and the line feature matrix; the output is the line feature matrix;
[0093] The third-layer line adjacency matrix has the following form:
[0094]
[0095] In the formula, l e is the e-th line, n i represents the i-th node, Lon is the closed branch set, and Loff is the open branch set.
[0096] Furthermore, the reward function execution process in reinforcement learning includes the following steps:
[0097] (1) Input the current state s = {NAM, LAM, NFM} and select a disconnected path from the set of closed branches based on the Q-value network;
[0098] (2) closing the optimal branch of the basic cut set of disconnected branches according to the objective function;
[0099] (3) Determine whether the open branch and the closed branch are the same branch, and select an output strategy based on the judgment result.
[0100] Furthermore, the output strategy specifically includes:
[0101] If the disconnected branch and the closed branch are the same branch, a larger reward is given to the agent, the iterative learning is terminated, and a new state s′={NAM′,LAM′,NFM′} is output. The reward is negatively correlated with the currently calculated objective function value.
[0102] If the open branch is not the same branch as the closed branch, the agent reward value is 0, and iterative learning continues to output a new state s′={NAM′,LAM′,NFM′}.
[0103] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0104] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, computer software, or a combination of both.
[0105] In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0106] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for day-ahead and intraday voltage regulation of a microgrid supporting photovoltaic consumption. It is characterized in that The following steps are involved: S1, topology data acquisition step: collecting microgrid grid topology data, including capacitor bank information, line impedance information and node branch information; S2, historical data collection step: collect historical operation data of the microgrid as learning sample data of the reinforcement learning model, including photovoltaic output data and load level data; S3, data analysis step: based on the microgrid grid topology data obtained in S1, the photovoltaic and load forecasts are performed on the day before, and the hourly voltage regulation of the capacitor bank in the microgrid is performed based on the photovoltaic and load forecast results; S4, microgrid voltage regulation model establishment step: based on the historical operation data of the microgrid, the microgrid voltage regulation problem is modeled by reinforcement learning to obtain the microgrid voltage regulation model; S5, voltage regulation step: based on the real-time photovoltaic and load information obtained during the day, real-time voltage regulation is performed through the microgrid voltage regulation model obtained in S4.
2. A method for regulating voltage in a microgrid supporting photovoltaic consumption before and after the day according to claim 1, It is characterized in that The voltage regulation mathematical model in S3 can be described as: subject to: In i,min ≤V i ≤V i,max Among them, B and N represent the branches and nodes in the distribution system, G ij , B ij ,θ ij is the conductance, susceptance and voltage phase angle difference between nodes i and j; is the maximum current allowed to flow through branch i; V i and V j is the voltage amplitude at nodes i and j; P G,i and P L,i is the active power of the generator and load at node i; Q G,i and Q L,i is the reactive power of the generator and load at node i; V i is the voltage amplitude of node i, V i,min 、V i,max are the upper and lower limits of the voltage amplitude at node i, and is the capacity and upper and lower limits of the capacitor bank installed on node i.
3. A method for regulating voltage in a microgrid supporting photovoltaic consumption before and after the day according to claim 2, It is characterized in that The Q-value iterative update formula for reinforcement learning in S4 is: Where α and β are learning and discount factors, respectively, 0<α, β<1; R is the reward function for the k+1th iteration, s k is the environment in the kth iteration, a is the action, Q(s,a) is the Q value corresponding to the agent in state s and action a, It is the maximum value of Q value corresponding to all actions of the agent in state s.
4. A method for day-ahead and day-intraday voltage regulation of a microgrid supporting photovoltaic consumption according to claim 3, It is characterized in that The state S in the Q-value iterative update formula of reinforcement learning is expressed as follows: s=(G,P net ,Q net ) where G=(V,L) P net =P load +P dg +P dlc Q net =Q load +Q dg +Q cap In the formula, s is the state of the agent, G is the current network topology, P net is the active power on the network node, including active load P load , new energy active output P dg and direct load control P dlc , Q net is the reactive power on the network node, including reactive load Q load , new energy reactive power output Q dg And the reactive value Q of the parallel capacitor cap .
5. A method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption according to claim 3, It is characterized in that The action definition in the Q-value iterative update formula of reinforcement learning is divided into two parts: one is to select a disconnection from the closed branch set in the current microgrid topology based on the Q-value network, and the other is to select a branch closure that minimizes the control objective function from the basic cut set of the closed branch based on the power flow calculation.
6. A method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption according to claim 5, It is characterized in that The objective function in reinforcement learning is calculated as follows: min f=αf 1 +βf 2 +δf 3 In the formula, f 1 , f 2 and f 3 are the three components of the objective function, namely, voltage offset, the number of switches that change, i.e., network loss, α, β, δ are weight coefficients, and v i is the node voltage, is the node standard voltage, is the initial state of each line, s i is the state of each line after topology adjustment, r ij is the resistance of each line, P ij , Q ij is the active and reactive power on the closed branch.
7. A method for regulating voltage in a microgrid supporting photovoltaic consumption before and after the day according to claim 3, It is characterized in that The Q-value network consists of three layers of GCN, where a multi-layer perceptron is set after each layer of GCN; The input information of the Q-value network includes the node feature matrix, the node adjacency matrix, and the line feature matrix; The output is the line characteristic matrix; The third-layer line adjacency matrix has the following form: In the formula, l e is the e-th line, n i represents the i-th node, Lon is the closed branch set, and Loff is the open branch set.
8. A method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption according to claim 3, It is characterized in that The reward function execution process in reinforcement learning includes the following steps: (1) Input the current state s = {NAM, LAM, NFM} and select a disconnected path from the set of closed branches based on the Q-value network; (2) closing the optimal branch of the basic cut set of disconnected branches according to the objective function; (3) Determine whether the open branch and the closed branch are the same branch, and select an output strategy based on the judgment result.
9. A method for day-ahead and intra-day voltage regulation of a microgrid supporting photovoltaic consumption according to claim 8, It is characterized in that The output strategies include: If the disconnected branch and the closed branch are the same branch, a larger reward is given to the agent, the iterative learning is terminated, and a new state s′={NAM′,LAM′,NFM′} is output. The reward is negatively correlated with the currently calculated objective function value. If the open branch is not the same branch as the closed branch, the agent reward value is 0, and iterative learning continues to output a new state s′={NAM′,LAM′,NFM′}.
