A layout method, device, equipment and storage medium for a photovoltaic module
Through the automated photovoltaic module layout method, the triangular grid surface and global optimization algorithm are used to optimize the layout of photovoltaic power stations, which solves the problems of strong subjectivity in the site selection and layout of photovoltaic power stations in the existing technology and inconsistent judgment standards, achieving a more efficient and compact layout effect.
Patent Information
- Application Number
- CN202411093886.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-08-09
AI Technical Summary
In the existing technology, the site selection and layout of photovoltaic power stations mainly rely on manual experience judgment, and there are problems such as strong subjectivity and inconsistent judgment standards, resulting in large subjective errors in site selection and layout and no unified standards.
By obtaining the elevation digital model of the preset area, establishing a triangular network surface, marking the infrastructure terrain surface, defining infrastructure blocks, defining photovoltaic arrays, substations, and energy storage power stations as charged particles, and using the global optimization algorithm to optimize the position of charged particles to minimize the total cable length and repulsion sum, and determine the layout position of the photovoltaic module.
The automation and standardization of the layout of photovoltaic power stations has been realized, subjective errors have been reduced, the neatness and compactness of the layout have been improved, and the power generation per unit area of the photovoltaic power station has been maximized.
Smart Images

Figure CN119004822B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic digital data processing, and particularly to a layout method, device, equipment and storage medium for photovoltaic modules. Background Art
[0002] A photovoltaic power station refers to a power generation system that uses solar energy and consists of special materials such as crystalline silicon panels, inverters and other electronic components, is connected to the power grid and transmits electricity to the power grid. A photovoltaic power station with a complete set of functions usually has one or more photovoltaic arrays for receiving solar energy, a transformer for converting the electric energy generated by the photovoltaic arrays, and an energy storage device electrically connected to the transformer. The energy storage device stores the electric energy that meets the requirements of the land after conversion, and at the same time transmits it to external electrical equipment through the municipal power grid.
[0003] Currently, for the layout of each component and facility of a photovoltaic power station, the initial infrastructure operations such as site selection and layout are usually carried out by manual subjective judgment. For example, geographical location, environmental factors, economic factors and technical factors are comprehensively considered. Specifically, the judgment criteria for geographical location selection are usually that areas with rich sunlight resources, flat terrain and convenient transportation are preferred construction areas for photovoltaic power stations judged manually; the judgment criteria for considering environmental factors are usually that climate conditions, pollution degree and land nature are judged manually; the judgment criteria for considering economic factors are usually that cost-benefit analysis, market demand and policy support are judged manually; the judgment criteria for considering technical factors are usually that technical feasibility, equipment compatibility and operation and maintenance convenience are judged manually.
[0004] As can be seen from the above, the site selection and layout of photovoltaic power stations are basically judged by manual experience, with strong subjectivity and inconsistent judgment criteria, resulting in large subjective errors, various forms and no unified standards in the site selection and layout of photovoltaic power stations. Summary of the Invention
[0005] The main purpose of the present application is to provide a layout method, device, equipment and storage medium for photovoltaic modules, so as to solve the problems of manual experience judgment in the site selection and layout of photovoltaic power stations in the prior art, with strong subjectivity and inconsistent judgment criteria.
[0006] To achieve the above object, the present application provides the following technical solutions:
[0007] A layout method for photovoltaic modules, the photovoltaic modules include a plurality of photovoltaic arrays erected in a preset area, at least one substation electrically connected to each photovoltaic array through a plurality of cables, and at least one energy storage power station electrically connected to the substation through at least one cable. The layout method includes:
[0008] Step S1, obtain the digital elevation model of the preset area, and establish a triangular mesh surface of the preset area through a preset strategy;
[0009] Step S2, respectively obtain the angle between each triangle in the triangular mesh surface and the horizontal plane, and mark the triangles whose angles do not exceed the preset angle threshold as constructible terrain surfaces;
[0010] Step S3, obtain the boundary of the constructible terrain surface through a sliding window algorithm, and define the constructible terrain surface with discontinuous boundaries as constructible blocks;
[0011] Step S4, respectively define each photovoltaic array as a first charged particle with a first charge quantity, each substation as a second charged particle with a second charge quantity, and each energy storage power station as a third charged particle with a third charge quantity, and the charge polarities of all the first charged particles, all the second charged particles, and all the third charged particles are the same;
[0012] Step S5, output all the first charged particles, all the second charged particles, and all the third charged particles to the constructible blocks;
[0013] Step S6, initialize the positions of all the first charged particles, all the second charged particles, and all the third charged particles, and obtain the total repulsive force of all the first charged particles, all the second charged particles, and all the third charged particles;
[0014] Step S7, iteratively update the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time minimize the total repulsive force;
[0015] Step S8, obtain all the real-time positions when the total repulsive force reaches the minimum, and define them as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations.
[0016] As a further improvement of the present application, Step S3, obtain the boundary of the constructible terrain surface through a sliding window algorithm, and define the constructible terrain surface with discontinuous boundaries as constructible blocks, including:
[0017] Step S31, establish a grid set in the constructible terrain surface, and assign 0 to each grid in the grid set, and the size of each grid is less than or equal to the size of each triangle;
[0018] Step S32, respectively judge whether there is such a triangle in each grid, and assign 1 to the grid where there is such a triangle;
[0019] Step S33: Define the current grid and its adjacent grids as a three-dimensional window, and respectively obtain the assigned values of all grids in each three-dimensional window.
[0020] Step S34: Respectively determine whether there is a grid with an assigned value of 0 in each three-dimensional window. If there is a grid with an assigned value of 0 in the current three-dimensional window, execute Step S35.
[0021] Step S35: Extract the three-dimensional windows with an assigned value of 0 and mark them as edge windows.
[0022] Step S36: Respectively extract the triangles in each edge window and mark them as edge triangles.
[0023] Step S37: Connect adjacent edge triangles in sequence to form the boundary.
[0024] Step S38: Determine whether the current boundary is closed. If the current boundary is closed, execute Step S39.
[0025] Step S39: Determine that the current boundary has completed enclosing a constructible block.
[0026] As a further improvement of this application, in Step S33, defining the current grid and its adjacent grids as a three-dimensional window and respectively obtaining the assigned values of all grids in each three-dimensional window includes:
[0027] Step S331: Define the current grid and the twenty-six grids adjacent to the current grid as a 3×3×3 three-dimensional window.
[0028] Step S332: Respectively determine whether there is a grid with an assigned value of 0 in each 3×3×3 three-dimensional window. If there is no grid with an assigned value of 0 in the current 3×3×3 three-dimensional window, execute Step S333.
[0029] Step S333: Delete the 3×3×3 three-dimensional windows without a grid with an assigned value of 0.
[0030] As a further improvement of this application, in Step S37, connecting adjacent edge triangles in sequence to form the boundary includes:
[0031] Step S371: Obtain the row and column values of each triangle in the current edge window and establish a to-be-connected dot matrix for each triangle according to Kruskal's algorithm.
[0032] Step S372: Respectively obtain the minimum spanning tree of each to-be-connected dot matrix according to Kruskal's algorithm.
[0033] Step S373: Extract the triangles in all minimum spanning trees and use them as the edge triangles.
[0034] As a further improvement of the present application, in step S7, the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles are iteratively updated through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time, the total repulsive force is minimized, including:
[0035] In step S71, at least two first random solutions are respectively assigned to each first charged particle, at least two second random solutions are respectively assigned to each second charged particle, and at least two third random solutions are respectively assigned to each third charged particle according to Equation (1), Equation (2), and Equation (3) in sequence. It is defined that the results of all the first random solutions, all the second random solutions, and all the third random solutions are that the total length of all the cables reaches the minimum value, and at the same time, all the first charged particles, all the second charged particles, and all the third charged particles are constrained based on Coulomb's law;
[0036]
[0037] Among them, X a is the set of all the first random solutions of all the first charged particles, x a1 , x a2 ,..., x an are all the first random solutions of the a-th first charged particle, n is the number of all the first random solutions of the current first charged particle, m is the number of all the first charged particles, V a is the set of the velocities of all the first random solutions, v a1 , v a2 ,..., v an are all the velocities of all the first random solutions of the a-th first charged particle, is the set of all the Coulomb forces of all the first charged particles, is all the Coulomb forces received by the a-th first charged particle. The number of the Coulomb forces of the current first charged particle is equal to the number of all the first random solutions of the current first charged particle. k is the Coulomb constant, q an-1 is the electric charge of the (n - 1)-th first random solution of the a-th first charged particle, q an and the electric charge of the n-th first random solution of the a-th first charged particle, r a,n-1,n is the Euclidean distance between the (n - 1)-th first random solution and the n-th first random solution of the a-th first charged particle, is the unit vector from the (n - 1)-th first random solution to the n-th first random solution of the a-th first charged particle;
[0038]
[0039] Among them, X bis the set of all second random solutions for all second charged particles, x b1 , x b2 ,..., x bp is the set of all second random solutions for the b-th second charged particle, p is the number of all second random solutions for the current second charged particle, o is the number of all second charged particles, V b is the set of velocities of all second random solutions, v b1 , v b2 ,..., v bp is the set of all velocities of all second random solutions for the b-th second charged particle, is the set of all Coulomb forces of all second charged particles, is the set of all Coulomb forces exerted on the b-th second charged particle. The number of Coulomb forces on the current second charged particle is equal to the number of all second random solutions of the current second charged particle, q bp-1 is the electric charge of the (p - 1)-th second random solution of the b-th second charged particle, q bp and the electric charge of the p-th second random solution of the b-th second charged particle, r b,p-1,p is the Euclidean distance between the (p - 1)-th second random solution and the p-th second random solution of the b-th second charged particle, is the unit vector from the (p - 1)-th second random solution to the p-th second random solution of the b-th second charged particle;
[0040]
[0041] where, X c is the set of all third random solutions of all third charged particles, x c1 , x c2 ,..., x ct is the set of all third random solutions of the c-th third charged particle, t is the number of all third random solutions of the current third charged particle, s is the number of all third charged particles, V c is the set of velocities of all third random solutions, v c1 , v c2 ,..., v ct is the set of all velocities of all third random solutions of the c-th third charged particle, is the set of all Coulomb forces of all third charged particles, is the set of all Coulomb forces exerted on the c-th third charged particle. The number of Coulomb forces on the current third charged particle is equal to the number of all third random solutions of the current third charged particle, q ct-1 is the electric charge of the (t - 1)-th third random solution of the c-th third charged particle, q ctThe electric charge of the t-th third random solution of the c-th third charged particle, r c,t-1,t is the Euclidean distance between the (t - 1)-th third random solution and the t-th third random solution of the c-th third charged particle, and is the unit vector from the (t - 1)-th third random solution to the t-th third random solution of the c-th third charged particle;
[0042] Step S72, update the positions and velocities of each first random solution, each second random solution, and each third random solution at preset time intervals according to Equation (4):
[0043]
[0044] where, x ijd is the j-th random solution of the i-th charged particle, v ijd is the velocity of the j-th random solution of the i-th charged particle at the d-th step, ω·v ijd-1 is the velocity inertia of the j-th random solution of the i-th charged particle at the (d - 1)-th step, ω is the inertia coefficient of the velocity inertia, C 1 ·random()·(u best,ij - x ij ) is the self-cognition representation of the j-th random solution of the i-th charged particle, C 2 ·random()·(g best,ij - x ij ) is the social-cognition representation of the j-th random solution of the i-th charged particle; C 1 and C 2 are both learning factors, random() is a random number with a value range of [0, 1], u best,ij is the individual optimal solution obtained by the j-th random solution of the i-th charged particle, g best,ij is the global optimal solution obtained by the j-th random solution of the i-th charged particle;
[0045] Step S73, iterate a preset number of times according to Equation (4) to update each u best,ij and each g best,ij ;
[0046] Step S74, respectively judge whether the first difference of each u best,ij compared with the previous iteration is less than or equal to the first preset adaptation threshold. If so, execute Step S75;
[0047] Step S75, respectively judge whether the second difference of each g best,ij compared with the previous iteration is less than or equal to the second preset adaptation threshold. If so, execute Step S76;
[0048] Step S76, determine that the total length of all cables reaches the minimum value, and stop the iteration of formula (4);
[0049] Step S77, obtain the final positions of all the first charged particles, all the second charged particles, and all the third charged particles after the iteration is completed.
[0050] As a further improvement of the present application, in step S73, iterate a preset number of times according to formula (4) to update each u best,ij and each g best,ij , including:
[0051] Step S731, optimize the inertia coefficient ω once according to formula (5) in each iteration:
[0052]
[0053] where ω ijd is the inertia coefficient of the jth random solution of the ith charged particle after optimization in the dth step, ω ini is the initial inertia coefficient, ω ijd-1 is the inertia coefficient of the jth random solution of the ith charged particle in the (d - 1)th step, G k is the current iteration number, G max is the total number of iterations after the iteration is completed.
[0054] As a further improvement of the present application, in step S8, obtain all the real-time positions when the total repulsive force reaches the minimum, and define them as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power generation stations. After that, it includes:
[0055] Step S10, obtain the triangular mesh surface and fade the color of the area that is not the constructible block area to obtain a highlighted triangular mesh surface;
[0056] Step S20, output the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power generation stations on the highlighted triangular mesh surface to form a visual layout model;
[0057] Step S30, output the visual layout model to an external visual terminal.
[0058] To achieve the above object, the present application also provides the following technical solutions:
[0059] A layout device for photovoltaic modules, the layout device is applied to the layout method as described above, and the layout device includes the following components electrically connected in sequence:
[0060] A triangular mesh surface establishment module, configured to obtain the elevation digital model of the preset area and establish the triangular mesh surface of the preset area through a preset strategy;
[0061] A constructible terrain surface marking module, configured to respectively obtain the angle between each triangle in the triangular mesh surface and the horizontal plane, and mark the triangles whose angles do not exceed a preset angle threshold as constructible terrain surfaces;
[0062] A constructible block definition module, configured to obtain the boundaries of the constructible terrain surfaces through a sliding window algorithm, and define the constructible terrain surfaces with discontinuous boundaries as constructible blocks;
[0063] A charged particle definition module, configured to respectively define each photovoltaic array as a first charged particle with a first charge quantity, each substation as a second charged particle with a second charge quantity, and each energy storage power station as a third charged particle with a third charge quantity, and the charge polarities of all the first charged particles, all the second charged particles, and all the third charged particles are the same;
[0064] A charged particle output module, configured to output all the first charged particles, all the second charged particles, and all the third charged particles to the constructible blocks;
[0065] A repulsive force sum obtaining module, configured to initialize the positions of all the first charged particles, all the second charged particles, and all the third charged particles, and obtain the sum of the repulsive forces of all the first charged particles, all the second charged particles, and all the third charged particles;
[0066] A real-time position optimization module, configured to iteratively update the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time minimize the sum of the repulsive forces;
[0067] A layout position definition module, configured to obtain all the real-time positions when the sum of the repulsive forces reaches the minimum, and define them as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations.
[0068] To achieve the above object, the present application also provides the following technical solutions:
[0069] An electronic device, including a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the layout method as described above is implemented.
[0070] To achieve the above object, the present application also provides the following technical solutions:
[0071] A storage medium, in which program instructions are stored, and when the program instructions are executed by a processor, the layout method as described above can be implemented.
[0072] This application obtains the digital elevation model of a preset area and establishes a triangular mesh surface of the preset area through a preset strategy; respectively obtains the included angle between each triangle in the triangular mesh surface and the horizontal plane, and marks the triangles whose included angles do not exceed the preset angle threshold as constructible terrain surfaces; obtains the boundaries of the constructible terrain surfaces through a sliding window algorithm, and defines the constructible terrain surfaces with discontinuous boundaries as constructible blocks; respectively defines each photovoltaic array as a first charged particle with a first charge quantity, each substation as a second charged particle with a second charge quantity, and each energy storage power station as a third charged particle with a third charge quantity, and the charge polarities of all the first charged particles, all the second charged particles, and all the third charged particles are the same; outputs all the first charged particles, all the second charged particles, and all the third charged particles to the constructible blocks; initializes the positions of all the first charged particles, all the second charged particles, and all the third charged particles, and obtains the total repulsive force of all the first charged particles, all the second charged particles, and all the third charged particles; iteratively updates the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time minimizes the total repulsive force; obtains all the real-time positions when the total repulsive force reaches the minimum, and defines them as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations. This application uses the total length of the cables used in the photovoltaic power station as a layout index, defines all the photovoltaic modules as charged particles with the same polarity, and can adjust the distance between each photovoltaic module by adjusting the charge quantity of each charged particle, and the charge quantity is proportional to the distance. The staff can adjust the charge quantity of each charged particle in real time according to external indexes such as power generation and construction budget, so as to realize the adjustment of the spacing between each photovoltaic module. Under the constraint of the repulsive force of the foregoing charged particles, the real-time positions of each charged particle are iteratively updated through a global optimization algorithm, and the total length of the cables used is obtained once in each iteration until the total length of the cables used reaches the minimum value and no longer changes. At this time, the real-time positions of each charged particle obtained are the layout positions of each photovoltaic module. This application uses the most intuitive and important cables for electrical connection as a layout index, uses the repulsive force of equivalent charged particles as a spacing constraint, and obtains the layout positions of each photovoltaic module with the shortest cable usage. Less cable usage represents a more neat and compact layout method, making the power generation per unit area of the photovoltaic power station reach the maximum. Compared with the traditional manual judgment method, this application is automatically calculated by a software program throughout the process and achieves a layout effect that cannot be achieved by humans. Description of the Drawings
[0073] Figure 1 It is a schematic flowchart of the steps of an embodiment of a layout method for photovoltaic modules of this application;
[0074] Figure 2 This is a schematic structural diagram of an embodiment of a layout device for a photovoltaic module of the present application;
[0075] Figure 3 This is a schematic structural diagram of an embodiment of an electronic device of the present application;
[0076] Figure 4 This is a schematic structural diagram of an embodiment of a storage medium of the present application. Detailed implementation manners
[0077] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0078] The terms "first", "second", and "third" in the present application are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically and clearly defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0079] Referring to "embodiments" herein means that specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0080] Such as Figure 1As shown in the figure, this embodiment provides an embodiment of the layout method of a photovoltaic module. In this embodiment, the photovoltaic module includes a plurality of photovoltaic arrays installed in a preset area, at least one substation electrically connected to each photovoltaic array through a plurality of cables, and at least one energy storage power station electrically connected to the substation through at least one cable.
[0081] Preferably, the design intention of this embodiment is to automatically layout while avoiding uneven plots such as slopes and mountains, thereby reducing or eliminating the workload of excavation and filling projects and further reducing the infrastructure workload.
[0082] Preferably, for the convenience of the equivalent accuracy of subsequent charged particles, the patterns of the photovoltaic arrays, substations, and energy storage power stations are axisymmetric figures in the top-down view and have two mutually perpendicular axes of symmetry, such as polygons with an even number of sides (rectangles, hexagons, octagons, etc.), circles, etc., to ensure the layout accuracy. At the same time, each component can be rotated along its own center, such as the unified orientation of the photovoltaic arrays.
[0083] Specifically, the layout method specifically includes the following steps:
[0084] Step S1, obtain the digital elevation model of the preset area and establish a triangular mesh surface of the preset area through a preset strategy.
[0085] Preferably, the DEM (Digital Elevation Model) can be directly obtained from public channels (download of national high-precision 5m - 12m - 30m DEM terrain data).
[0086] Preferably, after the DEM is loaded into Global Mapper and before generating contour lines, it is generally necessary to clip the DEM to extract the DEM of the preset area.
[0087] Among them, the preset area data can be output using LSV (LocaSpaceViewer, a three-dimensional digital earth software that integrates images and three-dimensional terrain online services such as Google Earth and Tianditu, and uses C++ and OpenGL for underlying development technology. This software can quickly browse, measure, analyze, and annotate three-dimensional geographic information data and oblique photography real-scene data), and then saved as KML (a landmark file created by Google to record geographical information data such as the time, longitude, latitude, and altitude of a certain location or continuous locations) and imported into Global Mapper, or the preset area can be directly output within GlobalMapper.
[0088] Preferably, after the creation in the preset area is completed, the DEM layer can be polygonally clipped through the layer control center of Global Mapper. After the polygon clipping is completed, the contour generation function of Global Mapper (the line spacing needs to be set) can be directly used. Finally, Gaussian projection can be performed on the preset area by loading the CGCS2000 standard in Global Mapper and then configuring the reference points.
[0089] Preferably, the preset strategy can directly convert the digital elevation model into a triangulated surface through the surface drawing function of Civil 3D.
[0090] Preferably, most of the existing mapping software comes with the surface control point function, such as Civil 3D, AutoCAD, Rhino, NURBS, etc. Generating the surface control point file is a conventional generation method based on the aforementioned drawing software, which will not be elaborated in this embodiment.
[0091] Specifically reflected in: In Civil 3D, the terrain surface can be divided into four types, namely triangulated surface, triangulated volume surface, grid surface, and grid volume surface. Among them, the triangulated surface is composed of irregular triangles. When Civil 3D creates a triangulated surface from three-dimensional space points, it performs Delaunay triangulation on these three-dimensional space points. Through Delaunay triangulation, there are no points in the circle determined by the vertices of any triangle. To create the triangulation lines, Civil 3D will connect the batch of closest surface points, that is, the triangulated surface connects the points in the file according to the closest distance to each other, and all the points are connected into many triangles, thus forming a triangulated surface.
[0092] Preferably, the Delaunay triangulation has the following definition:
[0093] Definition 1: Suppose V is a finite point set in the two-dimensional real number field, edge e is a closed line segment with the points in the point set as endpoints, and E is the set of e. Then a triangulation T=(V, E) of the point set V is a planar graph G that satisfies the following conditions:
[0094] ① Except for the endpoints, the edges in the planar graph do not contain any points in the point set.
[0095] ② There are no intersecting edges.
[0096] ③ All the faces in the planar graph are triangular faces, and the union of all the triangular faces is the convex hull of the point set V.
[0097] Preferably, the Delaunay edge has the following definition:
[0098] ① Suppose an edge e in E (with two endpoints a and b), if e satisfies the following conditions, it is called a Delaunay edge.
[0099] ② There exists a circle passing through points a and b for a Delaunay edge, and there are no points in the point set V inside the circle. This property is also called the empty circle property.
[0100] Preferably, the Delaunay triangulation is also defined as follows:
[0101] ① If a triangulation T of the point set V only contains Delaunay edges, then the triangulation is called a Delaunay triangulation.
[0102] Step S2: Obtain the angles between each triangle in the triangular mesh surface and the horizontal plane respectively, and mark the triangles whose angles do not exceed the preset angle threshold as constructible terrain surfaces.
[0103] Preferably, the preset angle threshold can be set to 10°, that is, the angle between the triangle and the horizontal plane does not exceed 10°.
[0104] Step S3: Obtain the boundaries of the constructible terrain surfaces through a sliding window algorithm, and define the constructible terrain surfaces with discontinuous boundaries as constructible blocks.
[0105] For example: Suppose there are two mountains, a gully between the two mountains, and flat land around the two mountains in the preset area. After obtaining the boundaries through the sliding window algorithm, five constructible blocks are obtained, and the angles of the triangles in these five constructible blocks do not exceed 10°.
[0106] Step S4: Define each photovoltaic array as a first charged particle with a first charge quantity, each substation as a second charged particle with a second charge quantity, and each energy storage power station as a third charged particle with a third charge quantity, and the charge polarities of all the first charged particles, all the second charged particles, and all the third charged particles are the same.
[0107] Preferably, the first charge quantity, the second charge quantity, and the third charge quantity can increase in sequence, so that the mutual repulsion forces increase in sequence, that is, the distances between all photovoltaic arrays are relatively small, the distances between all substations and all photovoltaic arrays are relatively small, the distances between all substations are moderate, the distances between all energy storage power stations are relatively large, and the distances between all energy storage power stations and all substations and all photovoltaic arrays are relatively large.
[0108] Step S5: Output all the first charged particles, all the second charged particles, and all the third charged particles to the constructible blocks.
[0109] Preferably, for non-infrastructure blocks whose angles exceed a preset angle threshold, an ignoring process or a fading process described below is performed, so that all first charged particles, all second charged particles, and all third charged particles do not appear on the non-infrastructure blocks.
[0110] Step S6, initializing the positions of all first charged particles, all second charged particles, and all third charged particles, and obtaining the sum of the repulsive forces of all first charged particles, all second charged particles, and all third charged particles.
[0111] Preferably, a random function may be used to initialize the positions of all first charged particles, all second charged particles, and all third charged particles.
[0112] Step S7, iteratively updating the real-time positions of all first charged particles, all second charged particles, and all third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all cables and minimize the total repulsive force.
[0113] Step S8, obtaining all real-time positions when the sum of repulsive forces reaches the minimum, and defining them as the layout positions of all photovoltaic arrays, all substations, and all energy storage power stations.
[0114] In layman's terms, all the first charged particles, all the second charged particles, and all the third charged particles are balloons of increasing sizes, and the cables are ropes that tie the balloons. The global optimization algorithm is used to find the best position for each balloon while ensuring that the total length of the rope is the shortest.
[0115] Furthermore, in step S3, the boundary of the constructible terrain surface is obtained by a sliding window algorithm, and the constructible terrain surface with discontinuous boundaries is defined as a constructible block, including:
[0116] Step S31, establishing a grid set in the constructible terrain surface, and assigning a value of 0 to each grid in the grid set, wherein the size of each grid is smaller than or equal to the size of each triangle.
[0117] Preferably, with the support of computer computing power, the size of the grid can be set to be much smaller than the size of the triangle, for example, one triangle needs to be covered by at least 10 grids.
[0118] Step S32, determining whether there is a triangle in each mesh, and assigning a value of 1 to the meshes where there is a triangle.
[0119] Step S33, defining the current grid and adjacent grids as a three-dimensional window, and obtaining the assigned values of all grids in each three-dimensional window respectively.
[0120] Step S34: Determine whether there is a grid with an assigned value of 0 in each three-dimensional window. If there is a grid with an assigned value of 0 in the current three-dimensional window, then execute Step S35.
[0121] Step S35: Extract the three-dimensional windows with an assigned value of 0 and mark them as edge windows.
[0122] It should be noted that the assigned value of the grid located at the central position in the edge window must be 1 to ensure the accuracy of subsequent estimation.
[0123] Step S36: Extract the triangles in each edge window and mark them as edge triangles.
[0124] Step S37: Connect adjacent edge triangles in sequence to form a boundary.
[0125] Step S38: Determine whether the current boundary is closed. If the current boundary is closed, then execute Step S39.
[0126] Step S39: Determine that the current boundary has completed enclosing a constructible block.
[0127] Furthermore, in Step S33, define the current grid and the adjacent grids as a three-dimensional window, and respectively obtain the assigned values of all the grids in each three-dimensional window, including:
[0128] Step S331: Define the current grid and the twenty-six grids adjacent to the current grid as a 3×3×3 three-dimensional window.
[0129] Step S332: Determine whether there is a grid with an assigned value of 0 in each 3×3×3 three-dimensional window. If there is no grid with an assigned value of 0 in the current 3×3×3 three-dimensional window, then execute Step S333.
[0130] Step S333: Delete the 3×3×3 three-dimensional windows without a grid with an assigned value of 0.
[0131] Furthermore, in Step S37, connect adjacent edge triangles in sequence to form a boundary, including:
[0132] Step S371: Obtain the row and column values of each triangle in the current edge window and establish a to-be-connected dot matrix for each triangle according to Kruskal's algorithm.
[0133] Step S372: Obtain the minimum spanning tree of each to-be-connected dot matrix according to Kruskal's algorithm respectively.
[0134] Step S373: Extract the triangles in all the minimum spanning trees and use them as edge triangles.
[0135] Further, in step S7, the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles are iteratively updated through a global optimization algorithm to obtain the minimum value of the total length of all the cables, while minimizing the total repulsive force, including:
[0136] In step S71, at least two first random solutions are respectively assigned to each first charged particle, at least two second random solutions are respectively assigned to each second charged particle, and at least two third random solutions are respectively assigned to each third charged particle according to Equation (1), Equation (2), and Equation (3) in sequence. The results of all the first random solutions, all the second random solutions, and all the third random solutions are defined as the minimum value of the total length of all the cables, while all the first charged particles, all the second charged particles, and all the third charged particles are constrained based on Coulomb's law.
[0137]
[0138] Among them, X a is the set of all the first random solutions of all the first charged particles, x a1 , x a2 ,..., x an are all the first random solutions of the a-th first charged particle, n is the number of all the first random solutions of the current first charged particle, m is the number of all the first charged particles, V a is the set of the velocities of all the first random solutions, v a1 , v a2 ,..., v an are all the velocities of all the first random solutions of the a-th first charged particle, is the set of all the Coulomb forces of all the first charged particles, is all the Coulomb forces received by the a-th first charged particle. The number of the Coulomb forces of the current first charged particle is equal to the number of all the first random solutions of the current first charged particle. k is the Coulomb constant, q an-1 is the electric charge of the (n - 1)-th first random solution of the a-th first charged particle, q an and the electric charge of the n-th first random solution of the a-th first charged particle, r a,n-1,n is the Euclidean distance between the (n - 1)-th first random solution and the n-th first random solution of the a-th first charged particle, is the unit vector from the (n - 1)-th first random solution to the n-th first random solution of the a-th first charged particle.
[0139]
[0140] Among them, X b is the set of all the second random solutions of all the second charged particles, x b1 , xb2 ,...,x bp For all the second random solutions of the b-th second charged particle, p is the number of all the second random solutions of the current second charged particle, o is the number of all the second charged particles, V b is the set of the velocities of all the second random solutions, v b1 ,v b2 ,...,v bp are the velocities of all the second random solutions of the b-th second charged particle, is the set of all the Coulomb forces of all the second charged particles, are the Coulomb forces received by the b-th second charged particle. The number of the Coulomb forces of the current second charged particle is equal to the number of all the second random solutions of the current second charged particle, q bp-1 is the electric charge quantity of the (p - 1)-th second random solution of the b-th second charged particle, q bp and the electric charge quantity of the p-th second random solution of the b-th second charged particle, r b,p-1,p is the Euclidean distance between the (p - 1)-th second random solution and the p-th second random solution of the b-th second charged particle, is the unit vector from the (p - 1)-th second random solution to the p-th second random solution of the b-th second charged particle.
[0141]
[0142] Among them, X c is the set of all the third random solutions of all the third charged particles, x c1 ,x c2 ,...,x ct are the third random solutions of the c-th third charged particle, t is the number of all the third random solutions of the current third charged particle, s is the number of all the third charged particles, V c is the set of the velocities of all the third random solutions, v c1 ,v c2 ,...,v ct are the velocities of all the third random solutions of the c-th third charged particle, is the set of all the Coulomb forces of all the third charged particles, are the Coulomb forces received by the c-th third charged particle. The number of the Coulomb forces of the current third charged particle is equal to the number of all the third random solutions of the current third charged particle, q ct-1 is the electric charge quantity of the (t - 1)-th third random solution of the c-th third charged particle, q ct and the electric charge quantity of the t-th third random solution of the c-th third charged particle, r c,t-1,tis the Euclidean distance between the (t - 1)-th third random solution and the t-th third random solution of the c-th third charged particle, is the unit vector from the (t - 1)-th third random solution to the t-th third random solution of the c-th third charged particle.
[0143] Step S72, update the positions and velocities of each first random solution, each second random solution, and each third random solution at preset time intervals according to Equation (4):
[0144]
[0145] where, x ijd is the j-th random solution of the i-th charged particle, v ijd is the velocity of the j-th random solution of the i-th charged particle at the d-th step, ω·v ijd-1 is the velocity inertia of the j-th random solution of the i-th charged particle at the (d - 1)-th step, ω is the inertia coefficient of the velocity inertia, C 1 ·random()·(u best,ij - x ij ) is the self-cognition representation of the j-th random solution of the i-th charged particle, C 2 ·random()·(g best,ij - x ij ) is the social-cognition representation of the j-th random solution of the i-th charged particle; C 1 and C 2 are both learning factors, random() is a random number with a value range of [0, 1], u best,ij is the individual optimal solution obtained by the j-th random solution of the i-th charged particle, g best,ij is the global optimal solution obtained by the j-th random solution of the i-th charged particle.
[0146] Preferably, the value range of C 1 is [0, 0.5], preferably 0.4; the value range of C 2 is [0.5, 1], preferably 0.8.
[0147] It should be noted that a, b, and c in the above formulas (1), (2), and (3) can be equal or not. If they are equal, the same letter can be used. In this embodiment, different letters are used to prevent confusion between the three facilities. The intention of combining the letters a, b, and c with i in formula (4) is to illustrate that formulas (1), (2), and (3) are the definitions of three types of charged particles respectively, and the three types of charged particles need to be substituted into formula (4) respectively for global optimization. The same applies to n, p, and t.
[0148] Step S73, iterate a preset number of times according to Equation (4) to update each ubest,ij and each g best,ij .
[0149] Step S74, respectively determine whether the first difference of each u best,ij compared with the previous iteration is less than or equal to the first preset adaptation threshold. If the first difference of each u best,ij compared with the previous iteration is less than or equal to the first preset adaptation threshold, then execute Step S75.
[0150] Step S75, respectively determine whether the second difference of each g best,ij compared with the previous iteration is less than or equal to the second preset adaptation threshold. If the second difference of each g best,ij compared with the previous iteration is less than or equal to the second preset adaptation threshold, then execute Step S76.
[0151] Step S76, determine that the total length of all cables reaches the minimum value, and stop the iteration of Equation (4).
[0152] Step S77, obtain the final positions of all the first charged particles, all the second charged particles, and all the third charged particles after the iteration is completed.
[0153] Preferably, during the iteration, after calculating the best fitness each time, calculate the change amount (taking the absolute value) of this fitness and the best fitness in the previous iteration; judge the relative size of this change amount and the "function change amount tolerance". If the former is small, the counter is incremented by 1; otherwise, the counter is cleared to 0; continuously repeat this process. If the maximum iteration number has not been exceeded at this time, and the value of the counter exceeds the maximum count value, jump out of the iteration loop and the search ends; if the maximum iteration number has been reached at this time, then directly jump out of the loop and the search ends.
[0154] Further, in Step S73, iterate a preset number of times according to Equation (4) to update each u best,ij and each g best,ij , including:
[0155] Step S731, optimize the inertia coefficient ω once according to Equation (5) in each iteration:
[0156]
[0157] where, ω ijd is the inertia coefficient of the jth random solution of the ith charged particle after optimization in the dth step, ω ini is the initial inertia coefficient, ω ijd-1 is the inertia coefficient of the jth random solution of the ith charged particle in the (d - 1)th step, G k is the current iteration number, G max is the total number of iterations after the iteration is completed.
[0158] Further, in step S8, obtain all real-time positions when the total repulsive force reaches the minimum, and define them as the layout positions of all photovoltaic arrays, all substations, and all energy storage power generation stations. After that, it includes:
[0159] In step S10, obtain the triangular mesh surface and fade the color of the area of the non-infrastructure construction block to obtain a highlighted triangular mesh surface.
[0160] In step S20, output the layout positions of all photovoltaic arrays, all substations, and all energy storage power generation stations on the highlighted triangular mesh surface to form a visual layout model.
[0161] In step S30, output the visual layout model to an external visual terminal.
[0162] In this embodiment, the elevation digital model of a preset area is obtained, and a triangular mesh surface of the preset area is established through a preset strategy; the angles between each triangle in the triangular mesh surface and the horizontal plane are obtained respectively, and the triangles with angles not exceeding a preset angle threshold are marked as constructible terrain surfaces; the boundaries of the constructible terrain surfaces are obtained through a sliding window algorithm, and the constructible terrain surfaces with discontinuous boundaries are defined as constructible blocks; each photovoltaic array is defined as a first charged particle with a first charge quantity, each substation is defined as a second charged particle with a second charge quantity, and each energy storage power station is defined as a third charged particle with a third charge quantity, and all the first charged particles, all the second charged particles, and all the third charged particles have the same charge polarity; all the first charged particles, all the second charged particles, and all the third charged particles are output to the constructible blocks; the positions of all the first charged particles, all the second charged particles, and all the third charged particles are initialized, and the total repulsive force of all the first charged particles, all the second charged particles, and all the third charged particles is obtained; the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles are iteratively updated through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time, the total repulsive force is minimized; the real-time positions when the total repulsive force reaches the minimum are obtained and defined as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations. In this embodiment, the total length of the cables used in the photovoltaic power station is used as a layout index, and all the photovoltaic modules are defined as charged particles with the same polarity. By adjusting the charge quantity of each charged particle, the distance between each photovoltaic module can be adjusted, and the charge quantity is proportional to the distance. The staff can adjust the charge quantity of each charged particle in real time according to external indexes such as power generation and construction budget, so as to realize the adjustment of the distance between each photovoltaic module. Under the constraint of the repulsive force between the aforementioned charged particles, the real-time positions of each charged particle are iteratively updated through a global optimization algorithm, and the total length of the cables used is obtained once in each iteration until the total length of the cables used reaches the minimum value and no longer changes. At this time, the real-time positions of each charged particle obtained are the layout positions of each photovoltaic module. In this embodiment, the most intuitive and important cable for electrical connection is used as the layout index, and the repulsive force between equivalent charged particles is used as the spacing constraint, and the layout positions of each photovoltaic module are obtained with the shortest cable used. Less cable usage represents a more neat and compact layout method, so that the power generation per unit area of the photovoltaic power station reaches the maximum. Compared with the traditional manual judgment method, this embodiment is automatically calculated by a software program throughout the process, and a layout effect that cannot be achieved by manual labor is achieved.
[0163] As Figure 2 shown, this embodiment provides an embodiment of a layout device for photovoltaic modules. In this embodiment, the layout device is applied to the layout method in the above-mentioned embodiment.
[0164] Specifically, the layout device includes a triangular mesh surface establishment module 1, a constructible terrain surface marking module 2, a constructible block definition module 3, a charged particle definition module 4, a charged particle output module 5, a repulsive force sum acquisition module 6, a real-time position optimization module 7, and a layout position definition module 8 that are electrically connected in sequence.
[0165] Among them, the triangular mesh surface establishment module 1 is used to obtain the elevation digital model of a preset area and establish the triangular mesh surface of the preset area through a preset strategy; the constructible terrain surface marking module 2 is used to respectively obtain the angle between each triangle in the triangular mesh surface and the horizontal plane, and mark the triangles whose angles do not exceed the preset angle threshold as constructible terrain surfaces; the constructible block definition module 3 is used to obtain the boundaries of the constructible terrain surfaces through a sliding window algorithm and define the constructible terrain surfaces with discontinuous boundaries as constructible blocks; the charged particle definition module 4 is used to respectively define each photovoltaic array as a first charged particle with a first charge quantity, each substation as a second charged particle with a second charge quantity, and each energy storage power station as a third charged particle with a third charge quantity, and the charge polarities of all the first charged particles, all the second charged particles, and all the third charged particles are the same; the charged particle output module 5 is used to output all the first charged particles, all the second charged particles, and all the third charged particles to the constructible blocks; the repulsive force sum acquisition module 6 is used to initialize the positions of all the first charged particles, all the second charged particles, and all the third charged particles and obtain the sum of the repulsive forces of all the first charged particles, all the second charged particles, and all the third charged particles; the real-time position optimization module 7 is used to iteratively update the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time minimize the sum of the repulsive forces; the layout position definition module 8 is used to obtain all the real-time positions when the sum of the repulsive forces reaches the minimum and define them as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations.
[0166] Further, the constructible block definition module specifically includes a first constructible block definition sub-module, a second constructible block definition sub-module, a third constructible block definition sub-module, a fourth constructible block definition sub-module, a fifth constructible block definition sub-module, a sixth constructible block definition sub-module, a seventh constructible block definition sub-module, an eighth constructible block definition sub-module, and a ninth constructible block definition sub-module that are electrically connected in sequence; the first constructible block definition sub-module is electrically connected to the constructible terrain surface marking module, and the ninth constructible block definition sub-module is electrically connected to the charged particle definition module.
[0167] Among them, the first buildable block definition sub-module is used to establish a grid set in the buildable terrain surface and assign 0 to each grid in the grid set, and the size of each grid is less than or equal to the size of each triangle; the second buildable block definition sub-module is used to respectively determine whether there is a triangle in each grid and assign 1 to the grid where there is a triangle; the third buildable block definition sub-module is used to define the current grid and the adjacent grids as a three-dimensional window and respectively obtain the assignment values of all grids in each three-dimensional window; the fourth buildable block definition sub-module is used to respectively determine whether there is a grid with an assignment value of 0 in each three-dimensional window; the fifth buildable block definition sub-module is used to extract the three-dimensional window with an assignment value of 0 if there is a grid with an assignment value of 0 in the current three-dimensional window and mark it as an edge window; the sixth buildable block definition sub-module is used to respectively extract the triangles in each edge window and mark them as edge triangles; the seventh buildable block definition sub-module is used to sequentially connect adjacent edge triangles to form a boundary; the eighth buildable block definition sub-module is used to determine whether the current boundary is closed; the ninth buildable block definition sub-module is used to determine that the current boundary has completed enclosing a buildable block if the current boundary is closed.
[0168] Further, the third buildable block definition sub-module specifically includes a first buildable block definition unit, a second buildable block definition unit, and a third buildable block definition unit that are sequentially electrically connected; the first buildable block definition unit is electrically connected to the second buildable block definition sub-module, and the third buildable block definition unit is electrically connected to the fourth buildable block definition sub-module.
[0169] Among them, the first buildable block definition unit is used to define the current grid and the twenty-six grids adjacent to the current grid as a 3×3×3 three-dimensional window; the second buildable block definition unit is used to respectively determine whether there is a grid with an assignment value of 0 in each 3×3×3 three-dimensional window; the third buildable block definition unit is used to delete the 3×3×3 three-dimensional window without a grid with an assignment value of 0 if there is no grid with an assignment value of 0 in the current 3×3×3 three-dimensional window.
[0170] Further, the seventh buildable block definition sub-module specifically includes a first buildable block definition unit, a second buildable block definition unit, and a third buildable block definition unit that are sequentially electrically connected; the first buildable block definition unit is electrically connected to the sixth buildable block definition sub-module, and the third buildable block definition unit is electrically connected to the eighth buildable block definition sub-module.
[0171] Among them, the first infrastructure block definition unit is used to obtain the row and column values of each triangle in the current edge window and establish a to-be-connected dot matrix for each triangle according to Kruskal's algorithm; the second infrastructure block definition unit is used to obtain the minimum spanning tree of each to-be-connected dot matrix according to Kruskal's algorithm; the third infrastructure block definition unit is used to extract the triangles in all the minimum spanning trees and use them as edge triangles.
[0172] Furthermore, the real-time position optimization module specifically includes a first real-time position optimization sub-module, a second real-time position optimization sub-module, a third real-time position optimization sub-module, a fourth real-time position optimization sub-module, a fifth real-time position optimization sub-module, a sixth real-time position optimization sub-module, and a seventh real-time position optimization sub-module that are electrically connected in sequence; the first real-time position optimization sub-module is electrically connected to the repulsive force sum acquisition module, and the seventh real-time position optimization sub-module is electrically connected to the layout position definition module.
[0173] Among them, the first real-time position optimization sub-module is used to assign at least two first random solutions to each first charged particle, at least two second random solutions to each second charged particle, and at least two third random solutions to each third charged particle in sequence according to Equation (1), Equation (2), and Equation (3), define the results of all the first random solutions, all the second random solutions, and all the third random solutions as the total length of all the cables reaching the minimum value, and at the same time, constrain all the first charged particles, all the second charged particles, and all the third charged particles based on Coulomb's law.
[0174]
[0175] Among them, X a is the set of all the first random solutions of all the first charged particles, x a1 , x a2 , …, x an is all the first random solutions of the a-th first charged particle, n is the number of all the first random solutions of the current first charged particle, m is the number of all the first charged particles, V a is the set of the speeds of all the first random solutions, v a1 , v a2 ,..., v an is all the speeds of all the first random solutions of the a-th first charged particle, is the set of all the Coulomb forces of all the first charged particles, is all the Coulomb forces received by the a-th first charged particle, the number of the Coulomb forces of the current first charged particle is equal to the number of all the first random solutions of the current first charged particle, k is the Coulomb constant, q an-1 is the electric charge of the (n - 1)-th first random solution of the a-th first charged particle, q anThe electric charge of the nth first random solution of the ath first charged particle, r a,n-1,n is the Euclidean distance between the (n - 1)th first random solution and the nth first random solution of the ath first charged particle, and is the unit vector from the (n - 1)th first random solution to the nth first random solution of the ath first charged particle.
[0176]
[0177] where X b is the set of all second random solutions of all second charged particles, x b1 , x b2 ,..., x bp are all second random solutions of the bth second charged particle, p is the number of all second random solutions of the current second charged particle, o is the number of all second charged particles, V b is the set of the velocities of all second random solutions, v b1 , v b2 ,..., v bp are all the velocities of all second random solutions of the bth second charged particle, is the set of all Coulomb forces of all second charged particles, is all the Coulomb forces received by the bth second charged particle. The number of Coulomb forces of the current second charged particle is equal to the number of all second random solutions of the current second charged particle, q bp-1 is the electric charge of the (p - 1)th second random solution of the bth second charged particle, q bp and the electric charge of the pth second random solution of the bth second charged particle, r b,p-1,p is the Euclidean distance between the (p - 1)th second random solution and the pth second random solution of the bth second charged particle, is the unit vector from the (p - 1)th second random solution to the pth second random solution of the bth second charged particle.
[0178]
[0179] where X c is the set of all third random solutions of all third charged particles, x c1 , x c2 ,..., x ct are all third random solutions of the cth third charged particle, t is the number of all third random solutions of the current third charged particle, s is the number of all third charged particles, V c is the set of the velocities of all third random solutions, v c1 , v c2 ,..., v ctis the velocity of all the third random solutions of the c-th third charged particle, is the set of all Coulomb forces of all the third charged particles, is all the Coulomb forces received by the c-th third charged particle. The number of Coulomb forces of the current third charged particle is equal to the number of all the third random solutions of the current third charged particle, q ct-1 is the electric charge of the (t - 1)-th third random solution of the c-th third charged particle, q ct and the electric charge of the t-th third random solution of the c-th third charged particle, r c,t-1,t is the Euclidean distance between the (t - 1)-th third random solution and the t-th third random solution of the c-th third charged particle, is the unit vector from the (t - 1)-th third random solution to the t-th third random solution of the c-th third charged particle.
[0180] The second real-time position optimization sub-module is used to update the positions and velocities of each first random solution, each second random solution, and each third random solution at preset time intervals according to Equation (4):
[0181]
[0182] where, x ijd is the j-th random solution of the i-th charged particle, v ijd is the velocity of the j-th random solution of the i-th charged particle at the d-th step, ω·v ijd-1 is the velocity inertia of the j-th random solution of the i-th charged particle at the (d - 1)-th step, ω is the inertia coefficient of the velocity inertia, C 1 ·random()·(u best,ij -x ij ) is the self-cognition representation of the j-th random solution of the i-th charged particle, C 2 ·random()·(g best,ij -x ij ) is the social-cognition representation of the j-th random solution of the i-th charged particle; C 1 and C 2 are both learning factors, random() is a random number with a value range of [0, 1], u best,ij is the individual optimal solution obtained by the j-th random solution of the i-th charged particle, g best,ij is the global optimal solution obtained by the j-th random solution of the i-th charged particle.
[0183] The third real-time position optimization sub-module is used to iterate a preset number of times according to Equation (4) to update each u best,ij and each g best,ij .
[0184] The fourth real-time position optimization sub-module is used to respectively judge each u best,ij Whether the first difference compared with the previous iteration is less than or equal to the first preset adaptation threshold. If so, step S75 is executed.
[0185] The fifth real-time position optimization sub-module is used to respectively judge each g best,ij Whether the second difference compared with the previous iteration is less than or equal to the second preset adaptation threshold. If so, step S76 is executed.
[0186] The sixth real-time position optimization sub-module is used to determine that the total length of all cables reaches the minimum value and stop the iteration of formula (4).
[0187] The seventh real-time position optimization sub-module is used to obtain the final positions of all first charged particles, all second charged particles, and all third charged particles after the iteration is completed.
[0188] Further, the third real-time position optimization sub-module is specifically used to optimize the inertia coefficient ω once according to formula (5) in each iteration:
[0189]
[0190] where ω ijd is the inertia coefficient after optimization at the d-th step of the j-th random solution of the i-th charged particle, ω ini is the initial inertia coefficient, ω ijd-1 is the inertia coefficient of the j-th random solution of the i-th charged particle at the (d - 1)-th step, G k is the current iteration number, G max is the total number of iterations after the iteration is completed.
[0191] Further, the layout device further includes a highlighted triangular mesh surface acquisition module, a visualization layout model generation module, and a visualization layout model output module that are electrically connected in sequence.
[0192] Among them, the highlighted triangular mesh surface acquisition module is used to acquire the triangular mesh surface and fade the color of the area of the non-constructible infrastructure block to obtain the highlighted triangular mesh surface; the visualization layout model generation module is used to output the layout positions of all photovoltaic arrays, all substations, and all energy storage power generation stations on the highlighted triangular mesh surface to form a visualization layout model; the visualization layout model output module is used to output the visualization layout model to an external visualization terminal.
[0193] It should be noted that this embodiment is a functional module item embodiment based on the above method embodiment. For additional content such as the preference, expansion, and example illustration of this embodiment, please refer to the above method embodiment.
[0194] In this embodiment, the elevation digital model of a preset area is obtained, and a triangular mesh surface of the preset area is established through a preset strategy; the angles between each triangle in the triangular mesh surface and the horizontal plane are respectively obtained, and the triangles with angles not exceeding a preset angle threshold are marked as constructible terrain surfaces; the boundaries of the constructible terrain surfaces are obtained through a sliding window algorithm, and the constructible terrain surfaces with discontinuous boundaries are defined as constructible blocks; each photovoltaic array is respectively defined as a first charged particle with a first charge quantity, each substation is defined as a second charged particle with a second charge quantity, and each energy storage power station is defined as a third charged particle with a third charge quantity, and all the first charged particles, all the second charged particles, and all the third charged particles have the same charge polarity; all the first charged particles, all the second charged particles, and all the third charged particles are output to the constructible blocks; the positions of all the first charged particles, all the second charged particles, and all the third charged particles are initialized, and the total repulsive force of all the first charged particles, all the second charged particles, and all the third charged particles is obtained; the real-time positions of all the first charged particles, all the second charged particles, and all the third charged particles are iteratively updated through a global optimization algorithm to obtain the minimum value of the total length of all the cables, and at the same time, the total repulsive force is minimized; the real-time positions when the total repulsive force reaches the minimum are obtained and defined as the layout positions of all the photovoltaic arrays, all the substations, and all the energy storage power stations. In this embodiment, the total length of the cables used in the photovoltaic power station is used as a layout index, and all the photovoltaic modules are defined as charged particles with the same polarity. By adjusting the charge quantity of each charged particle, the distance between each photovoltaic module can be adjusted, and the charge quantity is proportional to the distance. The staff can adjust the charge quantity of each charged particle in real time according to external indexes such as power generation quantity and construction budget, so as to realize the adjustment of the distance between each photovoltaic module. Under the constraint of the repulsive force between the foregoing charged particles, the real-time positions of each charged particle are iteratively updated through a global optimization algorithm, and the total length of the cables used is obtained once in each iteration until the total length of the cables used reaches the minimum value and no longer changes. At this time, the real-time positions of each charged particle obtained are the layout positions of each photovoltaic module. In this embodiment, the most intuitive and important cables for electrical connection are used as the layout index, the repulsive force between equivalent charged particles is used as the distance constraint, and the layout positions of each photovoltaic module are obtained with the shortest cables used. Less cable usage represents a more neat and compact layout method, enabling the maximum power generation per unit area of the photovoltaic power station. Compared with the traditional manual judgment method, this embodiment is automatically calculated by a software program throughout the process and achieves a layout effect that cannot be achieved manually.
[0195] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. As Figure 3 shown, the electronic device 9 includes a processor 91 and a memory 92 coupled to the processor 91.
[0196] The memory 92 stores program instructions for implementing the layout method of a photovoltaic module according to any one of the above embodiments.
[0197] The processor 91 is configured to execute the program instructions stored in the memory 92 to perform the layout of the photovoltaic module.
[0198] Among them, the processor 91 can also be referred to as a CPU (Central Processing Unit). The processor 91 may be an integrated circuit chip with signal processing capabilities. The processor 91 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0199] Furthermore, Figure 4 is a schematic structural diagram of a storage medium according to an embodiment of the present application. Refer to Figure 4 , the storage medium 10 of the embodiment of the present application stores program instructions 101 that can implement all of the above methods. Among them, the program instructions 101 can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, or a terminal device such as a computer, a server, a mobile phone, or a tablet.
[0200] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0201] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. The above is only the implementation manner of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A method for laying out a photovoltaic assembly, wherein the photovoltaic assembly comprises a plurality of photovoltaic arrays erected in a preset area, at least one substation electrically connected to each photovoltaic array through a plurality of cables, and at least one energy storage power station electrically connected to the substation through at least one cable, wherein: The layout method comprises: Step S1, obtaining a digital elevation model of the preset area, and establishing a triangulated surface of the preset area through a preset strategy; Step S2, respectively obtaining the angle between each triangle in the triangulated surface and the horizontal plane, and marking the triangles whose angles do not exceed a preset angle threshold as constructible terrain surfaces; Step S3, obtaining the boundary of the constructible terrain surface by a sliding window algorithm, and defining the constructible terrain surface with discontinuous boundaries as a constructible block; Step S4, respectively defining each photovoltaic array as a first charged particle with a first charge, defining each substation as a second charged particle with a second charge, and defining each energy storage power station as a third charged particle with a third charge, and all first charged particles, all second charged particles, and all third charged particles have the same charge polarity; Step S5, outputting all first charged particles, all second charged particles, and all third charged particles to the constructible block; Step S6, initializing the positions of all first charged particles, all second charged particles, and all third charged particles, and obtaining the sum of repulsive forces of all first charged particles, all second charged particles, and all third charged particles; Step S7, iteratively updating the real-time positions of all first charged particles, all second charged particles, and all third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all cables and minimize the sum of the repulsive forces; Step S8, obtaining all real-time positions when the sum of the repulsive forces reaches the minimum, and defining them as the layout positions of all photovoltaic arrays, all substations, and all energy storage power stations.
2. The layout method according to claim 1, characterized in that: Step S3, obtaining the boundary of the constructible terrain surface by a sliding window algorithm, and defining the constructible terrain surface with discontinuous boundaries as a constructible block, including: Step S31, establishing a grid set in the constructible terrain surface, and assigning a value of 0 to each grid in the grid set, wherein the size of each grid is smaller than or equal to the size of each triangle; Step S32, determining whether the triangle exists in each mesh, and assigning a value of 1 to the mesh where the triangle exists; Step S33, defining the current grid and adjacent grids as a three-dimensional window, and obtaining the assigned values of all grids in each three-dimensional window respectively; Step S34, determining whether there is a grid in each three-dimensional window whose assigned value is 0, if there is a grid in the current three-dimensional window whose assigned value is 0, executing step S35; Step S35, extracting the three-dimensional windows with assigned values of 0 and marking them as edge windows; Step S36, extracting triangles in each edge window and marking them as edge triangles; Step S37, sequentially connecting adjacent edge triangles to form the boundary; Step S38, determining whether the current boundary is closed, if the current boundary is closed, executing step S39; Step S39, determining whether the current boundary has completely enclosed a constructible block.
3. The layout method according to claim 2, characterized in that: Step S33, defining the current grid and the adjacent grids as a three-dimensional window, and obtaining the assigned values of all grids in each three-dimensional window respectively, including: Step S331, defining the current grid and twenty-six grids adjacent to the current grid as a 3×3×3 stereoscopic window; Step S332, determining whether there is a grid with an assigned value of 0 in each 3×3×3 stereoscopic window, if there is no grid with an assigned value of 0 in the current 3×3×3 stereoscopic window, executing step S333; Step S333, deleting the 3×3×3 stereoscopic window with no grid and the assigned value of 0.
4. The layout method according to claim 2, characterized in that: Step S37, sequentially connecting adjacent edge triangles to form the boundary, includes: Step S371, obtaining the row and column values of each triangle in the current edge window and establishing a to-be-connected point matrix for each triangle according to the Kruskal algorithm; Step S372, obtaining the minimum spanning tree of each to-be-connected point matrix according to the Kruskal algorithm; Step S373, extracting all triangles in the minimum spanning tree and using them as the edge triangles.
5. The layout method according to claim 1, characterized in that: Step S7, iteratively updating the real-time positions of all first charged particles, all second charged particles, and all third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all cables and minimize the sum of the repulsive forces, including: Step S71, according to formula (1), formula (2), and formula (3), at least two first random solutions are assigned to each first charged particle, at least two second random solutions are assigned to each second charged particle, and at least two third random solutions are assigned to each third charged particle, and the results of all the first random solutions, all the second random solutions, and all the third random solutions are defined as the total length of all the cables reaching the minimum value, and at the same time, all the first charged particles, all the second charged particles, and all the third charged particles are constrained based on Coulomb's law; Among them, X a is the set of all first random solutions for all first charged particles, x a1 ,x a2 ,...,x an are all the first random solutions of the ath first charged particle, n is the number of all the first random solutions of the current first charged particle, m is the number of all the first charged particles, V a is the set of velocities of all first random solutions, v a1 ,v a2 ,...,v an are all the velocities of all the first random solutions of the a-th first charged particle, is the set of all Coulomb forces for all first charged particles, are all the Coulomb forces on the ath first charged particle. The number of Coulomb forces on the current first charged particle is equal to the number of all the first random solutions of the current first charged particle. k is the Coulomb constant, q an-1 is the charge of the n-1th random solution of the ath first charged particle, q an The charge of the nth random solution of the ath first charged particle, r a,n-1,n is the Euclidean distance between the n-1th first random solution and the nth first random solution of the ath first charged particle, is the unit vector from the n-1th first random solution to the nth first random solution of the ath first charged particle; Among them, X b is the set of all second random solutions for all second charged particles, x b1 ,x b2 ,...,x bp is all the second random solutions of the bth second charged particle, p is the number of all the second random solutions of the current second charged particle, o is the number of all second charged particles, V b is the set of velocities of all second random solutions, v b1 ,v b2 ,...,v bp are all the velocities of all the second random solutions of the b-th second charged particle, is the set of all Coulomb forces for all second charged particles, is all the Coulomb forces on the bth second charged particle. The number of Coulomb forces on the current second charged particle is equal to the number of all the second random solutions of the current second charged particle. bp-1 is the charge of the p-1th second random solution of the bth second charged particle, q bp The charge of the pth random solution of the bth second charged particle, r b,p-1,p is the Euclidean distance between the p-1th second random solution and the pth second random solution of the bth second charged particle, is the unit vector from the p-1th second random solution to the pth second random solution of the bth second charged particle; Among them, X c is the set of all third random solutions for all third charged particles, x c1 ,x c2 ,...,x ct are all the third random solutions of the cth third charged particle, t is the number of all the third random solutions of the current third charged particle, s is the number of all third charged particles, V c is the set of velocities of all third random solutions, v c1 ,v c2 ,...,v ct are all the velocities of all third random solutions of the cth third charged particle, is the set of all Coulomb forces for all third charged particles, is all the Coulomb forces on the cth third charged particle. The number of Coulomb forces on the current third charged particle is equal to the number of all third random solutions of the current third charged particle. ct-1 is the charge of the t-1th third random solution of the cth third charged particle, q ct The charge of the tth third random solution of the cth third charged particle, r c,t-1,t is the Euclidean distance between the t-1th third random solution and the tth third random solution of the cth third charged particle, is the unit vector from the t-1th third random solution to the tth third random solution of the cth third charged particle; Step S72, respectively updating the position and speed of each first random solution, each second random solution, and each third random solution at a preset time interval according to formula (4): Among them, x ijd is the jth random solution of the ith charged particle at step d, x ij is the jth random solution of the ith charged particle, v ijd is the velocity of the jth random solution of the ith charged particle at the dth step, ω·v ijd-1 is the velocity inertia of the jth random solution of the ith charged particle at the d-1th step, ω is the inertia coefficient of the velocity inertia, C1·random()·(u best,ij -x ij ) is the self-perception representation of the jth random solution of the ith charged particle, C2·random()·(g best,ij -x ij ) is the social cognitive representation of the jth random solution of the ith charged particle; C1 and C2 are both learning factors, random() is a random number in the range of [0,1], u best,ij is the individual optimal solution obtained by the jth random solution of the ith charged particle, g best,ij is the global optimal solution obtained by the jth random solution of the i-th charged particle; Step S73, iterate a preset number of times according to formula (4) to update each u best,ij And each g best,ij ; Step S74, determine each u best,ij Compared with the first difference of the previous iteration, whether it is less than or equal to the first preset adaptation threshold, if so, executing step S75; Step S75, determine each g best,ij Compared with the second difference of the previous iteration, whether it is less than or equal to the second preset adaptation threshold, if so, executing step S76; Step S76, determining that the total length of all cables reaches the minimum value, and stopping the iteration of formula (4); Step S77, obtaining the final positions of all first charged particles, all second charged particles, and all third charged particles after the iteration is completed.
6. The layout method according to claim 5, characterized in that: Step S73, iterate a preset number of times according to formula (4) to update each u best,ij And each g best,ij ,include: Step S731, optimizing the inertia coefficient ω once in each iteration according to formula (5): Among them, ω ijd is the inertia coefficient of the jth random solution of the ith charged particle after optimization in the dth step, ω ini is the initial inertia coefficient, ω ijd-1 is the inertia coefficient of the jth random solution of the ith charged particle at the d-1th step, G k is the current iteration number, G max is the total number of iterations after the iteration is completed.
7. The layout method according to claim 1, characterized in that: Step S8, obtaining all real-time positions when the sum of the repulsive forces reaches the minimum, and defining them as the layout positions of all photovoltaic arrays, all substations, and all energy storage power stations, and then including: Step S10, obtaining the triangulated surface and performing color fading processing on the area that is not the constructible block to obtain a highlighted color triangulated surface; Step S20, outputting the layout positions of all photovoltaic arrays, all substations, and all energy storage power stations on the emphasized color triangulated surface to form a visual layout model; Step S30: outputting the visualization layout model to an external visualization terminal.
8. A photovoltaic assembly layout device, the layout device being applied to the layout method according to any one of claims 1 to 7, characterized in that: The layout device includes: A triangulated surface building module, used to obtain the elevation digital model of the preset area and build the triangulated surface of the preset area through a preset strategy; A construction-capable terrain surface marking module is used to obtain the angle between each triangle in the triangulated surface and the horizontal plane, and mark the triangles whose angles do not exceed a preset angle threshold as construction-capable terrain surfaces; A construction block definition module is used to obtain the boundary of the construction terrain surface through a sliding window algorithm, and define the construction terrain surface with discontinuous boundaries as a construction block; A charged particle definition module, used to define each photovoltaic array as a first charged particle with a first charge, each substation as a second charged particle with a second charge, and each energy storage power station as a third charged particle with a third charge, and all the first charged particles, all the second charged particles, and all the third charged particles have the same charge polarity; A charged particle output module, used for outputting all first charged particles, all second charged particles, and all third charged particles to the constructible block; A repulsive force sum acquisition module is used to initialize the positions of all first charged particles, all second charged particles, and all third charged particles, and to acquire the repulsive force sum of all first charged particles, all second charged particles, and all third charged particles; A real-time position optimization module, used for iteratively updating the real-time positions of all first charged particles, all second charged particles, and all third charged particles through a global optimization algorithm to obtain the minimum value of the total length of all cables and minimize the sum of the repulsive forces; The layout position definition module is used to obtain all real-time positions when the sum of the repulsive forces reaches the minimum, and define them as the layout positions of all photovoltaic arrays, all substations, and all energy storage power stations.
9. An electronic device, characterized in that: It comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the layout method according to any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed by a processor, the layout method according to any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Method, device and system for generating layout diagram of photovoltaic power generation system and storage medium
CN118278063A
Method and system for characterizing efficiency impact of interruption defects in photovoltaic cells
US20130035881A1