Power grid partitioning method and system based on ripple diffusion algorithm
Through the grid partitioning method based on the corrugated diffusion algorithm, the electrical distance and coupling connection degree are calculated, the region source point is selected and the area is expanded, and the efficiency and accuracy of the traditional grid partitioning method are solved, achieving high efficiency of the power grid Reasonable partitioning and management.
Patent Information
- Application Number
- CN202410942190.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-12-27
AI Technical Summary
The traditional power grid partitioning method has low calculation efficiency and poor accuracy, and the cutoff reactance value is difficult to intelligently select, which affects the power grid partitioning results and computing process.
The grid partitioning method based on the corrugated diffusion algorithm is adopted. By calculating the electrical distance and electrical coupling connection degree, selecting the region source point and expanding the region, calculating the Q value of the partition structure in combination with the modular Q function, and automatically determining the optimal partition number and structure.
It improves the efficiency and rationality of power grid partitions, ensures the normal operation and control of the power grid, reduces the probability of cross-regional failures, and provides better service and management efficiency.
Smart Images

Figure CN119209456A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system dispatching automation, and in particular to a power grid partitioning method and system based on a ripple diffusion algorithm. Background Art
[0002] With the development of society and economy, the demand for electricity is growing. Traditional power grids cannot meet the increasing power consumption, so more advanced high-voltage networks are built. However, these early networks were not well applied, which easily caused confusion in local boundaries and overly complex network structures. These problems will affect dispatching and maintenance work and may cause greater danger. In order to maintain the high efficiency of the power system, it is divided into appropriate blocks to better achieve its reliability and stability. For large power systems, such as transmission networks, zoning power supply can simplify the workflow and improve work efficiency. When a problem or failure occurs in a certain area, the relevant staff can quickly rush to the scene for maintenance and processing, which greatly improves the emergency response speed and work efficiency. In addition, due to the large number of distribution stations and their wide distribution, dispersing them in various areas can not only reduce the difficulty and pressure of management, but also better meet user needs and provide better services. In the daily operation process, these distribution stations can also collect more data and analyze and process them, providing important reference for subsequent system optimization.
[0003] In addition, when detecting abnormal events in the power system, as the scale of the system expands, the computational complexity increases exponentially, and it is impossible to quickly and accurately determine whether an abnormal event has occurred and locate the abnormal area. In view of the low computational efficiency and poor accuracy of traditional methods, it is possible to consider partitioning before analyzing abnormal events in the power grid, constructing an independent matrix for each area, reducing the data dimension of each matrix, and narrowing the search range of abnormal lines.
[0004] Many current studies on power grid partitioning use electrical distance as the starting point. The power grid partitioning model constructed by researchers using DS evidence theory can regard the voltage and power-free difference between two nodes as one of the characteristics, and use the equivalent impedance coefficient, combined with other relevant parameters, to more accurately determine the power distance of each node, and obtain more complete partitioning results. By combining the principles of sociology, some researchers have proposed a new technology to construct complex networks. It can adopt different classification strategies for other information based on parameters such as line flow and impedance to achieve better results. However, the existing technology generally uses the setting of cutoff reactance to divide the node area. The value of the cutoff reactance is determined according to the actual grid to be partitioned, and it cannot be selected intelligently. Too large or too small a value will greatly affect the process and results of the calculation. Summary of the invention
[0005] In response to the above technical problems, the present application provides a power partitioning method and system based on a ripple diffusion algorithm, which realizes automatic partitioning of the power grid based on the ripple diffusion algorithm, thereby improving the efficiency and rationality of power grid partitioning.
[0006] In a first aspect, the present application provides a power grid partitioning method based on a ripple diffusion algorithm, comprising:
[0007] Obtain the admittance matrix, network connection matrix and several planned partition numbers of the power grid;
[0008] According to the admittance matrix, the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node are calculated, wherein the electrical coupling connectivity represents the importance of a certain grid node to the entire grid structure;
[0009] Generating the corresponding power grid partition structures according to the number of each planned partition, including:
[0010] For any first planned partition number N, according to the respective electrical coupling connectivity, N grid nodes are selected from the respective grid nodes as N regional source points, wherein each of the regional source points corresponds to a grid secondary region;
[0011] Based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distances between the respective power grid nodes, the regions are expanded outward with the respective regional source points as the center points, the ranges of the respective power grid secondary regions are determined, and then the first power grid partition structure corresponding to the first planned partition number N is determined;
[0012] Calculating the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function;
[0013] The Q values corresponding to the various power grid partition structures are compared, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
[0014] The embodiment of the present application provides a power grid partitioning method based on the ripple diffusion algorithm, which calculates the electrical distance and electrical coupling degree of each power grid node, and realizes the rapid selection of regional source points according to the planned partition number; further, on the basis of the regional source point, each power grid node is partitioned from each source point based on the ripple diffusion idea to form a corresponding power grid partition structure; finally, the Q value corresponding to the power grid partition structure is calculated based on the preset modular Q function. The embodiment of the present application obtains several planned partition numbers, generates different power grid partition structures, and calculates the Q values corresponding to each of these power grid partition structures respectively, and determines the optimal number of partitions and power grid partition structure by comparing the size of the Q value, thereby realizing the automatic partitioning of the power grid, improving the efficiency and rationality of the power grid partition, and providing a strong guarantee for the normal operation and control of the power grid.
[0015] Furthermore, the calculating, according to the admittance matrix, the electrical distance between each grid node and the electrical coupling connection degree corresponding to each grid node includes:
[0016] Obtaining an impedance matrix of a power grid according to the admittance matrix calculation;
[0017] Obtaining electrical distances between various grid nodes according to the impedance matrix calculation;
[0018] For any first grid node, the reciprocal of the sum of the electrical distances between the first grid node and other grid nodes is calculated to determine the electrical coupling connectivity of the first grid node, and then determine the electrical coupling connectivity corresponding to each grid node.
[0019] The embodiment of the present application provides a method for calculating electrical distance and electrical coupling connectivity. Since the electrical distance between each node of the power grid is a quantitative parameter through equivalent impedance, the impedance matrix of the power grid is first calculated according to the admittance matrix of the power grid, and then the electrical distance between each power grid node is calculated according to the impedance matrix. Then, the reciprocal of the sum of the electrical distances between a first power grid node and other power grid nodes is calculated to determine the electrical coupling connectivity of the first power grid node, and then the electrical coupling connectivity of each power grid node is determined in this way. The present application measures the importance of a certain power grid node in the network structure diagram by electrical coupling connectivity. If the electrical coupling connectivity of a certain power grid node is large, it means that the electrical coupling between the power grid node and other nodes is strong, so that the fault occurring at the node is more likely to cause a global disaster, so it is a very important node in the power grid, and it is more suitable to be selected as a regional source point. The electrical distance and electrical coupling connectivity calculated in the embodiment of the present application provide a data basis for the selection of subsequent regional source points and the regional expansion process of regional source points.
[0020] In a possible implementation, selecting N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity degrees includes:
[0021] Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes;
[0022] The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula;
[0023] According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
[0024] The embodiment of the present application provides a method for selecting regional source points. First, a spatial distance matrix is constructed, and the minimum electrical distance is calculated in combination with the first planned partition number N and a preset formula, and the minimum electrical distance is used as one of the conditions for selecting regional source points. In the selection conditions of regional source points, it is stipulated that the regional source points are selected from large to small according to the electrical coupling connectivity, so that each regional source point has a higher importance, and at the same time, the coupling between each power grid secondary area is weakened, the probability of cross-regional failure is reduced, and the rationality of power grid partition is improved; the electrical distance between each regional source point is greater than the minimum electrical distance, in order to avoid the selection of source points being concentrated in one area, which also improves the rationality of power grid partition. In addition, since the minimum electrical distance designed in the embodiment of the present application is related to the planned partition number, when facing different planned partition numbers, the minimum electrical distance will change adaptively according to the different planned partition numbers. The advantage of this is that even in the face of a larger planned partition number N, the embodiment of the present application can still successfully complete the selection of N regional source points, because the minimum electrical distance will change adaptively, which improves the efficiency of power grid partition.
[0025] In a possible implementation, when an area is expanded outward with any first area source point among the area source points as a center point to determine the range of the first power grid secondary area, the preset ripple diffusion algorithm is based on the network connection matrix of the power grid and the electrical distance between the various power grid nodes, and the area is expanded outward with each of the area source points as a center point to determine the range of each power grid secondary area, including:
[0026] Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas;
[0027] If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward;
[0028] If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes;
[0029] When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
[0030] The embodiment of the present application takes the source point of the first region as an example to illustrate the specific process of expanding the region outward with the source point of the first region as the center point. Based on the ripple diffusion algorithm, the grid nodes to be included that are directly connected to the center point are retrieved to see if they meet the node inclusion conditions. When the grid node to be included does not belong to any grid secondary region and is not directly connected to the grid nodes of other grid secondary regions, it can be directly included in the first grid secondary region of the source point of the first region, and the newly included grid node is used as the new center point to continue to expand the region outward; when the grid node to be included does not belong to any grid secondary region but is also directly connected to the grid nodes of other grid secondary regions, it means that this grid node is at the junction of the first grid secondary region and other grid secondary regions, then the region to which the grid node is included is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes. The embodiment of the present application simulates the process of each regional source point expanding the region outward as the diffusion process of water ripples in real life, and divides the grid into multiple grid secondary regions, which is equivalent to several drops of rain falling on the lake at the same time. The nodes in the grid are relative to obstacles that are stationary on the lake. The point where the raindrop lands on the lake is used as the source point and propagates in all directions on the plane at the same speed. When it encounters an obstacle on the lake (i.e. a node other than the source point), a new ripple is generated and continues to move outward on the lake (the branch connected to the node) at the same speed. In the process of spreading outward, in addition to encountering stationary obstacles, it will also encounter ripples generated by other raindrops (source points). At this time, it is necessary to compare the equivalent electrical distance between the node i where the collision occurs and the ripple source points j and k, and classify the "colliding" nodes into areas with smaller electrical distances. The ripples generated by the source points will cancel each other out after colliding with each other and stop spreading. In this way, starting from the source point, the areas covered by the ripples generated by each of them are the various partitions of the power grid.
[0031] Furthermore, according to the preset modular Q function, the Q value of the power grid partition structure corresponding to each of the planned partition numbers is calculated, and the specific formula is:
[0032]
[0033] Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c j Respectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j)=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure.
[0034] In a second aspect, accordingly, the present application provides a power grid partitioning system based on a ripple diffusion algorithm, comprising an acquisition module, a first calculation module, a partition structure generation module, a second calculation module, and a comparison module;
[0035] The acquisition module is used to acquire the admittance matrix, the network connection matrix and several planned partition numbers of the power grid;
[0036] The first calculation module is used to calculate the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node according to the admittance matrix, wherein the electrical coupling connectivity indicates the importance of a certain grid node to the entire grid structure;
[0037] The partition structure generation module is used to generate the corresponding power grid partition structure according to each of the planned partition numbers, including a source point selection unit and an area expansion unit;
[0038] The source point selection unit is used for selecting N grid nodes from the grid nodes as N regional source points for any first planned partition number N according to the respective electrical coupling connectivity, wherein each of the regional source points corresponds to a grid secondary area;
[0039] The area expansion unit is used to expand the area outward with each of the regional source points as the center point based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between each of the power grid nodes, to determine the range of each of the power grid secondary areas, and then determine the power grid partition structure corresponding to the first planned partition number N;
[0040] The second calculation module is used to calculate the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function;
[0041] The comparison module is used to compare the Q values corresponding to the respective power grid partition structures, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
[0042] Furthermore, the first calculation module includes an impedance matrix calculation unit, an electrical distance calculation unit, and an electrical coupling connectivity calculation unit;
[0043] Wherein, the impedance matrix calculation unit is used to calculate and obtain the impedance matrix of the power grid according to the admittance matrix;
[0044] The electrical distance calculation unit is used to calculate the electrical distance between each grid node according to the impedance matrix;
[0045] The electrical coupling connectivity calculation unit is used to calculate the reciprocal of the sum of electrical distances between any first grid node and other grid nodes, determine the electrical coupling connectivity of the first grid node, and further determine the electrical coupling connectivity corresponding to each grid node.
[0046] In a possible implementation, the source point selection unit selects N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity, including:
[0047] Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes;
[0048] The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula;
[0049] According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
[0050] In a possible implementation, when the area is expanded outward with any first area source point among the area source points as the center point to determine the range of the first power grid secondary area, the area expansion unit, based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between the various power grid nodes, respectively expands the area outward with each of the area source points as the center point to determine the range of each power grid secondary area, including:
[0051] Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas;
[0052] If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward;
[0053] If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes;
[0054] When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
[0055] Furthermore, the second calculation module calculates the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function, and the specific formula is:
[0056]
[0057] Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c j Respectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j )=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 : A flow chart of a power grid partitioning method based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0059] Figure 2 : A schematic diagram of the electrical distance and electrical coupling connectivity calculation process of a power grid partitioning method based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0060] Figure 3 : A schematic diagram of the change of Q value during an experiment of a power grid partitioning method based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0061] Figure 4: A schematic diagram of the optimal power grid partitioning structure obtained during an experiment of a power grid partitioning method based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0062] Figure 5 : Schematic diagram of the Q value change of a power grid partitioning method based on the ripple diffusion algorithm provided in an embodiment of the present application during another experimental process.
[0063] Figure 6 : A schematic diagram of the optimal power grid partitioning structure obtained during another experimental process of a power grid partitioning method based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0064] Figure 7 : A structural diagram of a power grid partitioning system based on a ripple diffusion algorithm provided in an embodiment of the present application.
[0065] Figure 8 : A structural diagram of the first calculation module of a power grid partitioning system based on a ripple diffusion algorithm provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] It should be noted that the step numbers in the text are only for the convenience of explanation of the specific embodiments and do not serve to limit the order in which the steps are executed. In the description of this application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0068] Embodiment 1:
[0069] like Figure 1 As shown, the first embodiment provides a power grid partitioning method based on the ripple diffusion algorithm, including steps S1-S5:
[0070] Step S1, obtaining the admittance matrix, network connection matrix and several planned partition numbers of the power grid;
[0071] Step S2: Calculate the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node according to the admittance matrix, wherein the electrical coupling connectivity indicates the importance of a grid node to the entire grid structure;
[0072] Step S3, generating the corresponding power grid partition structure according to each of the planned partition numbers, including: for any first planned partition number N, according to the electrical coupling connection degrees, selecting N power grid nodes from the various power grid nodes as N regional source points, wherein each of the regional source points corresponds to a power grid secondary area; based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between the various power grid nodes, respectively expanding the area outward with each of the regional source points as the center point, determining the range of each power grid secondary area, and then determining the first power grid partition structure corresponding to the first planned partition number N;
[0073] Step S4, calculating the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function;
[0074] Step S5: Compare the Q values corresponding to the respective power grid partition structures, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
[0075] The embodiment of the present application provides a power grid partitioning method based on the ripple diffusion algorithm, which calculates the electrical distance and electrical coupling degree of each power grid node, and realizes the rapid selection of regional source points according to the planned partition number; further, on the basis of the regional source point, each power grid node is partitioned from each source point based on the ripple diffusion idea to form a corresponding power grid partition structure; finally, the Q value corresponding to the power grid partition structure is calculated based on the preset modular Q function. The embodiment of the present application obtains several planned partition numbers, generates different power grid partition structures, and calculates the Q values corresponding to each of these power grid partition structures respectively, and determines the optimal number of partitions and power grid partition structure by comparing the size of the Q value, thereby realizing the automatic partitioning of the power grid, improving the efficiency and rationality of the power grid partition, and providing a strong guarantee for the normal operation and control of the power grid.
[0076] Further, in step S2, the electrical distance between each grid node and the electrical coupling connection degree corresponding to each grid node are calculated according to the admittance matrix, such as Figure 2 As shown, steps S201-S203 are included:
[0077] Step S201, obtaining an impedance matrix of a power grid according to the admittance matrix calculation;
[0078] Step S202: Calculate the electrical distance between each grid node according to the impedance matrix;
[0079] Step S203: For any first grid node, calculate the reciprocal of the sum of electrical distances between the first grid node and other grid nodes, determine the electrical coupling connectivity of the first grid node, and then determine the electrical coupling connectivity corresponding to each grid node.
[0080] In a preferred embodiment, in step S201, the impedance matrix of the power grid is calculated based on the admittance matrix, and the specific formula is:
[0081] Z all =Y all -1
[0082] Among them, Y all is the admittance matrix, Z all is the impedance matrix of the power grid.
[0083] In step S202, the electrical distance between each grid node is calculated based on the impedance matrix, and the specific formula is:
[0084] d ik =|(z ii -z ik )-(z ki -z kk )| 2 ,(1≤i,k≤n)
[0085] Where, d ik represents the electrical distance between node i and node k, z ik Indicates that in Z all The impedance between node i and node k in .
[0086] Furthermore, in order to facilitate subsequent calculations, the electrical distances between various grid nodes are normalized. The specific formula is:
[0087]
[0088] Where D ik is the normalized electrical distance between node i and node k.
[0089] In step S203, the reciprocal of the sum of the electrical distances between the first grid node and other grid nodes is calculated to determine the electrical coupling connectivity of the first grid node. The specific formula is:
[0090]
[0091] In the formula, w i is the electrical coupling connectivity of grid node i.
[0092] The embodiment of the present application provides a method for calculating electrical distance and electrical coupling connectivity. Since the electrical distance between each node of the power grid is a quantitative parameter through equivalent impedance, the impedance matrix of the power grid is first calculated according to the admittance matrix of the power grid, and then the electrical distance between each power grid node is calculated according to the impedance matrix. Then, the reciprocal of the sum of the electrical distances between a first power grid node and other power grid nodes is calculated to determine the electrical coupling connectivity of the first power grid node, and then the electrical coupling connectivity of each power grid node is determined in this way. The present application measures the importance of a certain power grid node in the network structure diagram by electrical coupling connectivity. If the electrical coupling connectivity of a certain power grid node is large, it means that the electrical coupling between the power grid node and other nodes is strong, so that the fault occurring at the node is more likely to cause a global disaster, so it is a very important node in the power grid, and it is more suitable to be selected as a regional source point. The electrical distance and electrical coupling connectivity calculated in the embodiment of the present application provide a data basis for the selection of subsequent regional source points and the regional expansion process of regional source points.
[0093] In a possible implementation, in step S3, selecting N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity degrees includes:
[0094] Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes;
[0095] The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula;
[0096] According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
[0097] In a preferred embodiment, the spatial distance matrix is represented as D = [D ik ] n×n .
[0098] The minimum electrical distance between source points in each area is calculated based on the spatial distance matrix, the first planned partition number N and a preset formula. The specific formula is:
[0099]
[0100] in, Indicates taking the first The largest element, N is the number of partitions, and K is the correction coefficient, which is obtained after training and testing.
[0101] The embodiment of the present application provides a method for selecting regional source points. First, a spatial distance matrix is constructed, and the minimum electrical distance is calculated in combination with the first planned partition number N and a preset formula, and the minimum electrical distance is used as one of the conditions for selecting regional source points. In the selection conditions of regional source points, it is stipulated that the regional source points are selected from large to small according to the electrical coupling connectivity, so that each regional source point has a higher importance, and at the same time, the coupling between each power grid secondary area is weakened, the probability of cross-regional failure is reduced, and the rationality of power grid partition is improved; the electrical distance between each regional source point is greater than the minimum electrical distance, in order to avoid the selection of source points being concentrated in one area, which also improves the rationality of power grid partition. In addition, since the minimum electrical distance designed in the embodiment of the present application is related to the planned partition number, when facing different planned partition numbers, the minimum electrical distance will change adaptively according to the different planned partition numbers. The advantage of this is that even in the face of a larger planned partition number N, the embodiment of the present application can still successfully complete the selection of N regional source points, because the minimum electrical distance will change adaptively, which improves the efficiency of power grid partition.
[0102] In a possible implementation, in step S3, when the area is expanded outward with any first area source point among the area source points as the center point to determine the range of the first power grid secondary area, the preset ripple diffusion algorithm is based on the network connection matrix of the power grid and the electrical distance between the various power grid nodes, and the area is expanded outward with each of the area source points as the center point to determine the range of each power grid secondary area, including:
[0103] Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas;
[0104] If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward;
[0105] If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes;
[0106] When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
[0107] The ripple diffusion algorithm is based on the ripple diffusion phenomenon caused by raindrops falling on the water surface in the real environment. When raindrops fall on the lake surface, the phenomenon of ripples spreading and colliding in circles is actually a complex process involving physics. When raindrops fall on the lake surface, it will produce an impact force on the lake surface, and this impact force causes the water molecules on the lake surface to begin to vibrate. This vibration will spread rapidly, forming the ripples we see.
[0108] Specifically, the impact force of raindrops squeezes the water molecules in the vertical direction, and then these water molecules spread outward, forming circles of ripples that spread outward. These ripples are actually the trajectories of the water molecules on the water surface during the vibration process, and they propagate in all directions on the plane at the same speed. Therefore, at the same moment, the vibration state of points on the water surface that are equidistant from the point where the raindrops fall is the same, and the point set composed of points that are equidistant from a certain point on the plane is a circle, so we see that the water waves spread out in circles.
[0109] As these ripples spread outward, they may encounter other obstacles on the lake's surface, such as lotus leaves, rocks, or ripples from other raindrops. When two or more ripples meet, they collide. During a collision, the shape and amplitude of the ripples may change, depending on their amplitude, frequency, and direction of propagation. Sometimes, the ripples may merge into a larger ripple after a collision; other times, they may cancel each other out, causing the ripples to weaken or disappear.
[0110] Combining the ripple diffusion phenomenon with the regional expansion process of the embodiment of the present application, the classification problem of each node when partitioning the power grid can be regarded as starting from the source point (the point where the raindrops fall) at the same time, and the size of the area covered in the process of propagating outward like a ripple.
[0111] The power grid is divided into multiple blocks, which is equivalent to several drops of rain falling on the lake at the same time. The nodes in the power grid are relative to the stationary obstacles on the lake. The raindrops propagate in all directions on the plane at the same speed from the point where they land on the lake as the source point. When they encounter obstacles on the lake (i.e. nodes other than the source point), new ripples are generated and continue to move outward on the lake (branch connected to the node) at the same speed. In the process of spreading outward, in addition to encountering stationary obstacles, they will also encounter ripples generated by other raindrops (source points). At this time, it is necessary to compare the equivalent electrical distance D between the node i where the collision occurs and the source points j and k of each ripple. ij , D ik, the "colliding" nodes are assigned to blocks with smaller D values, and the ripples generated by the source points cancel each other out after colliding with each other and stop spreading. In this way, starting from the source point, the areas covered by the ripples generated by each of them are the various partitions of the power grid, and the power grid partition structure is obtained.
[0112] The embodiment of the present application takes the source point of the first area as an example to illustrate the specific process of expanding the area outward with the source point of the first area as the center point. Based on the ripple diffusion algorithm, the grid nodes to be included that are directly connected to the center point are retrieved to see if they meet the node inclusion conditions. When the grid node to be included does not belong to any grid secondary area and is not directly connected to the grid nodes of other grid secondary areas, it can be directly included in the first grid secondary area of the source point of the first area, and the newly included grid node is used as the new center point to continue to expand the area outward; when the grid node to be included does not belong to any grid secondary area but is also directly connected to the grid nodes of other grid secondary areas, it means that this grid node is at the junction of the first grid secondary area and other grid secondary areas, then the region to which the grid node is to be included is determined based on the electrical distance between the grid node to be included and the other directly connected grid nodes.
[0113] Furthermore, after obtaining various grid partition structures, we need to quantitatively evaluate each grid partition structure and select the optimal grid partition structure. The embodiment of the present application introduces a modular Q function in this step. The concept of the modular Q function is as follows:
[0114] A network consists of a large number of nodes and edges connecting them. In recent years, many real networks have a remarkable property: their community structure. This structure shows that the nodes on the network are divided into different small groups, with closer connections between small groups and larger groups isolated from each other.
[0115] In the process of exploring the formation of network communities, descriptive concepts cannot be used intuitively. Therefore, Girvan and Newman defined the modular Q function to qualitatively describe the communities in the Internet and evaluate the analysis of the formation of network communities. The so-called modularity refers to the ratio of the ratio of the edges linking the internal nodes of the community structure in the network system to the expected value of the ratio of the edges linking the internal nodes of the community structure in other single random networks. The specific formula is:
[0116]
[0117] Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c jRespectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j )=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure.
[0118] In a preferred embodiment, in order to verify the feasibility and effectiveness of the method provided in this application, we use MATLAB 2020a to implement the power grid partitioning method provided in this application, and perform simulation verification on the IEEE39 node system and the IEEE118 system.
[0119] In the IEEE 39 node system, the electrical coupling connection degree w of each node is calculated by step S2. i , the results after arranging them in descending order are shown in Table 1:
[0120] Table 1 IEEE39 system electrical coupling connectivity w i
[0121]
[0122] After obtaining the electrical coupling connectivity of each node, select the correction coefficient K = 1, then find the minimum electrical distance between the source points based on the number of partitions N, and then determine the nodes where the N source points are located. According to the ripple diffusion method, determine the nodes of each partition, obtain the corresponding power grid partition structure and calculate the Q value. We selected 19 N values from 2 to 20, that is, 19 planned partition numbers, and obtained 19 different power grid partition structures through the ripple diffusion method. The Q value changes corresponding to each partition structure are as follows: Figure 3 As shown. Figure 3 It can be found that when the planned number of partitions is 4, the Q value of the power grid partition structure is the largest, which is 0.61035. Therefore, the power grid partition structure corresponding to the planned number of partitions is determined to be the optimal partition result. When the planned number of partitions is 4, the corresponding power grid partition structure is as follows: Figure 4As shown in the figure, the power grid is divided into 4 power grid secondary areas, and nodes 17, 4, 2 and 26 are selected as regional source points. This is the result obtained by comprehensively considering the two evaluation parameters of electrical coupling connectivity and minimum electrical distance. For example, although node 16 ranks second in electrical coupling connectivity among all nodes, its electrical distance with node 17 is less than the minimum electrical distance calculated by the system, and node 17 will become a regional source point before node 16 because of its largest electrical coupling connectivity. Therefore, node 16 will not be selected as a regional source point, avoiding the selection of source points being concentrated in one area.
[0123] In addition, in the IEEE118 system, the correction coefficient K=1.8 is selected. The Q value changes corresponding to each partition structure are as follows: Figure 5 As shown in Figure 2, we can see that when the number of partitions is 6, the maximum value of the Q function is 0.673949. When the planned number of partitions is 6, the corresponding power grid partition structure is as follows: Figure 6 shown.
[0124] Embodiment 2:
[0125] like Figure 7 As shown, accordingly, embodiment 2 provides a power grid partitioning system based on a ripple diffusion algorithm, including an acquisition module 10, a first calculation module 20, a partition structure generation module 30, a second calculation module 40 and a comparison module 50;
[0126] The acquisition module 10 is used to acquire the admittance matrix, the network connection matrix and several planned partition numbers of the power grid;
[0127] The first calculation module 20 is used to calculate the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node according to the admittance matrix, wherein the electrical coupling connectivity indicates the importance of a certain grid node to the entire grid structure;
[0128] The partition structure generation module 30 is used to generate the corresponding power grid partition structure according to each of the planned partition numbers, including a source point selection unit 301 and an area expansion unit 302;
[0129] The source point selection unit 301 is used for selecting N grid nodes from the grid nodes as N regional source points for any first planned partition number N according to the electrical coupling connectivity, wherein each regional source point corresponds to a grid secondary area;
[0130] The area expansion unit 302 is used to expand the area outward with each of the regional source points as the center point based on the preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between each of the power grid nodes, to determine the range of each power grid secondary area, and then determine the power grid partition structure corresponding to the first planned partition number N;
[0131] The second calculation module 40 is used to calculate the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function;
[0132] The comparison module 50 is used to compare the Q values corresponding to the respective power grid partition structures, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
[0133] Further, such as Figure 8 As shown, the first calculation module 20 includes an impedance matrix calculation unit 201, an electrical distance calculation unit 202, and an electrical coupling connectivity calculation unit 203;
[0134] The impedance matrix calculation unit 201 is used to calculate the impedance matrix of the power grid according to the admittance matrix;
[0135] The electrical distance calculation unit 202 is used to calculate the electrical distance between each grid node according to the impedance matrix;
[0136] The electrical coupling connectivity calculation unit 203 is used to calculate the reciprocal of the sum of electrical distances between any first grid node and other grid nodes, determine the electrical coupling connectivity of the first grid node, and further determine the electrical coupling connectivity corresponding to each grid node.
[0137] In a possible implementation, the source point selection unit 301 selects N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity, including:
[0138] Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes;
[0139] The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula;
[0140] According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
[0141] In a possible implementation, when the area is expanded outward with any first area source point among the area source points as the center point to determine the range of the first power grid secondary area, the area expansion unit 302, based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between the various power grid nodes, respectively expands the area outward with each of the area source points as the center point to determine the range of each power grid secondary area, including:
[0142] Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas;
[0143] If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward;
[0144] If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes;
[0145] When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
[0146] Furthermore, the second calculation module 40 calculates the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function. The specific formula is:
[0147]
[0148] Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c j Respectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j )=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure.
[0149] The embodiment of the present application provides a power grid partitioning system based on the ripple diffusion algorithm, which calculates the electrical distance and electrical coupling degree of each power grid node, and realizes the rapid selection of regional source points according to the planned partition number; further, on the basis of the regional source point, each power grid node is partitioned from each source point based on the ripple diffusion idea to form a corresponding power grid partitioning structure; finally, the Q value corresponding to the power grid partitioning structure is calculated based on the preset modular Q function. The embodiment of the present application obtains several planned partition numbers, generates different power grid partitioning structures, and calculates the Q values corresponding to each of these power grid partitioning structures respectively, and determines the optimal number of partitions and power grid partitioning structure by comparing the size of the Q value, thereby realizing the automatic partitioning of the power grid, improving the efficiency and rationality of the power grid partitioning, and providing a strong guarantee for the normal operation and control of the power grid.
[0150] The more detailed working principle and step flow of this embodiment can refer to, but are not limited to, the relevant records of Embodiment 1.
[0151] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A power grid partitioning method based on ripple diffusion algorithm, characterized in that: include: Obtain the admittance matrix, network connection matrix and several planned partition numbers of the power grid; According to the admittance matrix, the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node are calculated, wherein the electrical coupling connectivity represents the importance of a certain grid node to the entire grid structure; Generating the corresponding power grid partition structures according to the number of each planned partition, including: For any first planned partition number N, according to the respective electrical coupling connectivity, N grid nodes are selected from the respective grid nodes as N regional source points, wherein each of the regional source points corresponds to a grid secondary region; Based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distances between the respective power grid nodes, the regions are expanded outward with the respective regional source points as the center points, the ranges of the respective power grid secondary regions are determined, and then the first power grid partition structure corresponding to the first planned partition number N is determined; Calculating the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function; The Q values corresponding to the various power grid partition structures are compared, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
2. A method for power grid partitioning based on ripple diffusion algorithm as claimed in claim 1, characterized in that: The step of calculating the electrical distance between each grid node and the electrical coupling connection degree corresponding to each grid node according to the admittance matrix includes: Obtaining an impedance matrix of a power grid according to the admittance matrix calculation; Obtaining electrical distances between various grid nodes by calculation according to the impedance matrix; For any first grid node, the reciprocal of the sum of the electrical distances between the first grid node and other grid nodes is calculated to determine the electrical coupling connectivity of the first grid node, and then determine the electrical coupling connectivity corresponding to each grid node.
3. A power grid partitioning method based on ripple diffusion algorithm as claimed in claim 1, characterized in that: The selecting N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity degrees includes: Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes; The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula; According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
4. A method for power grid partitioning based on ripple diffusion algorithm as claimed in claim 1, characterized in that: When the area is expanded outwards with any first area source point among the area source points as the center point to determine the range of the first power grid secondary area, the preset ripple diffusion algorithm is based on the network connection matrix of the power grid and the electrical distance between the various power grid nodes, and the area is expanded outwards with each of the area source points as the center point to determine the range of each power grid secondary area, including: Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas; If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward; If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes; When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
5. A method for power grid partitioning based on ripple diffusion algorithm as claimed in claim 1, characterized in that: According to the preset modular Q function, the Q value of the power grid partition structure corresponding to each of the planned partition numbers is calculated, and the specific formula is: Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c j Respectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j )=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure.
6. A power grid partitioning system based on ripple diffusion algorithm, characterized in that: It includes an acquisition module, a first calculation module, a partition structure generation module, a second calculation module and a comparison module; The acquisition module is used to acquire the admittance matrix, the network connection matrix and several planned partition numbers of the power grid; The first calculation module is used to calculate the electrical distance between each grid node and the electrical coupling connectivity corresponding to each grid node according to the admittance matrix, wherein the electrical coupling connectivity indicates the importance of a certain grid node to the entire grid structure; The partition structure generation module is used to generate the corresponding power grid partition structure according to each of the planned partition numbers, including a source point selection unit and an area expansion unit; The source point selection unit is used for selecting N grid nodes from the grid nodes as N regional source points for any first planned partition number N according to the respective electrical coupling connectivity, wherein each of the regional source points corresponds to a grid secondary area; The area expansion unit is used to expand the area outward with each of the regional source points as the center point based on a preset ripple diffusion algorithm, according to the network connection matrix of the power grid and the electrical distance between each of the power grid nodes, to determine the range of each of the power grid secondary areas, and then determine the power grid partition structure corresponding to the first planned partition number N; The second calculation module is used to calculate the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function; The comparison module is used to compare the Q values corresponding to the respective power grid partition structures, and the power grid partition structure corresponding to the maximum Q value is the partition result of the power grid.
7. A power grid partitioning system based on ripple diffusion algorithm as claimed in claim 6, characterized in that: The first calculation module includes an impedance matrix calculation unit, an electrical distance calculation unit, and an electrical coupling connectivity calculation unit; Wherein, the impedance matrix calculation unit is used to calculate and obtain the impedance matrix of the power grid according to the admittance matrix; The electrical distance calculation unit is used to calculate the electrical distance between each grid node according to the impedance matrix; The electrical coupling connectivity calculation unit is used to calculate the reciprocal of the sum of electrical distances between any first grid node and other grid nodes, determine the electrical coupling connectivity of the first grid node, and further determine the electrical coupling connectivity corresponding to each grid node.
8. A power grid partitioning system based on ripple diffusion algorithm as claimed in claim 6, characterized in that: The source point selection unit selects N grid nodes from the grid nodes as N regional source points according to the electrical coupling connectivity, including: Combining the electrical distances between the various grid nodes to construct a spatial distance matrix for representing the distances between the various grid nodes; The minimum electrical distance between source points in each area is calculated according to the spatial distance matrix, the first planned partition number N and a preset formula; According to the regional source point selection conditions, N grid nodes are selected from the various grid nodes as N regional source points, wherein the regional source point selection conditions include: selecting regional source points from large to small according to the electrical coupling connectivity, and the electrical distance between each regional source point is greater than the minimum electrical distance.
9. A power grid partitioning system based on ripple diffusion algorithm as claimed in claim 6, characterized in that: When the area is expanded outwardly with any first area source point among the area source points as the center point to determine the range of the first power grid secondary area, the area expansion unit expands the area outwardly with each of the area source points as the center point based on a preset ripple diffusion algorithm according to the network connection matrix of the power grid and the electrical distances between the various power grid nodes to determine the range of each power grid secondary area, including: Taking the first regional source point as the center point, respectively searching whether the grid nodes to be included that are directly connected to the center point meet the node inclusion conditions, wherein the node inclusion conditions include: the grid node to be included does not belong to any grid secondary area, and the grid node to be included is not directly connected to grid nodes in other grid secondary areas; If the grid node to be included meets the node inclusion condition, the grid node to be included is included in the grid secondary area corresponding to the first regional source point, and the grid node to be included is used as a new center point to continue to expand the area outward; If the grid node to be included does not belong to any grid secondary region, and the grid node to be included is directly connected to grid nodes in other grid secondary regions, then the region to which the grid node to be included belongs is determined according to the electrical distance between the grid node to be included and the other directly connected grid nodes; When the first power grid secondary area can no longer accommodate new power grid nodes, the scope of the first power grid secondary area is determined.
10. A power grid partitioning system based on ripple diffusion algorithm as claimed in claim 6, characterized in that: The second calculation module calculates the Q value of the power grid partition structure corresponding to each of the planned partition numbers according to a preset modular Q function, and the specific formula is: Among them, A ij Represents the elements in the network connection matrix. If the grid nodes i and j are connected by an edge, then A ij =1, otherwise it is equal to 0, c i 、c j Respectively represent the grid secondary area to which grid nodes i and j belong, δ(c i ,c j ) is the Kronecker function, when c i =c j When δ(c i ,c j )=1, otherwise it is equal to 0, is the number of branches in the power system network, and the possibility that there is a branch connection between nodes i and j is k i , k j are the degrees of grid nodes i and j respectively, and Q is the Q value corresponding to the grid partition structure.
