Photovoltaic power generation array aided design method and system
Through the genetic algorithm and particle swarm optimization algorithm combined with gradient descent algorithm, the multi-constraint problem of photovoltaic power generation array design under complex terrain is solved, and efficient and accurate photovoltaic power generation array design is achieved, which improves power generation efficiency and reduces costs.
Patent Information
- Application Number
- CN202510710856.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Traditional photovoltaic power generation array design methods are difficult to comprehensively consider the coupling influence of multiple factors such as environment and component selection under complex terrain conditions, resulting in unreasonable array layout, serious shadow shading, and high costs, which cannot maximize power generation benefits.
Genetic algorithms are used to encode component models, array partitions and scaffold types to generate initial populations, and high-fitness solution sets are screened through genetic operations. Combined with particle swarm optimization algorithm and gradient descent algorithm, multi-stage coordinated optimization is carried out to determine the component inclination angle, row spacing and coordinates of photovoltaic power generation arrays.
It realizes efficient and accurate photovoltaic power generation array design under complex terrain, ensures the scientificity and implementability of the design plan, improves power generation efficiency and reduces costs, and avoids local optimal trapping and shadow shading problems.
Smart Images

Figure CN120493760A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of engineering design technology, and more specifically, relates to a photovoltaic array auxiliary design method and system. Background Art
[0002] With the growing global demand for clean energy, photovoltaic power generation, as a key renewable energy source, faces challenges in efficiently designing photovoltaic arrays in complex terrains, raising the question of improving power generation efficiency and reducing costs. Traditional design methods, which rely heavily on engineers' experience, struggle to comprehensively consider the impact of multiple factors, including the environment and component selection. This can lead to issues such as irrational array layouts, severe shading, and high costs, hindering the maximization of power generation efficiency.
[0003] Therefore, there is an urgent need for an efficient and accurate photovoltaic array auxiliary design method to improve the scientificity and feasibility of the design scheme and promote the high-quality development of the photovoltaic power generation industry. Summary of the Invention
[0004] The purpose of this application is to provide a photovoltaic array auxiliary design method and system to achieve efficient and accurate photovoltaic array design and ensure the scientific nature and feasibility of the design scheme.
[0005] A first aspect of an embodiment of the present application provides a photovoltaic array auxiliary design method, comprising: Within the constraints of terrain partitioning, component models, array partitions, and scaffold types are encoded into chromosomes to generate an initial population; genetic operations are performed on the initial population to obtain a target population, and chromosomes in the target population with a fitness greater than a first threshold are used as a first solution set; Determine an initial particle swarm based on the first solution set, where particles in the initial particle swarm correspond one-to-one to chromosomes in the first solution set, and each particle includes a component inclination, a row spacing, and coordinates; Iteratively updating the initial particle swarm until an iterative convergence condition is satisfied, taking the particle with the highest fitness in the iterative updating process as the initial point, iteratively updating the initial point based on the negative gradient direction of the objective function gradient until an iterative termination condition is satisfied, thereby obtaining the target particle; A photovoltaic power generation array is determined based on the target particles.
[0006] A second aspect of the embodiments of the present application provides a photovoltaic array auxiliary design system, comprising: A genetic module is used to perform chromosome encoding on component models, array partitions, and scaffold types within the constraints of terrain partitions to generate an initial population; perform genetic operations on the initial population to obtain a target population, and use chromosomes in the target population with a fitness greater than a first threshold as a first solution set; a particle swarm optimization module, configured to determine an initial particle swarm based on the first solution set, wherein particles in the initial particle swarm correspond one-to-one to chromosomes in the first solution set, and each particle includes a component inclination angle, a row spacing, and coordinates; A gradient optimization module is used to iteratively update the initial particle swarm until the iterative convergence condition is met, taking the particle with the highest fitness in the iterative update process as the initial point, and iteratively update the initial point based on the negative gradient direction of the objective function gradient until the iterative termination condition is met to obtain the target particle; A design module is used to determine a photovoltaic power generation array based on the target particles.
[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned photovoltaic array auxiliary design method are implemented.
[0008] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned photovoltaic power generation array auxiliary design method are implemented.
[0009] The photovoltaic array auxiliary design method and system provided in the embodiments of the present application have the following beneficial effects: the embodiments of the present application integrate a genetic algorithm, a particle swarm optimization algorithm (PSO), and a gradient descent algorithm to form a multi-stage collaborative optimization framework, thereby achieving the following significant beneficial effects in photovoltaic array design: On the one hand, the present embodiment uses a genetic algorithm for chromosome encoding and global search for discrete variables such as component model, array partition, and bracket type, effectively solving the problem of combining discrete variables with multiple constraints in complex terrain. Through fitness-driven genetic operations, the present embodiment generates a highly adaptable first solution set, ensuring that the basic framework of the design solution meets terrain constraints while taking into account component efficiency and cost, significantly improving the efficiency of early solution screening.
[0010] On the other hand, the embodiment of the present application constructs an initial particle swarm based on the first solution set, and uses the particle swarm optimization algorithm to iteratively update continuous variables such as component inclination, row spacing, coordinates, etc., which can quickly converge to a local optimal solution area, avoid the defect of a single algorithm falling into local optimality, and provide a high-quality starting point for subsequent fine optimization.
[0011] Finally, the embodiment of the present application takes the optimal particle of particle swarm optimization as the starting point, and uses the gradient descent algorithm to make fine adjustments along the negative gradient direction of the objective function, which can further improve the accuracy of continuous variables and ensure that the array layout achieves the optimal balance between power generation, cost, and shadow loss, meeting the legality and feasibility of the project implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 A schematic diagram of a flow chart of a photovoltaic array auxiliary design method provided in one embodiment of the present application; Figure 2 This is a structural block diagram of a photovoltaic array auxiliary design system provided in one embodiment of the present application; Figure 3 A schematic block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0014] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0015] In order to make the purpose, technical solutions and advantages of this application clearer, specific embodiments will be described below with reference to the accompanying drawings.
[0016] Please refer to Figure 1 , Figure 1 This is a flow chart of a photovoltaic array auxiliary design method provided in one embodiment of the present application. The method can be executed by an electronic device. Specifically, the method can include S101 to S104.
[0017] S101: Within the constraints of terrain partitioning, chromosome encoding is performed on component models, array partitions, and bracket types to generate an initial population; genetic operations are performed on the initial population to obtain a target population, and chromosomes in the target population with a fitness greater than a first threshold are used as a first solution set.
[0018] In this embodiment, terrain zoning constraints refer to dividing the site into multiple functional zones based on the site's terrain characteristics and engineering limitations. Each zone corresponds to different design constraint parameters, such as slope constraints, prohibited layout constraints, and construction constraints.
[0019] For example, the topographical features of a photovoltaic site may include slope, aspect, altitude, and ground cover type. Engineering restrictions may include prohibited areas, cultural relic protection areas, power access points, and the like. Multiple functional zones may include flat slope areas, gentle slope areas, steep slope areas, and prohibited areas. Slope constraints may include allowing the use of fixed supports in flat slope areas (slope less than or equal to 5°), requiring the use of adjustable supports in steep slope areas (slope greater than or equal to 25°), prohibited areas requiring zero module installations, and construction constraints requiring the spacing between rows and columns of modules in gentle slope areas (slope between 5° and 15°) to avoid shadowing.
[0020] In this example, chromosome encoding refers to converting discrete design parameters such as component model, array partition, and scaffold type into a chromosome structure that can be processed by the genetic algorithm. It is essentially a symbolic expression of discrete variables. The typical encoding method of chromosome encoding is integer encoding, that is, each gene bit corresponds to a discrete design parameter: For example, the module model (gene position 1) has values [1, 2, 3] (corresponding to mainstream module models A, B, and G, respectively); the array partition (gene position 2) has values [1, 2, 3] (corresponding to site partitions 1, 2, and 3); and the support type (gene position 3) has values [1, 2] (corresponding to fixed support and adjustable support). The encoding must meet the terrain partitioning constraints (for example, if the slope of partition 3 is greater than or equal to 25°, gene position 3 can only be 2).
[0021] In this embodiment, the initial population is a set of randomly generated chromosomes, such as a population size of 100. Each chromosome in the initial population represents a candidate design. The generation rules of the initial population include randomness, constraint, and diversity.
[0022] For example, chromosomes are randomly combined within the legal range of component models, partitions, and scaffold types, and chromosomes that violate the terrain partitioning constraints are excluded. In addition, the distribution of the initial gene positions is controlled to ensure that the initial population covers different design directions.
[0023] In this embodiment, genetic manipulation refers to evolving the initial population through selection, crossover, mutation, and other steps to screen out better design solutions. The target population refers to the population after iterative genetic manipulation, in which the average fitness of the chromosomes is higher than that of the initial population, the diversity is reduced, and the proportion of high-quality solutions is increased. The first threshold is the fitness critical value set according to the engineering requirements, such as taking 1.2 times the average fitness of the target population, and screening chromosomes with fitness higher than this value as the first solution set, which is used as the initial input for subsequent particle swarm optimization.
[0024] In this example, component model, array partition, and bracket type are all discrete variables with limited and discontinuous values, making them difficult to directly handle using traditional gradient optimization methods. This example utilizes a genetic algorithm's population search mechanism of encoding → selection → crossover → mutation to efficiently explore the combinatorial space of discrete variables and avoid falling into local optima.
[0025] In this example, fitness is a quantitative metric used to measure the quality of chromosomes and assess the overall performance of design solutions under terrain constraints. Essentially, it transforms multi-objective optimization problems—maximizing power generation, minimizing costs, terrain adaptability, and structural safety—into unified evaluation criteria, enabling the genetic algorithm to identify optimal design solutions. A higher fitness indicates that the component model, array partition, and bracket type combination corresponding to that chromosome more closely matches the design objectives, making it a preferred candidate for retention and evolution in subsequent iterations.
[0026] In this example, during initial population generation and genetic manipulation, all chromosomes must satisfy terrain zoning constraints to ensure that the generated solutions are feasible. This constraint is achieved by restricting the range of gene bit values during encoding and by performing constraint checks after genetic manipulation, preventing invalid solutions from entering the subsequent optimization process.
[0027] For example, this embodiment can divide functional zones based on site DEM data and a vector map of prohibited areas, and define constraint parameters for each zone. This embodiment defines a chromosome structure as [component model, zone ID, scaffold type]. Based on the chromosome structure, N chromosomes are randomly generated, and individuals that violate the zone constraints are filtered to form an initial population.
[0028] This embodiment can calculate power generation, costs, etc. through simulation software, and use the fitness function to calculate the fitness of each chromosome. This embodiment selects individuals with high fitness as parents, performs crossover and mutation, and generates a progeny population. This embodiment performs constraint checks on the progeny and repairs or discards illegal individuals. The chromosome structure repeats genetic operations until the population fitness converges, such as the optimal fitness changes by less than 5% for 10 consecutive generations. This embodiment sets 80% of the optimal fitness of the target population as the first threshold, and screens out chromosomes with fitness higher than the threshold as the first solution set, which is the initial input for subsequent particle swarm optimization.
[0029] In this embodiment, the method for determining the terrain partition constraint includes: Based on the terrain data and prohibited areas of the target area, a clustering algorithm is used to divide the target area into multiple terrain zones; the terrain data of the target area includes slope and slope direction, and the prohibited areas are determined by obstacle data; The feasible solution boundaries of component models, array partitions and bracket types for each terrain partition are determined, and the feasible solution boundaries are used as terrain partition constraints.
[0030] In this embodiment, prohibited areas are defined by obstacle data such as buildings, vegetation, ecological protection zones, and transmission line corridors, where PV module installation is prohibited or restricted. Obstacle data can include parameters such as vector coordinates, area, obstacle type, and constraint parameters. The feasible solution boundary refers to the legal range of values for module model, array partition, and mounting type within each terrain partition.
[0031] For example, the component model boundary refers to the allowable component size determined according to the partition slope, such as prohibiting large-size components in steep slope areas to avoid excessive wind loads; the array partition boundary refers to determining the maximum / minimum footprint of a single array based on the partition area and the distribution of prohibited areas; the bracket type boundary refers to the partition slope range.
[0032] In this embodiment, the slope and aspect of the terrain directly affect the module's light reception efficiency and the mechanical properties of the bracket. By using a clustering algorithm to group areas with similar terrain characteristics, it is possible to achieve unified design parameters within the same zone and differentiated designs across different zones, reducing design complexity.
[0033] In this embodiment, prohibited areas are determined by obstacle data and essentially serve as baseline constraints for project feasibility. For example, module installation is prohibited in ecological protection areas, and module height is restricted near transmission line corridors to prevent electromagnetic interference. Embedding prohibited areas in terrain zoning can eliminate infeasible areas in advance, reducing inefficient calculations during subsequent optimization.
[0034] In this embodiment, the feasible solution boundary for each terrain zone must be strongly correlated with the terrain characteristics. For example, flat slopes allow the use of large-sized modules and fixed brackets, which are cost-effective and easy to install; steep slopes only allow small-sized modules and adjustable brackets to reduce wind loads and improve power generation efficiency; and shaded slopes limit the module tilt angle to avoid radiation loss caused by mismatch with the solar altitude angle.
[0035] This embodiment uses a clustering algorithm to divide functional zones, precisely matching module models and support types with terrain features such as slope and aspect, thereby improving power generation efficiency. This embodiment also embeds prohibited deployment areas and feasible solution boundaries into the design process, enhancing project feasibility. The genetic algorithm in this embodiment can handle discrete variables such as module models, covering all legal combinations, avoiding local optimality, and providing a high-quality starting point for subsequent optimization.
[0036] S102: Determine an initial particle swarm based on the first solution set. The particles in the initial particle swarm correspond one-to-one to the chromosomes in the first solution set. Each particle includes a component inclination angle, a row spacing, and coordinates.
[0037] In this embodiment, each chromosome in the first solution set corresponds to a set of component models, array partitions, and bracket types, and has satisfied the terrain partitioning constraints. The initial particle swarm is mapped from each chromosome of the first solution set. The component inclination angle refers to the angle between the component surface and the horizontal plane. The component inclination angle affects the efficiency of solar radiation reception, and its value range is constrained by the partition slope. The row spacing refers to the horizontal distance between adjacent component rows. The row spacing must satisfy the shadow occlusion constraint. The coordinates refer to the planar position of the component within the partition, which must avoid the prohibited area and comply with the construction rules.
[0038] In this example, each chromosome uniquely corresponds to a particle. The particle inherits the chromosome's discrete parameters, such as the partition ID and scaffold type, and optimizes continuous parameters based on these parameters. For example, if the chromosome corresponds to partition 2 (gentle slope area with a slope of 10°), the particle's initial inclination angle can be set to 20° based on the empirically optimal inclination angle for the partition. The initial row spacing must meet the minimum spacing constraint and can be set to 3.5m, for example.
[0039] This embodiment uses a genetic algorithm to process discrete variables and a particle swarm optimization algorithm to process continuous variables, forming a two-stage collaborative optimization. In the first stage, the genetic algorithm ensures that the discrete parameter combination is legal and efficient; in the second stage, the particle swarm optimization algorithm improves the power generation efficiency by optimizing continuous variables within a legal discrete framework. The initial particles of PSO are directly generated from the first solution set rather than randomly generated, which can reduce the search space. The discrete parameters of each particle already meet the terrain constraints, and PSO only needs to search within the feasible domain of continuous variables. The high fitness characteristics of the first solution set place the initial particles in the better solution area. PSO does not need to start from a random solution, which can improve the convergence speed.
[0040] Exemplarily, this embodiment can decode the first solution set to obtain basic design parameters: from the high-fitness chromosomes selected by the genetic algorithm, extract the power generation efficiency and size corresponding to the component model, the terrain characteristics, no-layout zone distribution, and construction constraints corresponding to the array partition, and the structural form and material parameters corresponding to the bracket type, providing a discrete framework for continuous parameter initialization.
[0041] This embodiment can set the initial value of the component inclination angle according to the partition slope, such as taking the local latitude ±10° in the flat slope area, the slope of the gentle slope area is +10°, the slope of the steep slope area is +5°, and the upper limit is 45°; this embodiment can calculate the minimum spacing based on the absence of shadows on the winter solstice, adding a 0.5-meter buffer to balance the power generation efficiency and land utilization rate; this embodiment can randomly generate component coordinates in rows and columns in non-prohibited areas, arrange them horizontally along the contour lines, and be more than 5 meters away from the boundary of the prohibited area to ensure construction feasibility.
[0042] This embodiment can perform constraint checks on initial parameters and correct any values that exceed the limit according to the boundary. For example, if the inclination exceeds the slope, it is set to the boundary value. If the row spacing exceeds the limit, it is taken to the extreme value. If the coordinate falls into the prohibited area, it is translated to the legal area, ensuring that all particle parameters meet engineering specifications.
[0043] This embodiment combines the decoded discrete parameters with the verified continuous parameters to form a particle swarm that corresponds one-to-one with the first solution set. Each particle represents an independent design solution and carries differentiated discrete parameters, providing a diverse and high-quality starting point for subsequent particle swarm optimization. This bridges the gap between global optimization of discrete variables and local fine-tuning of continuous variables, improving overall design efficiency and feasibility.
[0044] S103: Iteratively update the initial particle swarm until the iterative convergence condition is met. The particle with the highest fitness in the iterative update process is used as the initial point. The initial point is iteratively updated based on the negative gradient direction of the objective function gradient until the iterative termination condition is met to obtain the target particle.
[0045] In this embodiment, the iterative convergence condition can include at least one of the following: the rate of change of fitness at the global optimal position for e consecutive generations is less than a preset threshold, the velocity vector norm of all particles is less than a preset threshold, and the number of preset iterations reaches an upper limit. The negative gradient direction of the objective function gradient refers to the direction of steepest descent of the objective function at the current point and is used by the gradient descent algorithm to fine-tune continuous variables. The objective function can be a comprehensive function that maximizes power generation, minimizes costs, and minimizes shadow loss.
[0046] In this embodiment, the iteration termination condition refers to the basis for stopping the gradient descent, and the iteration termination condition may include at least one of the following: the modulus of the gradient vector is less than a preset threshold, the difference between the objective functions of two consecutive iterations is less than a preset threshold, and the preset number of iterations is reached.
[0047] Exemplarily, each particle of this embodiment carries continuous parameters such as component inclination, row spacing, coordinates, and discrete parameters such as component model, partition, and bracket type determined by the genetic algorithm. The initial position of each particle can be set based on the characteristics of the terrain partition and engineering experience. In this embodiment, by simulating the foraging behavior of a flock of birds, particles move in the solution space, referring to their own historical optimal positions, such as the high power generation inclination angle that has been found, and also drawing on the global optimal position of the group, such as the row spacing solution with the best overall performance among all particles. The moving step size is dynamically adjusted, and in the early stage, a large-scale search is conducted for efficient parameter combinations in different terrain partitions. In the later stage, the step size is reduced to focus on high-quality areas. When the comprehensive performance change of multiple generations of the global optimal solution is less than the preset threshold, or the particle movement speed is less than the threshold, PSO is stopped and the global optimal particle is extracted as the starting point for fine-tuning.
[0048] This embodiment integrates maximizing power generation, minimizing costs, and minimizing shadow loss into a unified objective function. Using a small perturbation method, the influence of each parameter at the current position on the objective function is calculated to determine the fastest optimization direction, such as the direction in which decreasing the inclination angle increases power generation. Starting from the optimal position obtained by PSO, this embodiment moves in the direction in which the objective function value decreases most rapidly, such as adjusting the inclination angle by 0.05° and the spacing by 0.02m each time. When the effect of the parameter adjustment on the objective function is less than a preset threshold or the preset number of iterations is reached, the adjustment stops and the final parameters are output as the target particle.
[0049] S104: Determine a photovoltaic power generation array based on the target particles.
[0050] In this embodiment, the target particle is the optimal solution obtained after three-stage optimization using a genetic algorithm, particle swarm optimization, and gradient descent. It is essentially a digital solution that includes complete design parameters, which can include: discrete parameters: module model (e.g., 540W monocrystalline silicon module), array partition ID (e.g., partition 2 corresponds to a gently sloping sunny area), and bracket type (e.g., an adjustable aluminum alloy bracket); continuous parameters: module inclination (e.g., 23.5°), row spacing (3.8m), and the coordinates of each module (e.g., the coordinates within partition 2 (100, 200); and constraint parameters: satisfying terrain slope (inclination less than partition slope + 5°), avoiding prohibited areas (coordinates greater than 50m from the boundary of the protected area), and electrical rules (module models in the same string must be consistent).
[0051] A photovoltaic power generation array refers to a collection of components, brackets, and electrical systems installed in a physical site based on target particle parameters. It is required to maximize power generation efficiency, minimize construction costs, and facilitate operation and maintenance.
[0052] Exemplarily, this embodiment can extract partition information, equipment parameters and geometric parameters from the target particles, such as the steep slope shade area, the partition constraint is a slope of 28°, and the prohibited area is located on the west side; the component model is 1.8m×1.1m in size, the bracket type is an adjustable bracket with a minimum of 1.2m and a maximum of 1.8m; the component inclination angle is 23° and the row spacing is 3.8m.
[0053] In this embodiment, component rows can be arranged along the contour line direction, with each row containing 20 components, determined according to the partition area and the location of the no-distribution zone; the row spacing strictly adopts the target particle 3.8m, and the column spacing is set to 0.5m; the component coordinates are distributed according to the principle of row and column alignment and no-distribution zone buffering.
[0054] As can be seen from the above, this embodiment integrates the genetic algorithm, particle swarm optimization (PSO) algorithm, and gradient descent algorithm to form a multi-stage collaborative optimization framework, achieving the following significant beneficial effects in photovoltaic array design: On the one hand, this embodiment uses genetic algorithms for chromosome encoding and global search of discrete variables such as component model, array partition, and bracket type, effectively solving the problem of combining discrete variables with multiple constraints in complex terrain. This embodiment uses fitness-driven genetic operations to generate a highly adaptable first solution set, ensuring that the basic framework of the design solution meets terrain constraints while also taking into account component efficiency and cost, significantly improving the efficiency of early solution screening.
[0055] On the other hand, this embodiment constructs an initial particle swarm based on the first solution set, and uses the particle swarm optimization algorithm to iteratively update continuous variables such as component inclination, row spacing, and coordinates. It can quickly converge to a local optimal solution area, avoid the defect of a single algorithm falling into local optimality, and provide a high-quality starting point for subsequent fine optimization.
[0056] Finally, this embodiment uses the optimal particle of particle swarm optimization as the starting point and performs fine adjustments along the negative gradient direction of the objective function through the gradient descent algorithm, which can further improve the accuracy of continuous variables and ensure that the array layout achieves the optimal balance between power generation, cost, and shadow loss, meeting the legality and feasibility of the project implementation.
[0057] In one embodiment of the present application, performing genetic manipulation on the initial population to obtain the target population includes: The fitness of all chromosomes in the initial population is calculated using a first fitness function; the chromosomes include component model, array partition, scaffold type and check segment; The first fitness function is: ; in, 、 、 and is the weight coefficient, , Chromosome The fitness value of Chromosome The corresponding simulated annual power generation is is the theoretical maximum power generation, Budget for the project, Chromosome The corresponding total cost, For construction regularity, Chromosome The corresponding violation coefficient of the i-th constraint, is the penalty weight of the i-th constraint, is the total number of constraints, is the maximum constraint violation value; Based on the fitness of all chromosomes, genetic operations are performed on the initial population to obtain the target population.
[0058] In this embodiment, 、 and It is dimensionless and ranges from (0, 1). is the maximum constraint violation value, which refers to the sum of all constraints violated. Can make The range is reduced to (0, 1).
[0059] In this embodiment, genetic operations are performed on the initial population based on the fitness of all chromosomes to obtain the target population, specifically including: Select chromosomes that meet the fitness conditions from the initial population as the parent population; All chromosomes in the parent population are randomly segmented and crossovered based on the adaptive crossover probability to obtain the offspring population; the adaptive crossover probability is negatively correlated with the fitness of the chromosome; All chromosomes in the offspring population are segmentally mutated based on the terrain partitioning constraints to obtain the target population.
[0060] In this embodiment, the first fitness function is a quantitative indicator for measuring the quality of chromosomes, which comprehensively considers power generation efficiency, cost control, construction feasibility, and constraint violation penalties to provide a screening basis for genetic operations.
[0061] in, is the power generation efficiency term, It is a cost control item. It is the construction regularity, which is used to measure the alignment of component rows and columns. If the standard deviation of the row and column spacing is less than 0.2m, it is set to 1. Otherwise, it decreases linearly according to the deviation. is the constraint penalty term, Constraint violation coefficient. If the overlap rate of the prohibited area is greater than 5%, it is 1; otherwise, it is 0.
[0062] In this embodiment, the adaptive crossover probability refers to a crossover probability that is dynamically adjusted according to the fitness of the chromosome. The higher the fitness of the chromosome, the lower the corresponding crossover probability.
[0063] In this embodiment, the chromosome structure includes a module model, array partition, bracket type, and a verification segment. The module model represents different types of photovoltaic modules. The array partition corresponds to the different terrain areas divided by the site, each with specific design constraints. Bracket types can include: No. 1 represents a fixed bracket, and No. 2 represents an adjustable bracket. The verification segment is used to record whether the solution complies with the terrain constraints, such as 0 for legal and 1 for violation of slope or no-go zone constraints, for subsequent screening and repair.
[0064] In this example, the parent population is a high-quality group selected from the initial solutions. Crossover and mutation can be used to generate even better offspring solutions. The offspring population is a new generation of solutions generated through crossover and mutation. They inherit the parent's high-quality genes and introduce new parameter combinations, theoretically resulting in better overall performance than the initial population.
[0065] This example transforms the four core objectives of power generation, cost, construction, and constraints into a unified score, avoiding the one-sidedness of single-metric optimization. This example divides chromosomes into three sections: component model, array partition, and scaffold type. During crossover, genes are swapped only within the same section, such as within the component model section. This avoids confusion between partitions and scaffold types and ensures the relevance of design parameters.
[0066] For example, for each solution in the initial population, the annual power generation is simulated using relevant software. The total cost is calculated by combining the component, bracket, and construction costs to obtain the power generation efficiency index and cost control index. The construction regularity is calculated based on the component arrangement data of the solution, such as the row and column spacing and the degree of alignment. The solution is checked to see if it violates the terrain constraints, such as whether it is installed in a prohibited area and whether the bracket type matches the slope. A constraint penalty score is generated, with a score of 0 for no violation and points deducted based on the severity of the violation. Based on the above data, the fitness of each solution is calculated according to the first fitness function, and the solution is sorted from high to low by score.
[0067] This embodiment can use a roulette wheel or elite retention strategy based on chromosome fitness to retain high-fitness individuals in the initial population as the parent population. For example, 20% of the high-scoring solutions can be directly retained, and the remaining 80% can be randomly selected through a roulette wheel, ensuring that high-quality solutions are prioritized and the population is diverse.
[0068] For each parent solution in the parent population, this embodiment automatically adjusts the crossover probability based on its fitness. This embodiment divides the parent solutions into three segments based on component model, array partition, and scaffold type. After randomly selecting parent pairs, genes are exchanged only within the same segment. For example, by swapping array partitions between two parents, a new partition combination is generated, ensuring that parameters associated with partitions and scaffold types remain reasonable.
[0069] This embodiment can impose specific mutation rules on the gene segments of each offspring solution, such as: Module section: When the scheme changes in steep slope areas, only small-sized modules are allowed to be used to avoid the risk of wind loads on large modules on steep slopes; Support segment: When the plan in the flat slope area changes, there is a 90% probability of retaining the fixed support and only a 10% probability of changing to an adjustable support.
[0070] Constraint verification and repair: After mutation, the verification section is checked. If the solution violates the terrain constraints, it will be automatically repaired or marked as invalid and removed.
[0071] For example, this embodiment randomly selects two parent chromosomes, exchanges partition IDs or scaffold types, and generates new offspring; and randomly mutates component model 1 to 3 with a probability of 5%.
[0072] This embodiment integrates multi-dimensional objectives such as power generation, cost, construction, and constraints through a fitness function, prompting the target population to strike a balance between efficient power generation, cost control, and compliant construction, thus avoiding the drawbacks of single-index optimization. This embodiment embeds terrain constraints into genetic coding and mutation rules to reduce the generation of illegal solutions, improve the feasibility of solutions, and reduce the risk of rework caused by design violations. The adaptive cross-combination elite retention strategy of this embodiment protects high-quality designs while exploring new combinations, significantly improving the overall fitness and convergence efficiency of the population. Directed variation adjustments for different terrain zones retain efficient designs that meet engineering realities, reduce manual intervention, and lay a key foundation for subsequent optimization.
[0073] In one embodiment of the present application, iteratively updating the initial particle swarm includes: The second fitness function is used to calculate the fitness of all particles in the initial particle swarm; The second fitness function is: ; in, is the fitness value of particle X, 、 、 and is the weight coefficient, , is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the theoretical maximum power generation, Budget for the project, is the shadow occlusion loss rate of particle X, is the constraint penalty of the j-th continuous variable corresponding to particle X, is the total number of continuous variables, is the maximum penalty value; The initial particle swarm is iteratively updated based on the fitness of all particles.
[0074] In this embodiment, It is dimensionless and ranges from (0, 1). Can make The range is reduced to (0, 1).
[0075] In this embodiment, the initial particle swarm is iteratively updated based on the fitness of all particles, specifically including: Based on the fitness of all particles, the initial particle swarm is iteratively updated using the position update formula and the velocity update formula; The speed update formula is: ; in, is the adjustment speed of the k+1th generation of the mth particle in dimension d. The dimension corresponding to d=1 is the component inclination angle, the dimension corresponding to d=2 is the row spacing, and the dimension corresponding to d=3 is the coordinate. is the inertia weight, is the current velocity of the mth particle in dimension d, is the individual learning factor, and is a random number, is the historical optimal position of the mth particle in dimension d, is the current position of the mth particle in dimension d, is the social learning factor, is the optimal position of all particles in dimension d, is the gradient weight, is the gradient of the objective function at the current position; The position update formula is:
[0076] in, is the position of the mth particle in the k+1th generation in dimension d.
[0077] In this embodiment, the second fitness function is a comprehensive evaluation metric for particle quality, integrating power generation efficiency, cost, shadowing loss, and constraint penalties to provide a quantitative basis for particle swarm optimization. The higher the value calculated by the second fitness function, the better the overall performance of the corresponding photovoltaic array design scheme for continuous parameters such as inclination, spacing, and coordinates.
[0078] The second fitness function includes annual power generation Total cost , shadow occlusion loss rate and continuous variable constraint penalties Among them, professional software can be used to simulate the annual power generation capacity under different inclination angles and layouts to obtain The annual power generation is significantly affected by the inclination angle of the components and the row and column spacing. When the inclination angle is reasonable, the sunlight directly hits the surface of the components, and the power generation efficiency is higher. The total cost can include costs such as component procurement, bracket installation, land leveling and electrical connection. If the row spacing is too large, the land occupation cost will increase, and if it is too small, the subsequent operation and maintenance costs will increase due to shadow shading. The shadow shading loss rate is used to evaluate the proportion of rear-row components covered by the shadows of the front rows during the special period of the winter solstice. The higher the loss rate, the more obvious the decline in power generation efficiency. The continuous variable constraint penalty is for violations such as the component inclination angle exceeding the terrain slope limit, the row spacing being less than the minimum shadow-free spacing, and the coordinates falling into the prohibited area. Points are deducted according to the severity.
[0079] In this embodiment, speed update refers to determining the adjustment direction and amplitude of the particles in terms of inclination, row spacing, and coordinates. The speed update rule mainly integrates four aspects of information: (1) Historical movement inertia: particles tend to maintain their original movement trend and avoid frequent mutations. For example, if they moved in the direction of increasing the inclination angle before, they may continue to adjust in this direction next time. (2) Self-optimal experience (i.e., the historical optimal position of the particle): the particle refers to the best parameter combination it has found in the past. For example, the power generation was the highest when the inclination angle was 25° and the row spacing was 3.8m, and it will prioritize moving closer to this parameter. (3) Group optimal experience (i.e., the global optimal position of the particle group): the particle refers to the best parameter combination among all particles. For example, the global optimal row spacing is 3.5m, and other particles will gather towards this value. (4) Power generation efficiency gradient: adjust the direction according to the sensitivity of power generation to parameter changes. For example, for every 1° increase in inclination, the power generation increases by 0.8%, and it will prioritize moving in the direction of increasing the inclination angle.
[0080] Position update refers to adjusting the continuous parameter values of particles based on the speed update results, such as adjusting the component inclination angle from 24° to 24.5° and the row spacing from 3.6m to 3.7m, ensuring that each iteration evolves towards a more optimal solution.
[0081] For example, this embodiment can obtain the component model, partition type, and bracket type from the first solution set selected by the genetic algorithm, clarifying the parameter constraints of the partition. This embodiment sets the initial component inclination angle based on the partition slope, calculates the row spacing value based on the theory of no shadow obstruction on the winter solstice, and randomly generates initial coordinate values in the non-prohibited area within the partition, ensuring that the distance from the prohibited area boundary is at least 5 meters, and the rows and columns are aligned to facilitate construction.
[0082] For each particle, this embodiment can use simulation software to calculate the annual power generation and shadow loss rate, combine the cost data and constraint check results, and use the second fitness function to calculate the comprehensive fitness score.
[0083] During the iterative update process, this embodiment can compare the particle's current solution with the historical best solution, and update the individual best parameters if it is better; and select the solution with the highest comprehensive score among all particles as the global best parameters.
[0084] This embodiment can determine the adjustment amplitude (i.e., speed) of each parameter based on historical movement inertia, its own best experience, global best experience, and the sensitive direction of power generation efficiency. For example, the inclination angle approaches the global optimal inclination angle by 0.5°, and the spacing increases by 0.2m based on the sensitivity of shadow loss. This embodiment can modify the parameter value (i.e., position) according to the adjusted amplitude. If it exceeds the constraint range, it is corrected to the boundary value.
[0085] When the comprehensive score change of the global best solution for 10 consecutive generations reaches a preset threshold, or the number of iterations reaches a preset iteration limit, the update can be stopped.
[0086] This embodiment uses a particle swarm optimization algorithm to precisely adjust parameters such as component inclination and spacing, significantly reducing shadow losses and improving power generation efficiency. Compared to traditional methods, this approach is closer to the actual optimal solution, with fewer iterations and reduced computational time. This embodiment uses constraint penalties and automatic corrections to ensure that parameters always meet engineering requirements such as terrain slope and prohibited areas, significantly improving the solution's compliance rate and enhancing implementation feasibility. The fitness function weights of this embodiment can be dynamically adjusted to suit different project requirements, enabling the solution to achieve an ideal balance between power generation efficiency, cost, and construction convenience, thereby improving the design's practicality and affordability.
[0087] In one embodiment of the present application, the initial point is iteratively updated based on the negative gradient direction of the objective function gradient until the iteration termination condition is satisfied to obtain the target particle, including: Calculate the gradient vector of the objective function with respect to the initial point based on the central difference method; The objective function is: ; in, is the target score corresponding to particle X, is the power generation weight, b is the cost weight, c is the shadow loss weight, +b+c=1, is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the shadow occlusion loss rate of particle X, is the theoretical maximum power generation, budget for the project; Iteratively update the initial point along the negative direction of the gradient vector until the iteration termination condition is met and the target particle is obtained; The iteration termination condition is that the norm of the gradient vector of the updated particle is less than a second threshold; the second threshold is a preset positive number.
[0088] In this embodiment, the objective function is a quantitative indicator that measures the overall performance of the particles. It provides an optimization direction for gradient descent by integrating power generation, cost, and shadow loss. The lower the value of the objective function, the better the corresponding particle solution's overall performance in terms of high power generation, low cost, and low shadow loss.
[0089] In this embodiment, the gradient vector is the rate of change of the objective function at the current parameter point. It indicates the degree and direction of each parameter's influence on the objective function, for example, whether the objective function increases or decreases as the inclination angle increases. The central difference method can be used to apply a small perturbation to each parameter (e.g., ±0.1° for inclination angle and ±0.1m for spacing), calculate the rate of change of the objective function, and approximate the partial derivatives of each parameter. These are then combined to form the gradient vector.
[0090] In this embodiment, the negative gradient direction refers to the direction in which the objective function value decreases most rapidly. Adjusting parameters along this direction can maximize the reduction of the objective function value, thereby increasing power generation while reducing costs and shadow losses. The negative gradient direction is the core optimization direction of the gradient descent method. Iteration termination conditions can include, for example, when the rate of change of the objective function at the current point reaches a preset threshold.
[0091] For example, the gradient vector of the objective function indicates the trend of the current parameters. A positive gradient means that increasing the parameter will increase the objective function, such as increasing the row spacing leading to an increase in cost. A negative gradient means that reducing the parameter will decrease the objective function, such as adjusting the inclination angle to the optimal angle to reduce shadow loss. Adjusting the parameters along the negative gradient direction can maximize the optimization of the overall performance in each iteration. After particle swarm optimization, the parameters are already in the optimal solution region. At this time, gradient descent can solve the high-precision optimization problem of continuous variables, such as adjusting the inclination angle from 25° to 24.6° to match the solar altitude angle.
[0092] This embodiment adjusts the weights for power generation, cost, and shadow loss to tailor optimization to different project requirements. For example, when distributed photovoltaics prioritize cost control, the weighting for cost is increased; when centralized power plants prioritize power generation, the weighting for power generation is increased, ensuring that the design achieves optimality under specific objectives. Although the gradient descent formula does not explicitly include constraints, the initial point, derived from a legal solution from particle swarm optimization, satisfies constraints such as terrain slope and no-go zones, and the small adjustment step size prevents parameter overruns.
[0093] This embodiment significantly reduces shadowing losses by fine-tuning parameters such as module inclination and row spacing along the negative gradient of the objective function, further increasing power generation and approaching the theoretical optimal solution. This embodiment leverages the high-quality initialization points of particle swarm optimization, eliminating the need for blind search and achieving convergence with only a few iterations. This improves computational efficiency and is suitable for rapid design in complex terrain.
[0094] Corresponding to a photovoltaic power generation array auxiliary design method of the above embodiment, Figure 2 This is a structural block diagram of a photovoltaic array auxiliary design system provided by an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 2 The photovoltaic array auxiliary design system 20 includes: a genetic module 21, a particle swarm optimization module 22, a gradient optimization module 23 and a design module 24.
[0095] The genetic module 21 is used to perform chromosome encoding on component models, array partitions, and scaffold types within the constraints of terrain partitions to generate an initial population; perform genetic operations on the initial population to obtain a target population, and use chromosomes in the target population with a fitness greater than a first threshold as a first solution set; A particle swarm optimization module 22 is configured to determine an initial particle swarm based on the first solution set, wherein particles in the initial particle swarm correspond one-to-one to chromosomes in the first solution set, and each particle includes a component inclination angle, a row spacing, and coordinates; Gradient optimization module 23 is used to iteratively update the initial particle swarm until the iterative convergence condition is met. The particle with the highest fitness in the iterative update process is used as the initial point. The initial point is iteratively updated based on the negative gradient direction of the objective function gradient until the iterative termination condition is met to obtain the target particle. The design module 24 is used to determine the photovoltaic power generation array based on the target particles.
[0096] In one embodiment of the present application, a method for determining terrain partition constraints includes: Based on the terrain data and prohibited areas of the target area, a clustering algorithm is used to divide the target area into multiple terrain zones; the terrain data of the target area includes slope and slope direction, and the prohibited areas are determined by obstacle data; The feasible solution boundaries of component models, array partitions and bracket types for each terrain partition are determined, and the feasible solution boundaries are used as terrain partition constraints.
[0097] In one embodiment of the present application, the genetic module 21 is specifically configured to calculate the fitness of all chromosomes in the initial population using a first fitness function; the chromosomes include a component model, an array partition, a scaffold type, and a check segment; The first fitness function is:
[0098] in, 、 、 and is the weight coefficient, , Chromosome The fitness value of Chromosome The corresponding simulated annual power generation is is the theoretical maximum power generation, Budget for the project, Chromosome The corresponding total cost, For construction regularity, Chromosome The corresponding violation coefficient of the i-th constraint, is the penalty weight of the i-th constraint, is the total number of constraints, is the maximum constraint violation value; Based on the fitness of all chromosomes, genetic operations are performed on the initial population to obtain the target population.
[0099] In one embodiment of the present application, the genetic module 21 is further configured to select chromosomes that meet the fitness condition from the initial population as the parent population; All chromosomes in the parent population are randomly segmented and crossovered based on the adaptive crossover probability to obtain the offspring population; the adaptive crossover probability is negatively correlated with the fitness of the chromosome; All chromosomes in the offspring population are segmentally mutated based on the terrain partitioning constraints to obtain the target population.
[0100] In one embodiment of the present application, the gradient optimization module 23 is specifically configured to calculate the fitness of all particles in the initial particle swarm using the second fitness function; The second fitness function is: ; in, is the fitness value of particle X, 、 、 and is the weight coefficient, , is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the theoretical maximum power generation, Budget for the project, is the shadow occlusion loss rate of particle X, is the constraint penalty of the j-th continuous variable corresponding to particle X, is the total number of continuous variables, is the maximum penalty value; The initial particle swarm is iteratively updated based on the fitness of all particles.
[0101] In one embodiment of the present application, the gradient optimization module 23 is further configured to iteratively update the initial particle swarm based on the fitness of all particles using a position update formula and a velocity update formula; The speed update formula is: ; in, is the adjustment speed of the k+1th generation of the mth particle in dimension d. The dimension corresponding to d=1 is the component inclination angle, the dimension corresponding to d=2 is the row spacing, and the dimension corresponding to d=3 is the coordinate. is the inertia weight, is the current velocity of the mth particle in dimension d, is the individual learning factor, and is a random number, is the historical optimal position of the mth particle in dimension d, is the current position of the mth particle in dimension d, is the social learning factor, is the optimal position of all particles in dimension d, is the gradient weight, is the gradient of the objective function at the current position; The position update formula is: ; in, is the position of the mth particle in the k+1th generation in dimension d.
[0102] In one embodiment of the present application, the gradient optimization module 23 is further configured to calculate the gradient vector of the objective function with respect to the initial point based on the central difference method; The objective function is: ; in, is the target score corresponding to particle X, is the power generation weight, b is the cost weight, c is the shadow loss weight, +b+c=1, is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the shadow occlusion loss rate of particle X, is the theoretical maximum power generation, budget for the project; Iteratively update the initial point along the negative direction of the gradient vector until the iteration termination condition is met and the target particle is obtained; The iteration termination condition is that the norm of the gradient vector of the updated particle is less than a second threshold; the second threshold is a preset positive number.
[0103] See also Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided in one embodiment of the present application. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned device embodiments, such as Figure 2 The functions of the genetic module 21, the particle swarm optimization module 22, the gradient optimization module 23 and the design module 24 are shown.
[0104] It should be understood that in the embodiment of the present application, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0105] The input device 302 may include a touchpad, a fingerprint collection sensor (for collecting user fingerprint information and fingerprint direction information), a microphone, etc. The output device 303 may include a display (LCD, etc.), a speaker, etc.
[0106] The memory 304 may include a read-only memory and a random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information such as component model, array partition, and rack type.
[0107] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiment of the present application can execute the implementation method described in an embodiment of a photovoltaic power generation array auxiliary design method provided in the embodiment of the present application, and can also execute the implementation method of the electronic device 300 described in the embodiment of the present application, which will not be repeated here.
[0108] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, all or part of the process of the method in the above embodiment is implemented. The computer program can also be used to instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above method embodiments are implemented. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0109] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the computer-readable storage medium can include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is about to be output.
[0110] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0111] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or can be an electrical, mechanical or other form of connection.
[0113] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0114] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0115] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A photovoltaic array auxiliary design method, characterized in that: include: Within the constraints of terrain partitioning, component models, array partitioning, and scaffold types are chromosomally encoded to generate an initial population; Performing a genetic operation on the initial population to obtain a target population, and taking chromosomes in the target population whose fitness is greater than a first threshold as a first solution set; Determine an initial particle swarm based on the first solution set, where particles in the initial particle swarm correspond one-to-one to chromosomes in the first solution set, and each particle includes a component inclination, a row spacing, and coordinates; Iteratively updating the initial particle swarm until an iterative convergence condition is satisfied, taking the particle with the highest fitness in the iterative updating process as the initial point, iteratively updating the initial point based on the negative gradient direction of the objective function gradient until an iterative termination condition is satisfied, thereby obtaining the target particle; A photovoltaic power generation array is determined based on the target particles.
2. A photovoltaic array auxiliary design method according to claim 1, characterized in that: The method for determining the terrain partition constraint includes: Based on the terrain data and prohibited areas of the target area, the target area is divided into a plurality of terrain subareas using a clustering algorithm; the terrain data of the target area includes slope and slope direction, and the prohibited areas are determined by obstacle data; A feasible solution boundary of the component model, the array partition and the bracket type of each terrain partition is determined, and the feasible solution boundary is used as a terrain partition constraint.
3. A photovoltaic array auxiliary design method according to claim 1, characterized in that: The performing of genetic operations on the initial population to obtain a target population includes: Calculating the fitness of all chromosomes in the initial population using a first fitness function; the chromosomes include component model, array partition, scaffold type and check segment; The first fitness function is: ; in, 、 、 and is the weight coefficient, , Chromosome The fitness value of Chromosome The corresponding simulated annual power generation is is the theoretical maximum power generation, Budget for the project, Chromosome The corresponding total cost, For construction regularity, Chromosome The corresponding violation coefficient of the i-th constraint, is the penalty weight of the i-th constraint, is the total number of constraints, is the maximum constraint violation value; Performing genetic operations on the initial population based on the fitness of all the chromosomes to obtain a target population.
4. A photovoltaic array auxiliary design method according to claim 3, characterized in that: The performing of genetic operations on the initial population based on the fitness of all chromosomes to obtain a target population includes: Selecting chromosomes that meet the fitness conditions from the initial population as the parent population; Performing random segmented crossover on all chromosomes in the parent population based on an adaptive crossover probability to obtain a progeny population; wherein the adaptive crossover probability is negatively correlated with the fitness of the chromosome; All chromosomes in the offspring population are subjected to segmental mutation based on the terrain partitioning constraint to obtain a target population.
5. The photovoltaic array auxiliary design method according to claim 1, wherein: The iterative updating of the initial particle swarm includes: Calculating the fitness of all particles in the initial particle swarm using a second fitness function; The second fitness function is: ; in, is the fitness value of particle X, 、 、 and is the weight coefficient, , is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the theoretical maximum power generation, Budget for the project, is the shadow occlusion loss rate of particle X, is the constraint penalty of the j-th continuous variable corresponding to particle X, is the total number of continuous variables, is the maximum penalty value; The initial particle group is iteratively updated based on the fitness of all particles.
6. A photovoltaic array auxiliary design method according to claim 5, characterized in that: The iterative updating of the initial particle swarm based on the fitness of all particles includes: Based on the fitness of all particles, the initial particle swarm is iteratively updated using a position update formula and a velocity update formula; The speed update formula is: ; in, is the adjustment speed of the k+1th generation of the mth particle in dimension d. The dimension corresponding to d=1 is the component inclination angle, the dimension corresponding to d=2 is the row spacing, and the dimension corresponding to d=3 is the coordinate. is the inertia weight, is the current velocity of the mth particle in dimension d, is the individual learning factor, and is a random number, is the historical optimal position of the mth particle in dimension d, is the current position of the mth particle in dimension d, is the social learning factor, is the optimal position of all particles in dimension d, is the gradient weight, is the gradient of the objective function at the current position; The position update formula is: ; in, is the position of the mth particle in the k+1th generation in dimension d.
7. A photovoltaic array auxiliary design method according to claim 1, characterized in that: The iterative updating of the initial point based on the negative gradient direction of the objective function gradient until an iteration termination condition is satisfied to obtain a target particle includes: Calculating the gradient vector of the objective function with respect to the initial point based on the central difference method; The objective function is: ; in, is the target score corresponding to particle X, is the power generation weight, b is the cost weight, c is the shadow loss weight, +b+c=1, is the simulated annual power generation corresponding to particle X, is the total cost corresponding to particle X, is the shadow occlusion loss rate of particle X, is the theoretical maximum power generation, budget for the project; Iteratively updating the initial point along the negative direction of the gradient vector until an iteration termination condition is met to obtain a target particle; The iteration termination condition is that the norm of the gradient vector of the updated particle is less than a second threshold; the second threshold is a preset positive number.
8. A photovoltaic array auxiliary design system, characterized in that: include: A genetic module is used to generate the initial population by encoding the component model, array partition and scaffold type on the chromosome within the constraints of the topographic partition; Performing a genetic operation on the initial population to obtain a target population, and taking chromosomes in the target population whose fitness is greater than a first threshold as a first solution set; a particle swarm optimization module, configured to determine an initial particle swarm based on the first solution set, wherein particles in the initial particle swarm correspond one-to-one to chromosomes in the first solution set, and each particle includes a component inclination angle, a row spacing, and coordinates; A gradient optimization module is used to iteratively update the initial particle swarm until the iterative convergence condition is met, taking the particle with the highest fitness in the iterative update process as the initial point, and iteratively update the initial point based on the negative gradient direction of the objective function gradient until the iterative termination condition is met to obtain the target particle; A design module is used to determine a photovoltaic power generation array based on the target particles.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Photovoltaic cell parameter identification method based on improved particle swarm algorithm
CN106202914A
Photovoltaic power generation layout optimization analysis method and system based on artificial intelligence
CN120012571A
Ai based techniques for photovoltaic interruption control in microgrids with energy storage systems
US20240119281A1