A method for generating medium voltage topology diagram of distribution network based on line crossing regularity
By performing line cross-span regular processing and color rendering on the distribution network medium voltage topology map, the problems of low efficiency and poor effect in the existing technology are solved, efficient and accurate topology map generation are achieved, and the scientificity and work efficiency of operation and maintenance decisions are improved.
Patent Information
- Application Number
- CN202510068522.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-16
AI Technical Summary
The generation efficiency of medium voltage topology diagrams in the existing distribution network is low and poor, which makes it difficult for operation and maintenance personnel to quickly obtain key information, affecting work efficiency, and the generated topology diagrams do not fully match the actual operating status of the distribution network.
Using a method based on line cross-span regularization, the original topology map is arranged in a secondary regular manner, and a variety of actual constraints affecting the line layout are comprehensively considered to generate a more regular and beautiful topology map, and color rendering is performed to improve readability and recognition.
It greatly improves the generation efficiency, readability and recognition of topology maps, so that the automatically generated topology maps are highly consistent with the actual operating status of the distribution network, improves the accuracy and foresight of operation and maintenance decisions, and saves a lot of manpower, real-time updates and large-scale generation.
Smart Images

Figure CN119478125B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of topology map generation, and more specifically, to a method for generating a medium-voltage topology map of a distribution network based on regular line crossings. Background Art
[0002] The distribution network is an important part of the power system, responsible for transmitting electricity from substations to end users. With the acceleration of urbanization and the continuous growth of electricity load, the scale of the distribution network is also expanding, the line equipment is increasing, and the operation and management work is becoming more and more complicated. In the operation and management of the distribution network, the topology map is an important tool and information carrier. The topology map can clearly and intuitively display the connection relationship, voltage level, load distribution and other key information of the distribution network lines and equipment, and provide a decision-making basis for distribution network planning, scheduling, line loss management and other work.
[0003] As the distribution network continues to expand and the number of line equipment increases, manual drawing can no longer meet the needs of real-time updating and large-scale generation, which restricts the efficient development of distribution network operation and maintenance work; secondly, the line direction of the manually drawn topology map is often not regular enough, the equipment layout appears messy and disordered, the visual effect is poor, and the readability and recognition are low; this hinders the operation and maintenance personnel from quickly obtaining key information and affects work efficiency. Especially for large-scale distribution networks, it is difficult for the human eye to grasp the overall situation at one time, and it is easy to omissions and errors; furthermore, it is difficult to fully consider the various complex constraints of the line, and the generated topology map may deviate from the actual operating status of the distribution network; this deviation will cause subsequent distribution network planning, scheduling, and line loss management decisions to be inaccurate and forward-looking; in addition, the display effect of different lines and equipment in the drawn topology map is relatively single and lacks differentiation, which brings certain troubles to the work of operation and maintenance personnel. Traditional topology maps can no longer adapt to the increasingly large distribution network and increasingly complex operation and maintenance work.
[0004] In view of the low efficiency and poor effect of the existing distribution network medium-voltage topology map generation, the present invention proposes a distribution network medium-voltage topology map generation method based on line crossing regularization. By performing a secondary regularization arrangement process on the original topology map and comprehensively considering various actual constraints that affect the line layout, the automatically generated topology map is highly consistent with the actual operating status of the distribution network, greatly improving the generation efficiency, readability and recognition of the topology map. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: A method for generating a medium-voltage topological map of a distribution network based on regular line crossings, comprising: step 1, obtaining distribution network line equipment data, preprocessing the distribution network line equipment data, and obtaining a preliminary data packet for map construction;
[0006] Step 2: construct the original topology map according to the graph, construct the preliminary data package, and arrange the original topology map in a regular manner to obtain a preliminary regular topology map;
[0007] Step 3, cross-regularizing the preliminary regularized topology map to obtain a regularized topology map;
[0008] Step 4: Perform color rendering on the regularized topology map to obtain the final distribution network medium-voltage topology map.
[0009] Furthermore, the distribution network line equipment data includes line data and equipment data; the line data includes line number, line start and end point coordinates, line type, line connection information, line voltage level, line length, line impedance parameters and line load data;
[0010] Equipment data includes equipment number, equipment type, equipment installation location coordinates, equipment rated capacity or specification model, equipment voltage level, equipment connection line information and equipment status.
[0011] Further, the method of preprocessing the distribution network line equipment data includes: checking the distribution network line equipment data, unifying the data from different sources into a specified data format, and converting the original coordinate data of the line start and end point coordinates and the equipment installation location coordinates into a unified coordinate system;
[0012] Create a line data structure, which includes line number, starting and ending point coordinates, line type and line voltage level; create an equipment data structure, which includes equipment number, type, installation location coordinates and equipment voltage level;
[0013] Define the association relationship, traverse the line data structure, obtain the connection information of each line, and associate the starting point and end point of the line with the corresponding device based on the connection information; traverse the device data structure, obtain the connection line information of each device, and associate the device with the corresponding line based on the connection line information; and store it as an adjacency list or adjacency matrix data structure, that is, obtain the preliminary data packet for graph construction.
[0014] Furthermore, the conversion to a unified coordinate system includes:
[0015] Define the central longitude and latitude (λ0, φ0) and standard latitude φ1 of the conversion, where λ0 is the central longitude; φ0 is the central latitude; based on the defined central longitude and latitude (λ0, φ0) and standard latitude φ1, calculate the conversion auxiliary variables; the conversion auxiliary variables include the latitude conversion constant n and the longitude conversion constant ρ0;
[0016] Latitude conversion setting ;
[0017] Longitude conversion setting ;
[0018] Transform each original coordinate data (λ, φ) based on the conversion auxiliary variable, where λ is the latitude of the original coordinate data, and φ is the longitude of the original coordinate data;
[0019] The formula for the transformation is:
[0020] ;
[0021] ;in, The plane rectangular coordinates are transformed from the original coordinate data; the transformed plane rectangular coordinates are translated and scaled to complete the transformation of the unified coordinate system.
[0022] Furthermore, the method of constructing the original topology graph includes:
[0023] Create a blank canvas, set the size and coordinate system of the blank canvas, traverse the graph to build the line data structure in the preliminary data package, and draw the line on the canvas according to the coordinates of the starting and ending points of the line; use straight line segments or curves to draw, and use different line types according to the line type; traverse the graph to build the device data structure in the preliminary data package, and draw the device nodes on the canvas according to the plane rectangular coordinates of the device; different types of devices use different device node styles; according to the association relationship stored in the line data structure and the device data structure, draw the connection relationship between the line and the device on the canvas; use line segments or curves to connect the line endpoints and the connected device nodes; add annotation information to the line and the device on the canvas; the position of the annotation information is adjusted according to the line direction and the device position, and the original topology map is obtained.
[0024] Furthermore, the method of performing regular arrangement processing includes:
[0025] A regular grid is formed on the canvas, where each grid is a square; the side length G of the grid is adaptively set;
[0026] ;in, is the average line length, , , and is the adjustment coefficient, is the standard deviation of line length, A is the coverage area of the distribution network, P is the perimeter of the distribution network, is the number of branches, The number of trunk lines;
[0027] The coordinates of the starting and ending points of all lines are obtained from the original topological map, and each line is split into several small line segments according to the coordinates of the starting and ending points to obtain a set of small line segments of all lines; all small line segments in the set of small line segments are traversed, and for each small line segment, its positional relationship with the grid boundary is determined. If the small line segment is completely on the grid boundary, the corresponding small line segment is determined to be a line segment that does not need to be regularized; if the small line segment intersects the grid boundary or the small line segment is completely inside the grid, the corresponding small line segment is determined to be a line segment that needs to be regularized;
[0028] For each line segment that needs to be regularized, determine its starting point and end point, and based on the starting point and end point, enumerate all possible grid boundary paths; and determine one of the grid boundary paths as the preliminary regularized path corresponding to the line segment that needs to be regularized; and smooth the preliminary regularized path to obtain the regularized path corresponding to the line segment that needs to be regularized; connect the regularized path of the line segment that needs to be regularized and the line segment that does not need to be regularized in the order of splitting, and smooth the turning point to obtain a complete line after regularization;
[0029] Traverse each device node in the original topology graph, and for each device node, determine the grid area where the device can be placed based on its connection relationship with the line; obtain all the lines connected to the device, which are recorded as connected lines; for each connected line, find its intersection with the grid boundary, record the grids where these intersections are located, and obtain a grid set;
[0030] For each grid j in the grid area where the device can be placed, calculate its device energy value ;
[0031] ; Where D is the distance from grid j to the nearest line, o is the angle from grid j to the nearest line, W1 and W2 are influence weights, and a2, b2 and c1 are function parameters;
[0032] Find the grid with the smallest device energy value as the placement position of the corresponding device node, and place the device node at the center of the corresponding grid; traverse the complete line after regularization, and for the starting point and end point of each complete line after regularization, if the starting point or end point does not coincide with any device, adjust it to the position of the nearest device; obtain a preliminary regularized topology map.
[0033] Furthermore, the method of determining one of the grid boundary paths as a preliminary regularized path corresponding to the line segment to be regularized includes:
[0034] For each grid boundary path, decompose it into a series of line segments, and for each line segment i, calculate its energy value within the grid ;
[0035] ; Where I is the length of the line segment, K is the curvature of the line segment, is the angle between the line segment and the grid boundary, d is the distance from the line segment to the nearest device, and is a nonlinear adjustment parameter, a1 is a preset baseline energy value; and is the influence weight, b1 is the penalty item influence weight, c is the distance adjustment parameter; ds represents the microelement length of the line segment;
[0036] Add up the energy values of all line segments corresponding to the grid boundary path to obtain the total energy value of the corresponding grid boundary path; use the grid boundary path with the smallest total energy value as the preliminary regularization path corresponding to the line segment to be regularized;
[0037] The method of enumerating all possible grid boundary paths includes:
[0038] The grid grid is regarded as an undirected graph, each grid boundary edge is regarded as an undirected edge, and the intersection points of the grid boundaries are regarded as nodes of the undirected graph, thus obtaining the grid boundary graph;
[0039] Map the starting point a and the end point b of the line segment to be regularized to the grid boundary graph, and find the nodes closest to a and b as the corresponding graph starting point s and graph end point t;
[0040] Initialize, create an empty path set P2 and an empty path prefix set Q2, take the graph starting point s as a path prefix with a length of 1, add it to Q2, take a path prefix from Q2, find its last node v, traverse all adjacent nodes w of v, if w is not in the taken out path prefix, add the taken out path prefix to w to get a new path prefix x', if the last node of the new path prefix x' is the graph end point t, add x' to the path set P2, otherwise, add x' to the path prefix set Q2, and remove the original taken out path prefix from Q2 until Q2 is empty, P2 stores all simple paths from s to t, that is, grid boundary paths.
[0041] Furthermore, the cross-regularization processing includes:
[0042] Statistical importance index of each complete line J after regularization in the preliminary regularized topology graph ;
[0043] ;
[0044] Where V is the line voltage level, is the lowest voltage level, is the highest voltage level, is the line length, is the impedance parameter, is the load data, is the maximum load data, is the device voltage level, is the minimum equipment voltage level, is the highest equipment voltage level, It is the device status indication function, and its value is 1 or 0;
[0045] Sort each regularized complete route from large to small according to the corresponding calculated importance index, and select the first N1 routes as the trunk routes; add a vertical sweep line on the canvas, the initial position of the sweep line is located at the leftmost side of the canvas, and the sweep line sweeps across the entire canvas from left to right. When the sweep line sweeps across a trunk route, determine the intersection of the trunk route and the sweep line, plant a seed point at the intersection, and determine the direction of the trunk route at the seed point based on the seed point, and fix the direction of the trunk route at the seed point;
[0046] At each seed point, a line segment grows out, and the direction of the line segment is the determined direction, and this process is repeated until the sweep line sweeps across the entire canvas;
[0047] If there are several lines intersecting in a certain area, this area is defined as the intersection area. For each line in the intersection area, its priority index is calculated; all lines in the intersection area are sorted in descending order according to the corresponding priority index, and the lines are placed from top to bottom. If there is a trunk line in the intersection area, the trunk line is placed on the top layer to complete the adjustment of the up and down running order of the lines; and a regularized topology map is obtained.
[0048] Furthermore, the method of determining the direction of the trunk line at the seed point includes:
[0049] Get two adjacent seed points before and after the seed point. If the seed point is the starting point or end point of the main line, there is only one adjacent seed point. If the seed point is located in the middle of the main line, there are two adjacent seed points. If there is only one adjacent seed point, the direction of the line at the seed point is determined by the position of the adjacent seed point, forming a straight line segment. If there are two adjacent seed points, the direction of the line at the seed point is determined by the positions of the two adjacent seed points, forming a broken line segment or a curve segment. Use the seed point and the two adjacent seed points as control points to generate a cubic Bezier curve segment, or use the seed point as the center of the circle and the radius determined by the two adjacent seed points to form an arc.
[0050] Furthermore, the method of color rendering the regularized topological map includes:
[0051] Create a two-dimensional grid whose size is the same as the canvas size of the regularized topology map, map all the lines and devices in the regularized topology map into the two-dimensional grid, and assign an initial color value to each grid cell in the two-dimensional grid;
[0052] Define the color rules for lines and devices, that is, determine different colors according to the line voltage level of the line, and determine different colors according to the type of equipment; define the color diffusion rule, set a diffusion radius r, which means that the color can diffuse to the range of r grid units away from the line or device; the color of the line and the device will diffuse to the grid units within the diffusion radius r, and define the attenuation function , which indicates the color intensity as the diffusion distance and change;
[0053] ;in, is the diffusion distance, , and is the parameter that controls the shape of the attenuation curve;
[0054] Traverse each grid cell in the two-dimensional grid. For the grid cells mapped with lines or devices, add the corresponding color value to the corresponding grid cell according to the line voltage level or device type. For the grid cells without mapping lines or devices, calculate the weighted average of the color values of the grid cells within the diffusion radius r of the grid cell; and update the color value of the grid cell according to the color diffusion rule, and repeat the update until the color value of the entire two-dimensional grid converges.
[0055] Traverse each grid cell in the two-dimensional grid, and map the color value of the grid cell back to the line or device in the corresponding regularized topology map. That is, if the grid cell maps the line, the line is rendered in the corresponding color; if the grid cell maps the device, the device is rendered in the corresponding color; and obtain the medium-voltage topology map of the distribution network.
[0056] The technical effects and advantages of the method for generating a medium-voltage topology diagram of a distribution network based on regular line crossings of the present invention are as follows:
[0057] The present invention can automatically generate a topology map with orderly lines, reasonable and beautiful equipment layout, good visual effect, which greatly enhances the readability and recognition of the topology map; different voltage level lines and different types of equipment are rendered in different colors, and the color transition is natural and smooth, avoiding hard boundaries and further optimizing the visual experience; it helps operation and maintenance personnel to quickly and efficiently obtain key information and improve work efficiency; secondly, it can comprehensively consider various actual constraints such as line length, curvature, voltage level, load, etc., so that the automatically generated topology map is highly consistent with the actual operating status of the distribution network, and provides accurate and reliable data support for subsequent distribution network planning, scheduling, line loss management and other decisions, which is conducive to improving the scientific nature and foresight of decision-making; in addition, the automatic topology map generation does not require human intervention, which not only saves a lot of manpower, but also can realize real-time updating and large-scale generation, meeting the real-time and comprehensive requirements of distribution network operation and maintenance for topology maps, and providing a solid guarantee for efficient management. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic diagram of a method for generating a medium-voltage topology diagram of a distribution network based on regular line crossings according to the present invention;
[0059] Figure 2 The present invention is a schematic diagram of a system for generating a medium-voltage topology diagram of a distribution network based on regular line crossings. DETAILED DESCRIPTION
[0060] 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.
[0061] Example 1
[0062] See also Figure 1 As shown, the method for generating a medium-voltage topology diagram of a distribution network based on regular line crossings described in this embodiment includes:
[0063] Step 1: Obtain distribution network line equipment data, pre-process the distribution network line equipment data, and obtain a preliminary data packet for graph construction;
[0064] Step 2: construct the original topology map according to the graph, construct the preliminary data package, and arrange the original topology map in a regular manner to obtain a preliminary regular topology map;
[0065] Step 3, cross-regularizing the preliminary regularized topology map to obtain a regularized topology map;
[0066] Step 4: Render the regularized topology map in color to obtain the final medium-voltage topology map of the distribution network; automatically and efficiently generate a beautiful, clear medium-voltage topology map that meets the needs of distribution network operation and management, thereby improving the work efficiency of distribution network planning, scheduling, line loss management and other businesses.
[0067] Furthermore, the distribution network line equipment data includes line data and equipment data;
[0068] Line data includes line number, line start and end point coordinates, line type (such as overhead line, cable line, etc.), line connection information (recording the connection relationship between the line and other lines or equipment), line voltage level, line length, line impedance parameters (line resistance) and line load data;
[0069] Equipment data includes equipment number, equipment type (such as transformer, switchgear, ring main unit, etc.), equipment installation location coordinates, equipment rated capacity or specification model, equipment voltage level, equipment connection line information (the connection relationship between the equipment and the line) and equipment status (such as in operation, under maintenance, etc.); these data come from the design documents, operation records, online monitoring systems, etc. of the distribution network, and are the basic data for generating the distribution network topology map.
[0070] Methods for preprocessing distribution network line equipment data include:
[0071] Check the data of distribution network line equipment and eliminate invalid or erroneous data; unify data from different sources into specified data formats, such as CSV, JSON, etc.; convert the original coordinate data of line start and end point coordinates and equipment installation location coordinates into a unified coordinate system.
[0072] Specifically, the central longitude and latitude (λ0, φ0) and standard latitude φ1 of the conversion are defined, where λ0 is the central longitude; φ0 is the central latitude; the central longitude and latitude select the approximate center position of the study area; the standard latitude φ1 takes the average latitude of the study area; based on the defined central longitude and latitude (λ0, φ0) and standard latitude φ1, the conversion auxiliary variables are calculated; the conversion auxiliary variables include the latitude conversion constant n and the longitude conversion constant ρ0; the latitude conversion constant ;
[0073] Longitude conversion setting ;
[0074] Transform each original coordinate data (λ, φ) based on the conversion auxiliary variable, where λ is the latitude of the original coordinate data, and φ is the longitude of the original coordinate data;
[0075] The formula for the transformation is:
[0076] ;
[0077] ;in, The plane rectangular coordinates are transformed from the original coordinate data; the transformed plane rectangular coordinates are translated and scaled to fall into the appropriate coordinate range; that is, the conversion of the unified coordinate system is completed.
[0078] According to the line connection information and the equipment connection line information, the topological connection relationship between the line and the equipment is constructed; specifically, a line data structure is created, the line data structure includes the line number, the starting and ending point coordinates, the line type and the line voltage level; an equipment data structure is created, the equipment data structure includes the equipment number, type, installation location coordinates and equipment voltage level.
[0079] Define the association relationship, traverse the line data structure, obtain the connection information of each line, and associate the starting point and end point of the line with the corresponding device based on the connection information; traverse the device data structure, obtain the connection line information of each device, and associate the device with the corresponding line based on the connection line information; and store it as an adjacency list or adjacency matrix data structure, that is, obtain the preliminary data packet for graph construction.
[0080] The methods for constructing the original topology graph include:
[0081] Create a blank canvas, set the size and coordinate system (plane rectangular coordinates) of the blank canvas, traverse the graph to build the line data structure in the preliminary data package, and draw the line on the canvas according to the coordinates of the starting and ending points of the line; draw it in straight line segments or curves, and use different line types according to the line type (such as overhead lines or cable lines).
[0082] The traversal graph constructs the device data structure in the preliminary data packet, and draws the device nodes on the canvas according to the plane rectangular coordinates of the device; different types of equipment (such as transformers, switchgear, etc.) use different device node styles; according to the association relationship stored in the line data structure and the device data structure, draw the connection relationship between the line and the device on the canvas; use line segments or curves to connect the line endpoints and the connected device nodes; add annotation information to the line and equipment on the canvas, such as line number, equipment number, voltage level, etc.; the position of the annotation information is appropriately adjusted according to the line direction and equipment position to avoid overlap, and the original topology map is obtained.
[0083] According to the graph, a preliminary data package is constructed to draw the original medium-voltage topology diagram of the distribution network on the canvas; the original topology diagram reflects the actual connection relationship between the distribution network lines and equipment, but the line direction and equipment layout may not be regular and beautiful enough.
[0084] The methods for regular arrangement processing include:
[0085] A regular grid is formed on the canvas, where each grid is a square; the side length G of the grid is adaptively set;
[0086] ;in, is the average line length, , , and is the adjustment coefficient, is the line length standard deviation, is the distribution network coverage area, is the distribution network perimeter, is the number of branches, is the number of trunk lines; it should be noted that the distribution network lines and equipment are distributed in a certain geographical area, which is approximated by a closed polygon. The boundary line of the polygon is the outer boundary of the distribution network coverage area. The sum of the lengths of these boundary line segments is the distribution network perimeter of the distribution network coverage area; the distribution network coverage area is the area of the distribution network coverage area.
[0087] The starting and ending point coordinates of all lines are obtained from the original topological map, and each line is split into several small line segments according to the starting and ending point coordinates to obtain a set of small line segments for all lines; all small line segments in the small line segment set are traversed, and for each small line segment, its positional relationship with the grid boundary is determined. If the small line segment is completely on the grid boundary, the corresponding small line segment is determined to be a line segment that does not need to be regularized; if the small line segment intersects with the grid boundary or the small line segment is completely inside the grid, the corresponding small line segment is determined to be a line segment that needs to be regularized.
[0088] For each line segment that needs to be regularized, determine its starting point and end point, and based on the starting point and end point, enumerate all possible grid boundary paths, which are composed of a series of grid boundary edges; and determine one of the grid boundary paths as the preliminary regularization path for the corresponding line segment that needs to be regularized.
[0089] Specifically, the lattice grid is regarded as an undirected graph, each lattice boundary edge is regarded as an undirected edge, and the intersection points of the lattice boundaries are regarded as nodes of the undirected graph, so as to obtain a lattice boundary graph; the starting point a and the end point b of the line segment to be regularized are mapped to the lattice boundary graph, and the nodes closest to a and b are found as the corresponding graph starting point s and graph end point t.
[0090] Initialize, create an empty path set P2 and an empty path prefix set Q2, take the graph starting point s as a path prefix with a length of 1, add it to Q2, take a path prefix from Q2, find its last node v (at this time v is the graph starting point s), traverse all adjacent nodes w of v, if w is not in the taken out path prefix (to avoid loops), add the taken out path prefix to w to get a new path prefix x', if the last node of the new path prefix x' is the graph end point t, add x' to the path set P2, otherwise, add x' to the path prefix set Q2, and remove the original taken out path prefix from Q2 until Q2 is empty, indicating that all path prefixes have been expanded, P2 stores all simple paths from s to t, that is, grid boundary paths.
[0091] Use a hash table or sorting method to remove duplicate grid boundary paths in the path set P; it should be noted that each grid boundary path is represented by a node sequence, for example, the path (s, v1, v2, v3, t) represents an edge passing through nodes s, v1, v2, v3, t, and there is a grid boundary edge between adjacent nodes; the path prefix refers to a node sequence starting from the starting point s of the graph, for example, (s, v1, v2, v3) is a path prefix.
[0092] For each grid boundary path, decompose it into a series of line segments, and for each line segment i, calculate its energy value within the grid ;
[0093] ; where I is the length of the line segment, k is the curvature of the line segment, is the angle between the line segment and the grid boundary, d is the distance from the line segment to the nearest device, and is a nonlinear adjustment parameter to achieve nonlinear enlargement or reduction of curvature and angle, a1 is a preset baseline energy value, and controls the baseline energy value of the line segment length; and is the influence weight, which controls the influence weight of curvature and angle, b1 is the influence weight of penalty term, which controls the influence weight of distance penalty term, c is the distance adjustment parameter, which controls the nonlinear scaling degree of distance; the calculation method of energy value can more flexibly and efficiently describe the various influencing factors in the process of line regularization, and obtain better regularization effect; ds represents the infinitesimal length of the line segment; it is the integral variable when performing energy value integral operation, which reflects the accuracy of infinite segmentation and summation of the line segment.
[0094] Add up the energy values of all line segments corresponding to the lattice boundary path to obtain the total energy value of the corresponding lattice boundary path; use the lattice boundary path with the smallest total energy value as the preliminary regularized path corresponding to the line segments that need to be regularized, and smooth the preliminary regularized path to obtain the regularized path corresponding to the line segments that need to be regularized; connect the regularized paths of the line segments that need to be regularized and the line segments that do not need to be regularized in the order of splitting, and smooth the turning points to obtain a complete line after regularization.
[0095] Through the above steps, the original line is regularized to run along the grid boundary, with fewer line corners and lower curvature, thus obtaining a more regular and beautiful line shape. At the same time, through the calculation of energy values, a balance can be sought between the line length, curvature and the angle with the grid boundary, so that the regularized line shape is both beautiful and keeps the authenticity of the line length as much as possible.
[0096] Traverse each device node in the original topology map. For each device node, determine the grid area (composed of several grids) where the device can be placed based on its connection relationship with the line; obtain all the lines connected to the device, recorded as connected lines; for each connected line, find its intersection with the grid boundary, record the grids where these intersections are located, and obtain a grid set; the grid area where the device can be placed is the area covered by the grid set.
[0097] For each grid j in the grid area where the device can be placed, calculate its device energy value ;
[0098] ; Wherein, D is the distance from grid j to the nearest line, o is the angle from grid j to the nearest line, w1 and w2 are influence weights, which control the influence of distance and angle on energy value, a2, b2 and c1 are function parameters, a2 is the amplitude of the function, which controls the range of function value, b2 is the position parameter of the function, which controls the angle value corresponding to the maximum function value, and c1 is the shape parameter of the function, which controls the steepness of the function value change.
[0099] Find the grid with the smallest device energy value as the placement position of the corresponding device node, and place the device node at the center of the corresponding grid; traverse the complete line after regularization, and for the starting point and end point of each complete line after regularization, if the starting point or end point does not coincide with any device, adjust it to the position of the nearest device; obtain a preliminary regularized topology map.
[0100] The methods for cross-regularization include:
[0101] Statistical importance index of each complete line J after regularization in the preliminary regularized topology graph ;
[0102] ;
[0103] Where V is the line voltage level, Vn is the lowest voltage level, and Vm is the highest voltage level. is the line length, is the impedance parameter, is the load data (reflecting the power load on the line), is the maximum load data, is the device voltage level, is the minimum equipment voltage level, is the highest equipment voltage level, It is the device status indicator function, and its value is 1 or 0. It is 1 when the device is in operation state, and 0 when the device is in non-operation state (such as maintenance, etc.).
[0104] According to the corresponding calculated importance index, each regularized complete line is sorted from large to small, and the first N1 lines are selected as the trunk lines; the direction of the trunk line will be determined and retained first; a vertical sweep line is added to the canvas, and the initial position of the sweep line is located at the leftmost side of the canvas. The sweep line sweeps across the entire canvas from left to right. When the sweep line sweeps across a trunk line, the intersection of the trunk line and the sweep line is determined, and a seed point is planted at the intersection. According to the seed point, the direction of the trunk line at the seed point is determined, and the direction of the trunk line at the seed point is fixed and will not be changed.
[0105] Specifically, two adjacent seed points before and after the seed point (if any) are obtained. If the seed point is the starting point or end point of the main line, there is only one adjacent seed point. If the seed point is located in the middle of the main line, there are two adjacent seed points. If there is only one adjacent seed point, the direction of the line at the seed point is determined by the position of the adjacent seed point, forming a straight line segment. If there are two adjacent seed points, the direction of the line at the seed point is determined by the positions of the two adjacent seed points, forming a broken line segment or a curve segment. Specifically, a cubic Bezier curve segment is generated with the seed point and the two adjacent seed points as control points, or a circular arc is formed with the seed point as the center and the radius determined by the two adjacent seed points.
[0106] At each seed point, a line segment is grown, and the direction of the line segment is the determined direction, so as to achieve a smooth transition of the line; repeat until the line sweeps across the entire canvas; for the grown line segments, check whether there are redundant or overlapping line segments; remove these redundant line segments to ensure the simplicity of the line.
[0107] If there are several lines crossing in a certain area, this area is defined as the crossing area, and for each line in the crossing area, its priority index is calculated; the priority index can be defined according to the weighted function of load size and voltage level; all lines in the crossing area are sorted in descending order according to the size of the corresponding priority index, and the lines are placed from top to bottom. If there is a trunk line in the crossing area, the trunk line is placed on the top layer, that is, the up and down running order of the line is adjusted; and a regularized topology diagram is obtained.
[0108] The methods for color rendering of the regularized topology map include:
[0109] Create a two-dimensional grid whose size is the same as the canvas size of the regularized topology map, map all lines and devices in the regularized topology map to the two-dimensional grid, and assign an initial color value to each grid cell in the two-dimensional grid (such as setting all to white).
[0110] Define the color rules for lines and equipment, that is, determine different colors according to the line voltage level of the line, and determine different colors according to the type of equipment (such as transformers, switch cabinets, etc.); define the color diffusion rule, set a diffusion radius r, which means that the color can diffuse to the range of r grid units away from the line or equipment; the color of the line and equipment will diffuse to the grid units within the diffusion radius r, and define the attenuation function , indicating that the color intensity varies with the diffusion distance dl.
[0111] ;in, is the diffusion distance, , and It is a parameter that controls the shape of the attenuation curve. and To control the speed of attenuation; create a variety of different color attenuation curves, which not only maintain the basic attenuation characteristics, but also incorporate some new visual changes.
[0112] Traverse each grid cell in the two-dimensional grid. For the grid cells mapped with lines or devices, add the corresponding color value to the corresponding grid cell according to the line voltage level or device type. For the grid cells without mapping lines or devices, calculate the weighted average of the color values of the grid cells within the diffusion radius r of the grid cell; and update the color value of the grid cell according to the color diffusion rule, and repeat the update until the color value of the entire two-dimensional grid converges (the color no longer changes significantly).
[0113] Traverse each grid cell in the two-dimensional grid, and map the color value of the grid cell back to the line or device in the corresponding regularized topology map, that is, if the grid cell maps the line, the line is rendered as the corresponding color, if the grid cell maps the device, the device is rendered as the corresponding color; obtain the medium-voltage topology map of the distribution network; it should be explained that the color value refers to the numerical representation of the color in a certain color space (such as RGB, HSV, etc.); for example, in the RGB color space, red can be represented as (255, 0, 0).
[0114] Lines and devices will be rendered in different colors, and the color distribution is smoothly transitioned to avoid hard color boundaries; at the same time, adjacent lines and devices will present similar colors, enhancing the visual continuity of the topology map. The color rendering of lines and devices is also clearer and more reasonable, improving readability and recognition.
[0115] In this embodiment, the topology map that can be automatically generated has orderly lines, reasonable and beautiful equipment layout, good visual effect, and greatly enhanced readability and recognition of the topology map; different voltage level lines and different types of equipment are rendered in different colors, and the color transition is natural and smooth, avoiding hard boundaries and further optimizing the visual experience; it helps operation and maintenance personnel to quickly and efficiently obtain key information and improve work efficiency; secondly, it can comprehensively consider various actual constraints such as line length, curvature, voltage level, load, etc., so that the automatically generated topology map is highly consistent with the actual operating status of the distribution network, and provides accurate and reliable data support for subsequent distribution network planning, scheduling, line loss management and other decisions, which is conducive to improving the scientific nature and foresight of decision-making; in addition, the automatic topology map generation does not require human intervention, which not only saves a lot of manpower, but also can realize real-time updating and large-scale generation, meeting the real-time and comprehensive requirements of distribution network operation and maintenance for topology maps, and providing a solid guarantee for efficient management.
[0116] Example 2
[0117] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a distribution network medium voltage topology map generation system based on line crossing regularization is provided, including:
[0118] The data acquisition and processing module is used to obtain the data of the distribution network line equipment, pre-process the data of the distribution network line equipment, and obtain the preliminary data packet for graph construction;
[0119] A preliminary construction module is used to construct a preliminary data packet according to the graph to construct an original topology map, and to arrange the original topology map in a regular manner to obtain a preliminary regular topology map;
[0120] A regularization processing module is used to perform cross regularization processing on the preliminary regularized topological map to obtain a regularized topological map;
[0121] The rendering module is used to perform color rendering on the regularized topology map to obtain the final distribution network medium-voltage topology map; each module is connected by wired and / or wireless means to realize data transmission between modules.
[0122] Example 3
[0123] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the method for generating a medium-voltage topology map of a distribution network based on regular line crossings provided above is implemented.
[0124] Since the electronic device introduced in this embodiment is an electronic device used to implement a method for generating a medium-voltage topology map of a distribution network based on regular line crossings in the embodiment of the present application, based on the method for generating a medium-voltage topology map of a distribution network based on regular line crossings introduced in the embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the electronic device used by a method for generating a medium-voltage topology map of a distribution network based on regular line crossings in the embodiment of the present application, it belongs to the scope of protection of the present application.
[0125] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0126] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularity, characterized in that: include: Step 1: Obtain distribution network line equipment data, pre-process the distribution network line equipment data, and obtain a preliminary data packet for graph construction; Step 2: construct the original topology map according to the graph, construct the preliminary data package, and arrange the original topology map in a regular manner to obtain a preliminary regular topology map; Step 3, cross-regularizing the preliminary regularized topology map to obtain a regularized topology map; Step 4: color rendering is performed on the regularized topology map to obtain the final distribution network medium voltage topology map; The method of performing cross-regularization processing includes: Count each complete line after regularization in the preliminary regularization topology Importance index ; ; in, is the line voltage level, is the lowest voltage level, is the highest voltage level, is the line length, is the impedance parameter, is the load data, is the maximum load data, is the device voltage level, is the minimum equipment voltage level, is the highest equipment voltage level, It is the device status indication function, and its value is 1 or 0; Sort each regularized complete route from large to small according to the corresponding calculated importance index, and select the first N1 routes as the trunk routes; add a vertical sweep line on the canvas, the initial position of the sweep line is located at the leftmost side of the canvas, and the sweep line sweeps across the entire canvas from left to right. When the sweep line sweeps across a trunk route, determine the intersection of the trunk route and the sweep line, plant a seed point at the intersection, and determine the direction of the trunk route at the seed point based on the seed point, and fix the direction of the trunk route at the seed point; At each seed point, a line segment grows out, and the direction of the line segment is the determined direction, and this process is repeated until the sweep line sweeps across the entire canvas; If there are several lines intersecting in a certain area, this area is defined as the intersection area. For each line in the intersection area, its priority index is calculated; all lines in the intersection area are sorted in descending order according to the corresponding priority index, and the lines are placed from top to bottom. If there is a trunk line in the intersection area, the trunk line is placed on the top layer to complete the adjustment of the up and down running order of the lines; and a regularized topology map is obtained.
2. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 1, characterized in that: The distribution network line equipment data includes line data and equipment data; the line data includes line number, line start and end point coordinates, line type, line connection information, line voltage level, line length, line impedance parameters and line load data; Equipment data includes equipment number, equipment type, equipment installation location coordinates, equipment rated capacity or specification model, equipment voltage level, equipment connection line information and equipment status.
3. The method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 2 is characterized in that: The method of preprocessing the distribution network line equipment data includes: checking the distribution network line equipment data, unifying the data from different sources into a specified data format, and converting the original coordinate data of the line start and end point coordinates and the equipment installation position coordinates into a unified coordinate system; Create a line data structure, which includes line number, starting and ending point coordinates, line type and line voltage level; create an equipment data structure, which includes equipment number, type, installation location coordinates and equipment voltage level; Define the association relationship, traverse the line data structure, obtain the connection information of each line, and associate the starting point and end point of the line with the corresponding device based on the connection information; traverse the device data structure, obtain the connection line information of each device, and associate the device with the corresponding line based on the connection line information; and store it as an adjacency list or adjacency matrix data structure, that is, obtain the preliminary data packet for graph construction.
4. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 3, characterized in that: The method of converting to a unified coordinate system includes: Define the central longitude and latitude (λ0, φ0) and standard latitude φ1 of the conversion, where λ0 is the central longitude; φ0 is the central latitude; based on the defined central longitude and latitude (λ0, φ0) and standard latitude φ1, calculate the conversion auxiliary variables; the conversion auxiliary variables include the latitude conversion constant n and the longitude conversion constant ρ0; Latitude conversion setting ; Longitude conversion setting ; Transform each original coordinate data (λ, φ) based on the conversion auxiliary variable, where λ is the latitude of the original coordinate data, and φ is the longitude of the original coordinate data; The formula for the transformation is: ; ;in, The plane rectangular coordinates are transformed from the original coordinate data; the transformed plane rectangular coordinates are translated and scaled to complete the transformation of the unified coordinate system.
5. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 4, characterized in that: The method of constructing the original topology graph includes: Create a blank canvas, set the size and coordinate system of the blank canvas, traverse the graph to build the line data structure in the preliminary data package, and draw the line on the canvas according to the coordinates of the starting and ending points of the line; use straight line segments or curves to draw, and use different line types according to the line type; traverse the graph to build the device data structure in the preliminary data package, and draw the device nodes on the canvas according to the plane rectangular coordinates of the device; different types of devices use different device node styles; according to the association relationship stored in the line data structure and the device data structure, draw the connection relationship between the line and the device on the canvas; use line segments or curves to connect the line endpoints and the connected device nodes; add annotation information to the line and the device on the canvas; the position of the annotation information is adjusted according to the line direction and the device position, and the original topology map is obtained.
6. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularity according to claim 5, characterized in that: The method of performing regular arrangement processing includes: Divide the canvas into a regular grid, where each grid is a square; adaptively set the side length of the grid ; ; in, is the average line length, , , and is the adjustment coefficient, is the line length standard deviation, is the distribution network coverage area, is the distribution network perimeter, is the number of branches, The number of trunk lines; The coordinates of the starting and ending points of all lines are obtained from the original topological map, and each line is split into several small line segments according to the coordinates of the starting and ending points to obtain a set of small line segments of all lines; all small line segments in the set of small line segments are traversed, and for each small line segment, its positional relationship with the grid boundary is determined. If the small line segment is completely on the grid boundary, the corresponding small line segment is determined to be a line segment that does not need to be regularized; if the small line segment intersects the grid boundary or the small line segment is completely inside the grid, the corresponding small line segment is determined to be a line segment that needs to be regularized; For each line segment that needs to be regularized, determine its starting point and end point, and based on the starting point and end point, enumerate all possible grid boundary paths; and determine one of the grid boundary paths as the preliminary regularized path corresponding to the line segment that needs to be regularized; and smooth the preliminary regularized path to obtain the regularized path corresponding to the line segment that needs to be regularized; connect the regularized path of the line segment that needs to be regularized and the line segment that does not need to be regularized in the order of splitting, and smooth the turning point to obtain a complete line after regularization; Traverse each device node in the original topology graph, and for each device node, determine the grid area where the device can be placed based on its connection relationship with the line; obtain all the lines connected to the device, which are recorded as connected lines; for each connected line, find its intersection with the grid boundary, record the grids where these intersections are located, and obtain a grid set; For each grid in the grid area where the device can be placed , calculate the energy value of its equipment ; ; in, It's a grid The distance to the nearest line, It's a grid The angle to the nearest line, and is the influence weight, , and is the function parameter; Find the grid with the smallest device energy value as the placement position of the corresponding device node, and place the device node at the center of the corresponding grid; traverse the complete line after regularization, and for the starting point and end point of each complete line after regularization, if the starting point or end point does not coincide with any device, adjust it to the position of the nearest device; obtain a preliminary regularized topology map.
7. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 6, characterized in that: The method of determining one of the grid boundary paths as the preliminary regularization path corresponding to the line segment to be regularized includes: For each grid boundary path, decompose it into a series of line segments. For each line segment , calculate its energy value in the grid ; ; in, is the length of the line segment, is the curvature of the line segment, is the angle between the line segment and the grid boundary, is the distance from the line segment to the nearest device, and is the nonlinear adjustment parameter, is the preset baseline energy value; and is the influence weight, is the penalty term impact weight, is the distance adjustment parameter; It represents the infinitesimal length of the line segment; Add up the energy values of all line segments corresponding to the grid boundary path to obtain the total energy value of the corresponding grid boundary path; use the grid boundary path with the smallest total energy value as the preliminary regularization path corresponding to the line segment to be regularized; The method of enumerating all possible grid boundary paths includes: The grid grid is regarded as an undirected graph, each grid boundary edge is regarded as an undirected edge, and the intersection points of the grid boundaries are regarded as nodes of the undirected graph, thus obtaining the grid boundary graph; Map the starting point a and the end point b of the line segment to be regularized to the grid boundary graph, and find the nodes closest to a and b as the corresponding graph starting point s and graph end point t; Initialize, create an empty path set P2 and an empty path prefix set Q2, take the graph starting point s as a path prefix with a length of 1, add it to Q2, take a path prefix from Q2, find its last node v, traverse all adjacent nodes w of v, if w is not in the taken out path prefix, add the taken out path prefix to w to get a new path prefix x', if the last node of the new path prefix x' is the graph end point t, add x' to the path set P2, otherwise, add x' to the path prefix set Q2, and remove the original taken out path prefix from Q2 until Q2 is empty, P2 stores all simple paths from s to t, that is, grid boundary paths.
8. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularization according to claim 7, characterized in that: The method of determining the direction of the trunk line at the seed point includes: Get two adjacent seed points before and after the seed point. If the seed point is the starting point or end point of the main line, there is only one adjacent seed point. If the seed point is located in the middle of the main line, there are two adjacent seed points. If there is only one adjacent seed point, the direction of the line at the seed point is determined by the position of the adjacent seed point, forming a straight line segment. If there are two adjacent seed points, the direction of the line at the seed point is determined by the positions of the two adjacent seed points, forming a broken line segment or a curve segment. Use the seed point and the two adjacent seed points as control points to generate a cubic Bezier curve segment, or use the seed point as the center of the circle and the radius determined by the two adjacent seed points to form an arc.
9. A method for generating a medium voltage topology diagram of a distribution network based on line crossing regularity according to claim 8, characterized in that: The method of color rendering the regularized topological map includes: Create a two-dimensional grid whose size is the same as the canvas size of the regularized topology map, map all the lines and devices in the regularized topology map into the two-dimensional grid, and assign an initial color value to each grid cell in the two-dimensional grid; Define the color rules for lines and devices, that is, determine different colors according to the line voltage level of the line, and determine different colors according to the type of equipment; define color diffusion rules and set a diffusion radius , indicating that the color can spread to the distance line or device grid cells; the colors of lines and devices will spread outwards The grid cells within the diffusion are diffused and the attenuation function is defined , which indicates the color intensity as the diffusion distance and change; ;in, is the diffusion distance, , and is the parameter that controls the shape of the attenuation curve; Traverse each grid cell in the two-dimensional grid. For the grid cells mapped with lines or devices, add the corresponding color value to the corresponding grid cell according to the line voltage level or device type. For the grid cells without mapping lines or devices, calculate the weighted average of the color values of the grid cells within the diffusion radius r of the grid cell; and update the color value of the grid cell according to the color diffusion rule, and repeat the update until the color value of the entire two-dimensional grid converges. Traverse each grid cell in the two-dimensional grid, and map the color value of the grid cell back to the line or device in the corresponding regularized topology map. That is, if the grid cell maps the line, the line is rendered in the corresponding color; if the grid cell maps the device, the device is rendered in the corresponding color; and obtain the medium-voltage topology map of the distribution network.
Citation Information
Patent Citations
Method for automatically generating network topology of power monitoring system
CN118118352A