A method and device for drawing power grid flow section
Through the cursor movement trajectory point acquisition and cubic spline interpolation method, combined with three-dimensional drawing and color mapping, the operational and intuitive problems of power grid current section drawing are solved, and the simplicity and intuitive drawing of power grid current section in complex areas is achieved, which improves the Data visualization effect.
Patent Information
- Application Number
- CN202010900608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-08-31
AI Technical Summary
The existing power grid trend section drawing method is difficult to operate and adjust, the display is not intuitive, the application limitations are great, and it is difficult to apply to complex geographical locations.
The cursor movement trajectory point-taking process is used, and the curve equation is calculated in combination with cubic spline interpolation method, and the three-dimensional cross-section drawing is realized through three-dimensional drawing and color mapping, allowing users to freely adjust the cross-section details and color filling.
It realizes the simplicity and intuitiveness of power grid trend section drawing, is suitable for complex areas, and improves the visualization effect of cross-section data.
Smart Images

Figure CN112116701B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system analysis and calculation, and in particular to a method and device for drawing a power grid flow section. Background Art
[0002] The power flow section in the power grid refers to the total set of several interconnection lines between two regions. It counts the sum of the power flow between the two regions. The section can clearly reflect the power exchange relationship between two different regions. It is the key point to ensure the stability of the regional voltage state and the transient stability of the system, and plays an important role in ensuring the safe operation of the overall power grid system. Due to these properties and functions of the section, in the operation and dispatch of the power grid system, viewing, analyzing and monitoring the section has very important practical significance in the dispatch of the power system.
[0003] In the traditional power grid system, due to the dominant importance of data in the power grid system, early power professionals obtained the required information by directly reading the data. After a certain habit was formed in the industry, graphical representation was placed in a relatively unimportant position, and sections were often represented by data recorded in files and tables. At present, although there are relatively simple graphical representations, there are the following problems:
[0004] (1) The location of the section cannot be determined freely but needs to be determined by taking points from the tie line;
[0005] (2) The shape of the cross section is not intuitive, and the automatically connected broken lines may have various unexpected bending directions or even circles;
[0006] (3) The detailed position of the cross section is not easy to adjust. For more complex geographical locations, it is difficult to fine-tune the position details of a certain section of the cross section, and the application conditions are greatly limited. Summary of the invention
[0007] In view of this, the present invention proposes a method and device for drawing a power grid flow section, aiming to solve the problems that the existing power grid section drawing is difficult to operate and adjust, the display is not intuitive, and the application is limited.
[0008] In a first aspect, an embodiment of the present invention provides a method for drawing a power grid flow section, comprising: obtaining a moving trajectory of a cursor; performing point processing on the moving trajectory to obtain a number of key points; based on the several key points, using a cubic spline interpolation method to calculate a curve equation and draw a curve; calculating a function value of the curve equation according to a preset step size accuracy to obtain a number of data points on the curve; and performing three-dimensional drawing according to the positions and connection relationships of the several data points to obtain a three-dimensional section.
[0009] Furthermore, after performing three-dimensional rendering according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross-section, the method further includes: performing color mapping on the three-dimensional cross-section according to preset colors.
[0010] Furthermore, the acquisition of the cursor movement trajectory includes: taking a length threshold as a radius and a starting point as a first circle center, when the cursor moves beyond the length threshold, recording a second point, and using the second point as a second circle center, when the cursor moves beyond the length threshold, recording a third point, and so on, recording m+1 points, and connecting the m+1 points in sequence to obtain m line segments of the cursor movement trajectory, where m is a positive integer.
[0011] Furthermore, the point-taking processing of the moving trajectory to obtain a number of key points includes: according to a preset number of line segments n, a key point is taken every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, wherein m is the number of line segments of the moving trajectory, and n is a positive integer.
[0012] Furthermore, the three-dimensional drawing is performed according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross-section, including: drawing a cube between two adjacent data points according to a preset width according to the positions and connection relationships of the respective data points; at the cracks between adjacent cubes, drawing a cylindrical joint with each data point as the center to fill the cracks to obtain a three-dimensional cross-section.
[0013] In the second aspect, an embodiment of the present invention further provides a power grid flow section drawing device, comprising: a moving trajectory acquisition unit, used to acquire the moving trajectory of a cursor; a first point-taking unit, used to perform point-taking processing on the moving trajectory to obtain a number of key points; a calculation unit, used to calculate a curve equation based on the several key points using a cubic spline interpolation method and draw the curve; a second point-taking unit, used to calculate the function value of the curve equation according to a preset step size accuracy to obtain a number of data points on the curve; a three-dimensional section drawing unit, used to perform three-dimensional drawing according to the positions and connection relationships of the several data points to obtain a three-dimensional section.
[0014] Furthermore, the device also includes: a color mapping unit, configured to perform color mapping on the three-dimensional cross section according to preset colors.
[0015] Furthermore, the movement trajectory acquisition unit is also used to: take the length threshold as the radius and the starting point as the first center of the circle, when the cursor moves beyond the length threshold, record the second point, and use the second point as the second center of the circle, when the cursor moves beyond the length threshold, record the third point, and so on, record m+1 points, and connect the m+1 points in sequence to obtain m line segments of the cursor movement trajectory, where m is a positive integer.
[0016] Furthermore, the first point-taking unit is also used to: according to a preset number of line segments n, take a key point every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, where m is the number of line segments of the moving trajectory and n is a positive integer.
[0017] Furthermore, the three-dimensional section drawing unit is also used to: draw a cube between two adjacent data points according to the position and connection relationship of each data point according to a preset width; at the cracks between adjacent cubes, draw a cylindrical joint with each data point as the center to fill the cracks to obtain a three-dimensional section.
[0018] The power grid flow section drawing method and device provided in the embodiment of the present invention obtain points on the moving trajectory of the cursor, use the cubic spline interpolation method to calculate the curve equation, and perform three-dimensional drawing based on the curve equation to obtain a three-dimensional section, which solves the problems of the existing power grid section drawing being difficult to operate and adjust, the display being not intuitive, and the application being limited. The power grid flow section drawing can be made simpler and easier to operate, and can be applied to complex regional conditions such as the curved boundaries of the region, with universal applicability, and the three-dimensional section is more intuitive.
[0019] A method and device for drawing a power grid flow section provided in another embodiment of the present invention can display the data information of the section more intuitively by adopting color mapping, thereby greatly improving the visualization effect of the section. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 An exemplary flow chart of a method for drawing a power grid power flow section according to an embodiment of the present invention is shown;
[0021] Figure 2 The moving track of the cursor obtained by taking the length threshold as the radius in one embodiment of the present invention is shown;
[0022] Figure 3 It shows the situation of taking points every certain number of line segments of the moving track in one embodiment of the present invention;
[0023] Figure 4 The figure shows a curve obtained by calculating the curve equation and drawing the curve using the cubic spline interpolation method based on five key points in one embodiment of the present invention;
[0024] Figure 5 A top view of a three-dimensional cross section in an embodiment of the present invention is shown, wherein the left image is a cubic connection formed between two adjacent data points, and the right image is a cylindrical joint filling added to the left image;
[0025] Figure 6 shows a three-dimensional cross section after color mapping in one embodiment of the present invention;
[0026] Figure 7 A schematic structural diagram of a power grid power flow section drawing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0027] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0028] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0029] Figure 1 An exemplary flow chart of a method for drawing a power grid power flow section according to an embodiment of the present invention is shown.
[0030] like Figure 1 As shown, the method includes:
[0031] Step 101: Obtain the movement trajectory of the cursor.
[0032] Furthermore, step 101 includes:
[0033] With the length threshold as the radius and the starting point as the center of the first circle, when the cursor moves beyond the length threshold, the second point is recorded and the second point is used as the center of the second circle. When the cursor moves beyond the length threshold, the third point is recorded. Similarly, m+1 points are recorded and connected in sequence to obtain m line segments of the cursor's movement trajectory, where m is a positive integer.
[0034] In the embodiment of the present invention, the length threshold can be preset according to the actual situation. When the cursor exceeds the length threshold, a point is recorded, that is, a valid position, and the point is used as the center of the circle to determine the next point. By analogy, several points are obtained, and these points are connected in sequence to obtain several lines of equal length. For example, Figure 2 The moving track of the cursor obtained with a length threshold as the radius in one embodiment of the present invention is shown.
[0035] In the above embodiment, point selection is based on a displacement mechanism, which solves the problem of uneven point selection caused by different cursor movement speeds, and makes the acquired cursor movement trajectory more uniform and accurate.
[0036] Step 102: Perform point processing on the moving trajectory to obtain a number of key points.
[0037] Furthermore, step 102 includes:
[0038] According to the preset number of line segments n, a key point is taken every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, where m is the number of line segments of the moving trajectory and n is a positive integer.
[0039] In the embodiment of the present invention, if the value calculated by m / (n+1) is a decimal, it is rounded down. Figure 3 It shows the situation of taking points every a certain number of line segments of the moving track in one embodiment of the present invention.
[0040] Step 103: Based on a number of key points, a curve equation is calculated using a cubic spline interpolation method and a curve is drawn.
[0041] In the embodiment of the present invention, the number of key points is n+1, and the positions are (x0, y0), (x1, y1), ..., (x n ,y n ), the key point divides the moving trajectory into n segments of curves, and the equation of each segment of the curve is a cubic polynomial. The i-th segment of the curve represents any segment of the curve, where i∈[0,n], and the corresponding curve equation is:
[0042] S i (x) = a i +b i +(xx i )+c i (xx i ) 2 +d i (xx i ) 3 , where x i ≤x≤x i+1 ;
[0043] Its first-order derivative is: S′ i (x) = b i +2c i (xx i )+3d i (xx i ) 2 ;
[0044] Its second-order derivative is: S″ i(x) = 3c i +6d i (xx i ).
[0045] Because the interpolation value of the curve at the key point is equal to the y value of the key point, that is, the curve segment i at the starting point (x i ,y i ) is continuous, that is, S i (x i )=y i , we get formula ①:
[0046] y i =a i ①,
[0047] where i∈[0,n];
[0048] Since the curve segment i is at the end point (x i+1 ,y i+1 ) also has continuity, that is, S i (x i+1 )=y i+1 , we get formula ②:
[0049]
[0050] where i∈[0,n-1];
[0051] Because the curve segments need to transition smoothly at the nodes, the curve achieves second-order continuity at the nodes, so the curve segments i and i+1 are connected at their connection points (x i+1 ,y i+1 ) is equal, that is, the second-order derivative here is also equal, that is, S″ i (x i+1 )=S″ i+1 (x i+1 );
[0052] Next, we set the step length h i =x i+1 -x i , substitute the step length and curve equation into the first-order derivative equation, and we get equation ③:
[0053]
[0054] where i∈[0,n-2];
[0055] Substituting the step length and the curve equation into the second-order derivative equation, we get equation ④:
[0056] 2c i +6h i d i =2ci+1 ④,
[0057] where i∈[0,n-2];
[0058] At this point, we introduce the concept of bending moment. The curve is regarded as a long strip with elasticity, and the key point is regarded as the point where the force is applied to the strip. The bending moment is the force condition of the curve at a certain point, which is equivalent to the actual physical meaning of the second-order derivative of the curve, that is, the bending moment is equal to the second-order derivative value. Let the bending moment be m i =S″ i (x i )=2c i , then we get formula ⑤:
[0059]
[0060] Substituting ⑤ into formula ④, we can get:
[0061]
[0062] Replace c in equations ⑤ and ⑥ i d i Substituting into equation ②-①, we can get equation ⑦:
[0063]
[0064] Replace b in equations ⑤, ⑥, and ⑦ i 、c i d i Substituting into equation ③, we can get equation ⑧:
[0065]
[0066] where i∈[0,n-2];
[0067] Equation ⑧ is an equation with m as the unknown number. The values of h and y are based on the horizontal and vertical coordinates of the key points of the curve, respectively. In this way, we can construct a linear equation system with m as the unknown number. Since the value range of i is i∈[0,n-2], the linear equation system has n-1 formulas, but there are m0~m n , there are n+1 unknowns in total. We consider the bending moment at the starting point and the end point, and let the curve be free of force at the two end points, that is, let m0=0, m n =0, the following linear equations are constructed:
[0068]
[0069] From this we can solve m0~m n Substituting the coordinates of the key points into ①, ⑤, ⑥, and ⑦, we can get the parameter a i 、b i 、ci d i The values in each curve segment, these parameters and key point coordinates are substituted into the curve segment equation of each segment to obtain the complete curve equation. This equation is a piecewise equation, which is segmented from each key point. The above calculates the piecewise equation of the smooth curve passing through all n+1 key points. This curve will serve as the path of the power grid flow section and provide a basis for the next step of drawing. The number of key points in this step is proportional to the fit of the curve to the mouse trajectory, that is, if you need to improve the fitting effect, you can make the curve fit the mouse trajectory more closely by increasing the number of key points.
[0070] For example, Figure 4 The figure shows a curve obtained by calculating the curve equation and drawing the curve using the cubic spline interpolation method based on five key points in one embodiment of the present invention.
[0071] In the above embodiment, the curve equation is calculated by using the cubic spline interpolation method, and the mathematical calculation method is used to effectively solve the problem that the existing power grid section drawing is difficult to operate and adjust and has great application limitations.
[0072] Step 104: Calculate the function value of the curve equation according to a preset step length accuracy to obtain a number of data points on the curve.
[0073] In the embodiment of the present invention, if the preset step size accuracy is too small, the calculation amount will be large, and if it is too large, the curve will not be smooth. It can be set according to the screen resolution as a standard. For example, 5 pixels can be set. The function value of the curve equation is calculated according to the set step size accuracy to obtain a number of data points falling on the curve. Connecting these points is the trajectory of the desired section.
[0074] Step 105: Perform three-dimensional rendering based on the positions and connection relationships of a number of data points to obtain a three-dimensional cross section.
[0075] Further, step 105 includes:
[0076] According to the position and connection relationship of each data point, a cube is drawn between two adjacent data points according to the preset width;
[0077] At the cracks between adjacent cubes, cylindrical joints are drawn with each data point as the center to fill the cracks and obtain a three-dimensional cross-section.
[0078] In the embodiment of the present invention, the preset width can be set according to user needs. Since the curve has curvature, cracks will be generated outside the bending direction, and the size of the cracks depends on the degree of curvature of the curve. After drawing the cubes between the data points, drawing a cylindrical joint with each data point as the center can fill the cracks between the cubes, so that the outer surface of the cross section can achieve a smooth visual effect.
[0079] For example, Figure 5 A top view of a three-dimensional cross section in an embodiment of the present invention is shown, wherein the left image is a cubic connection formed between two adjacent data points, and the right image is a cylindrical joint filling added to the left image.
[0080] In the above embodiment, points are taken on the moving trajectory of the cursor, the curve equation is calculated using the cubic spline interpolation method, and three-dimensional drawing is performed based on the curve equation to obtain a three-dimensional section, which solves the problems of difficult operation and adjustment, non-intuitive display, and large application limitations in the existing power grid section drawing; the power grid flow section drawing can be made simpler and easier to operate, and can be applied to complex regional conditions such as curved boundaries of regions, with universal applicability, and the three-dimensional section is more intuitive.
[0081] Furthermore, after step 105, the method further includes:
[0082] Step 106: Perform color mapping on the three-dimensional cross section according to preset colors.
[0083] In an embodiment of the present invention, different preset colors can be set for filling and mapping different information of the cross section as needed, so as to mark the basic information of the cross section, such as the active power ratio or the reactive power ratio, so that the cross section presentation is more intuitive.
[0084] For example, Figure 6 The figure shows a three-dimensional cross section after color mapping in an embodiment of the present invention, wherein gray is the background color of the cross section, the length of the yellow color bar represents the ratio of the active power of the cross section to the maximum active power, and the length of the green color bar represents the ratio of the reactive power of the cross section to the maximum reactive power.
[0085] In the above embodiment, by adopting color mapping, the data information of the cross section can be displayed more intuitively, which greatly improves the visualization effect of the cross section.
[0086] Figure 7 A schematic structural diagram of a power grid power flow section drawing device according to an embodiment of the present invention is shown.
[0087] like Figure 7 As shown, the device comprises:
[0088] The movement track acquisition unit 701 is used to acquire the movement track of the cursor.
[0089] Furthermore, the movement trajectory acquisition unit 701 is also used for:
[0090] With the length threshold as the radius and the starting point as the center of the first circle, when the cursor moves beyond the length threshold, the second point is recorded and the second point is used as the center of the second circle. When the cursor moves beyond the length threshold, the third point is recorded. Similarly, m+1 points are recorded and connected in sequence to obtain m line segments of the cursor's movement trajectory, where m is a positive integer.
[0091] In the embodiment of the present invention, the length threshold can be preset according to the actual situation. When the cursor exceeds the length threshold, a point is recorded, that is, a valid position, and the point is used as the center of the circle to determine the next point. By analogy, several points are obtained, and these points are connected in sequence to obtain several lines of equal length. For example, Figure 2 The moving track of the cursor obtained with a length threshold as the radius in one embodiment of the present invention is shown.
[0092] In the above embodiment, point selection is based on a displacement mechanism, which solves the problem of uneven point selection caused by different cursor movement speeds, and makes the acquired cursor movement trajectory more uniform and accurate.
[0093] The first point-taking unit 702 is used to perform point-taking processing on the moving trajectory to obtain a number of key points.
[0094] Furthermore, the first point selection unit 702 is further used for:
[0095] According to the preset number of line segments n, a key point is taken every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, where m is the number of line segments of the moving trajectory and n is a positive integer.
[0096] In the embodiment of the present invention, if the value calculated by m / (n+1) is a decimal, it is rounded down. Figure 3 It shows the situation of taking points every a certain number of line segments of the moving track in one embodiment of the present invention.
[0097] The calculation unit 703 is used to calculate the curve equation based on a number of key points by using the cubic spline interpolation method and draw the curve.
[0098] In the embodiment of the present invention, the number of key points is n+1, and the positions are (x0, y0), (x1, y1), ..., (x n ,y n ), the key point divides the moving trajectory into n segments of curves, and the equation of each segment of the curve is a cubic polynomial. The i-th segment of the curve represents any segment of the curve, where i∈[0,n], and the corresponding curve equation is:
[0099] S i (x) = a i +b i +(xxi )+c i (xx i ) 2 +d i (xx i ) 3 , where x i ≤x≤x i+1 ;
[0100] Its first-order derivative is: S′ i (x) = b i +2c i (xx i )+3d i (xx i ) 2 ;
[0101] Its second-order derivative is: S″ i (x) = 3c i +6d i (xx i ).
[0102] Because the interpolation value of the curve at the key point is equal to the y value of the key point, that is, the curve segment i at the starting point (x i ,y i ) is continuous, that is, S i (x i )=y i , we get formula ①:
[0103] y i =a i ①,
[0104] where i∈[0,n];
[0105] Since the curve segment i is at the end point (x i+1 ,y i+1 ) also has continuity, that is, S i (x i+1 )=y i+1 , we get formula ②:
[0106]
[0107] where i∈[0,n-1];
[0108] Because the curve segments need to transition smoothly at the nodes, the curve achieves second-order continuity at the nodes, so the curve segments i and i+1 are connected at their connection points (x i+1 ,y i+1 ) is equal, that is, the second-order derivative here is also equal, that is, S″ i (x i+1 )=S″i+1 (x i+1 );
[0109] Next, we set the step length h i =x i+1 -x i , substitute the step length and curve equation into the first-order derivative equation, and we get equation ③:
[0110]
[0111] where i∈[0,n-2];
[0112] Substituting the step length and the curve equation into the second-order derivative equation, we get equation ④:
[0113] 2c i +6h i d i =2c i+1 ④,
[0114] where i∈[0,n-2];
[0115] At this point, we introduce the concept of bending moment. The curve is regarded as a long strip with elasticity, and the key point is regarded as the point where the force is applied to the strip. The bending moment is the force condition of the curve at a certain point, which is equivalent to the actual physical meaning of the second-order derivative of the curve, that is, the bending moment is equal to the second-order derivative value. Let the bending moment be m i =S″ i (x i )=2c i , then we get formula ⑤:
[0116]
[0117] Substituting ⑤ into formula ④, we can get:
[0118]
[0119] Replace c in equations ⑤ and ⑥ i d i Substituting into equation ②-①, we can get equation ⑦:
[0120]
[0121] Replace b in equations ⑤, ⑥, and ⑦ i 、c i d i Substituting into equation ③, we can get equation ⑧:
[0122]
[0123] where i∈[0,n-2];
[0124] Equation ⑧ is an equation with m as the unknown number. The values of h and y are based on the horizontal and vertical coordinates of the key points of the curve, respectively. In this way, we can construct a linear equation system with m as the unknown number. Since the value range of i is i∈[0,n-2], the linear equation system has n-1 formulas, but there are m0~m n , there are n+1 unknowns in total. We consider the bending moment at the starting point and the end point, and let the curve be free of force at the two end points, that is, let m0=0, m n =0, the following linear equations are constructed:
[0125]
[0126] From this we can solve m0~m n Substituting the coordinates of the key points into ①, ⑤, ⑥, and ⑦, we can get the parameter a i 、b i 、c i d i The values in each curve segment, these parameters and key point coordinates are substituted into the curve segment equation of each segment to obtain the complete curve equation. This equation is a piecewise equation, which is segmented from each key point. The above calculates the piecewise equation of the smooth curve passing through all n+1 key points. This curve will serve as the path of the power grid flow section and provide a basis for the next step of drawing. The number of key points in this step is proportional to the fit of the curve to the mouse trajectory, that is, if you need to improve the fitting effect, you can make the curve fit the mouse trajectory more closely by increasing the number of key points.
[0127] For example, Figure 4 The figure shows a curve obtained by calculating the curve equation and drawing the curve using the cubic spline interpolation method based on five key points in one embodiment of the present invention.
[0128] In the above embodiment, the curve equation is calculated by using the cubic spline interpolation method, and the mathematical calculation method is used to effectively solve the problem that the existing power grid section drawing is difficult to operate and adjust and has great application limitations.
[0129] The second point-taking unit 704 is used to calculate the function value of the curve equation according to a preset step-size accuracy to obtain a number of data points on the curve.
[0130] In the embodiment of the present invention, if the preset step size accuracy is too small, the calculation amount will be large, and if it is too large, the curve will not be smooth. It can be set according to the screen resolution as a standard. For example, 5 pixels can be set. The function value of the curve equation is calculated according to the set step size accuracy to obtain a number of data points falling on the curve. Connecting these points is the trajectory of the desired section.
[0131] The three-dimensional section drawing unit 705 is used to perform three-dimensional drawing according to the positions and connection relationships of a number of data points to obtain a three-dimensional section.
[0132] Furthermore, the three-dimensional cross-section drawing unit 705 is also used for:
[0133] According to the position and connection relationship of each data point, a cube is drawn between two adjacent data points according to the preset width;
[0134] At the cracks between adjacent cubes, cylindrical joints are drawn with each data point as the center to fill the cracks and obtain a three-dimensional cross-section.
[0135] In the embodiment of the present invention, the preset width can be set according to user needs. Since the curve has curvature, cracks will be generated outside the bending direction, and the size of the cracks depends on the degree of curvature of the curve. After drawing the cubes between the data points, drawing a cylindrical joint with each data point as the center can fill the cracks between the cubes, so that the outer surface of the cross section can achieve a smooth visual effect.
[0136] For example, Figure 5 A top view of a three-dimensional cross section in an embodiment of the present invention is shown, wherein the left image is a cubic connection formed between two adjacent data points, and the right image is a cylindrical joint filling added to the left image.
[0137] In the above embodiment, points are taken on the moving trajectory of the cursor, the curve equation is calculated using the cubic spline interpolation method, and three-dimensional drawing is performed based on the curve equation to obtain a three-dimensional section, which solves the problems of difficult operation and adjustment, non-intuitive display, and large application limitations in the existing power grid section drawing; the power grid flow section drawing can be made simpler and easier to operate, and can be applied to complex regional conditions such as curved boundaries of regions, with universal applicability, and the three-dimensional section is more intuitive.
[0138] Furthermore, the device also includes:
[0139] The color mapping unit 706 is used to perform color mapping on the three-dimensional cross section according to preset colors.
[0140] In an embodiment of the present invention, different preset colors can be set for filling and mapping different information of the cross section as needed, so as to mark the basic information of the cross section, such as the active power ratio or the reactive power ratio, so that the cross section presentation is more intuitive.
[0141] For example, Figure 6 The figure shows a three-dimensional cross section after color mapping in an embodiment of the present invention, wherein gray is the background color of the cross section, the length of the yellow color bar represents the ratio of the active power of the cross section to the maximum active power, and the length of the green color bar represents the ratio of the reactive power of the cross section to the maximum reactive power.
[0142] In the above embodiment, by adopting color mapping, the data information of the cross section can be displayed more intuitively, which greatly improves the visualization effect of the cross section.
[0143] The invention has been described above with reference to a few embodiments. However, it is readily apparent to a person skilled in the art that other embodiments than the ones disclosed above are equally within the scope of the invention, as defined by the appended patent claims.
[0144] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a / said / the [means, components, etc.]" are to be openly interpreted as at least one instance of the means, components, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not necessarily have to be performed in the exact order disclosed, unless explicitly stated otherwise.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0146] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0148] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for drawing a power grid power flow section, characterized in that: The method comprises: Get the cursor movement track; Performing point processing on the moving trajectory to obtain a number of key points; Based on the several key points, a curve equation is calculated using a cubic spline interpolation method and a curve is drawn; Calculating the function value of the curve equation according to a preset step length accuracy to obtain a number of data points on the curve; Perform three-dimensional drawing according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross section; The moving trajectory is processed by point picking to obtain several key points, including: According to the preset number of line segments n, a key point is taken every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, where m is the number of line segments of the moving trajectory and n is a positive integer; The step of performing three-dimensional drawing according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross section includes: According to the position and connection relationship of each data point, a cube is drawn between two adjacent data points according to the preset width; At the cracks between adjacent cubes, a cylindrical joint is drawn with each data point as the center to fill the cracks and obtain a three-dimensional cross-section.
2. The method according to claim 1, characterized in that After performing three-dimensional drawing according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross section, the method further includes: The three-dimensional cross section is color mapped according to preset colors.
3. The method according to claim 1, characterized in that The step of obtaining the movement track of the cursor comprises: With the length threshold as the radius and the starting point as the first center of the circle, when the cursor moves beyond the length threshold, the second point is recorded and the second point is used as the second center of the circle. When the cursor moves beyond the length threshold, the third point is recorded, and m+1 points are recorded in sequence. The m+1 points are connected in sequence to obtain m line segments of the cursor movement trajectory, where m is a positive integer.
4. A power grid flow section drawing device, characterized in that: The device comprises: A movement track acquisition unit, used to acquire the movement track of the cursor; A first point-taking unit, used for performing point-taking processing on the moving trajectory to obtain a number of key points; A calculation unit, used to calculate the curve equation and draw the curve based on the key points by using a cubic spline interpolation method; A second point-taking unit, used to calculate the function value of the curve equation according to a preset step-length accuracy to obtain a number of data points on the curve; A three-dimensional cross-section drawing unit, used for performing three-dimensional drawing according to the positions and connection relationships of the plurality of data points to obtain a three-dimensional cross-section; Wherein, the first point-taking unit is further used for: According to the preset number of line segments n, a key point is taken every m / (n+1) line segments on the moving trajectory to obtain n+1 key points, where m is the number of line segments of the moving trajectory and n is a positive integer; Wherein, the three-dimensional cross-section drawing unit is also used for: According to the position and connection relationship of each data point, a cube is drawn between two adjacent data points according to the preset width; At the cracks between adjacent cubes, a cylindrical joint is drawn with each data point as the center to fill the cracks and obtain a three-dimensional cross-section.
5. The device according to claim 4, characterized in that The device also includes: The color mapping unit is used to perform color mapping on the three-dimensional cross section according to preset colors.
6. The device according to claim 4, characterized in that The movement trajectory acquisition unit is further used for: With the length threshold as the radius and the starting point as the first center of the circle, when the cursor moves beyond the length threshold, the second point is recorded and the second point is used as the second center of the circle. When the cursor moves beyond the length threshold, the third point is recorded, and m+1 points are recorded in sequence. The m+1 points are connected in sequence to obtain m line segments of the cursor movement trajectory, where m is a positive integer.
Citation Information
Patent Citations
Electric network power flow section visualization adjusting method based on transient stability calculation
CN102185310A
Full-automatic graphical power flow section representation method
CN102801161A