A photovoltaic power generation array auxiliary design method and system
By employing a multi-stage collaborative optimization approach combining genetic algorithms, particle swarm optimization, and gradient descent algorithms, the system addresses the multiple constraints in photovoltaic array design under complex terrain conditions, achieving efficient and precise photovoltaic array design and enhancing the scientific rigor and feasibility of the design scheme.
Patent Information
- Application Number
- CN202510710856.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Traditional photovoltaic array design methods struggle to comprehensively consider multiple factors such as environment and component selection under complex terrain conditions, leading to problems such as unreasonable array layout, severe shading, and high costs, thus failing to maximize power generation efficiency.
Genetic algorithms are used for chromosome encoding and global search to generate a highly fit first solution set. Particle swarm optimization and gradient descent algorithms are combined to perform multi-stage collaborative optimization, handling discrete and continuous variables, ensuring that the design scheme meets terrain constraints and optimizes component efficiency and cost.
It significantly improves the scientific nature and feasibility of photovoltaic power generation array design. Through a multi-stage optimization framework, it quickly converges to a local optimum, ensuring that the array layout achieves an optimal balance between power generation, cost, and shading loss, thus meeting the legality and feasibility requirements for engineering implementation.
Smart Images

Figure CN120493760B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of engineering design, and more particularly relates to a photovoltaic power generation array auxiliary design method and system. BACKGROUND
[0002] With the increasing demand for clean energy worldwide, photovoltaic power generation as an important renewable energy utilization method, how to efficiently design photovoltaic power generation arrays under complex terrain conditions has become a key problem to improve power generation efficiency and reduce costs. Traditional design methods rely heavily on engineers' experience, and it is difficult to comprehensively consider the coupling effects of multiple factors such as environment and component selection, resulting in unreasonable array layout, serious shadow blocking, high cost and other problems, and the maximum power generation benefit cannot be achieved.
[0003] Therefore, there is an urgent need for an efficient and accurate photovoltaic power generation array auxiliary design method to improve the scientificity and implementability of the design scheme and promote the high-quality development of the photovoltaic power generation industry. SUMMARY
[0004] The purpose of the present application is to provide a photovoltaic power generation array auxiliary design method and system to achieve efficient and accurate photovoltaic power generation array design and ensure the scientificity and implementability of the design scheme.
[0005] The first aspect of the embodiment of the present application provides a photovoltaic power generation array auxiliary design method, comprising:
[0006] Within the terrain partition constraint, the component model, array partition and support type are encoded by chromosomes to generate an initial population; genetic operations are performed on the initial population to obtain a target population, and chromosomes with fitness greater than a first threshold value in the target population are taken as a first solution set;
[0007] Based on the first solution set, an initial particle swarm is determined, and 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, an inter-row spacing and a coordinate;
[0008] The initial particle swarm is iteratively updated until the iteration convergence condition is met. The particle with the highest fitness in the iteration update process is taken as an initial point, and the initial point is iteratively updated based on the negative gradient direction of the target function gradient until the iteration termination condition is met, and a target particle is obtained;
[0009] Based on the target particle, a photovoltaic power generation array is determined.
[0010] The second aspect of the embodiment of the present application provides a photovoltaic power generation array auxiliary design system, comprising:
[0011] a genetic module, configured to perform chromosome coding on the component model, the array partition and the support type within the terrain partition constraint to generate an initial population, and perform genetic operation on the initial population to obtain a target population, and take a chromosome with an adaptability greater than a first threshold in the target population as a first solution set;
[0012] a particle swarm optimization module, configured to determine an initial particle swarm based on the first solution set, and each particle in the initial particle swarm corresponds to a chromosome in the first solution set, and each particle includes a component tilt angle, an inter-row spacing and a coordinate;
[0013] a gradient optimization module, configured to perform iterative updating on the initial particle swarm until an iterative convergence condition is met, take a particle with the highest adaptability in the iterative updating process as an initial point, perform iterative updating on the initial point based on a negative gradient direction of a gradient of the target function until an iterative termination condition is met, and obtain a target particle;
[0014] a design module, configured to determine the photovoltaic power generation array based on the target particle.
[0015] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the photovoltaic power generation array aided design method when running the computer program.
[0016] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the photovoltaic power generation array aided design method when executed by a processor.
[0017] The photovoltaic power generation array aided design method and system provided by the embodiments of the present application have the following advantages:
[0018] On the one hand, the embodiments of the present application adopt the genetic algorithm to perform chromosome coding and global search on discrete variables such as component model, array partition and support type, effectively solving the combination problem of discrete variables under multiple constraint conditions in complex terrain. The embodiments of the present application generate a first solution set with high adaptability through genetic operation driven by adaptability, ensuring that the basic framework of the design scheme not only meets the terrain constraint, but also takes into account the component efficiency and cost, significantly improving the early scheme screening efficiency.
[0019] On the other hand, the embodiment of the present application constructs an initial particle swarm based on a first solution set, iteratively updates continuous variables such as component inclination, row spacing, coordinates, etc. by using a particle swarm optimization algorithm, can quickly converge to a local optimal solution area, avoids the defect that a single algorithm falls into local optimum, and provides a high-quality initial point for subsequent fine optimization.
[0020] Finally, the optimal particle of the particle swarm optimization is taken as a starting point, fine adjustment is performed along the negative gradient direction of the target function by using a gradient descent algorithm, the accuracy of the continuous variables can be further improved, the optimal balance among power generation, cost, and shadow loss of the array layout is ensured, and the legality and feasibility of engineering implementation are met. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0022] Figure 1 A flowchart of a photovoltaic power generation array auxiliary design method provided by an embodiment of the present application is shown in the figure.
[0023] Figure 2 A structural block diagram of a photovoltaic power generation array auxiliary design system provided by an embodiment of the present application is shown in the figure.
[0024] Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0025] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also 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 unnecessary details that hinder the description of the present application.
[0026] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will be described by specific embodiments in conjunction with the drawings.
[0027] Reference Figure 1 , Figure 1 A flowchart of a photovoltaic power generation array auxiliary design method provided by an embodiment of the present application is shown in the figure. The method can be executed by an electronic device. Specifically, the method can include S101 to S104.
[0028] S101: Chromosome coding is performed on the component model, array partition, and support type within the terrain partition constraint to generate an initial population; genetic operations are performed on the initial population to obtain a target population, and chromosomes with fitness greater than a first threshold in the target population are taken as a first solution set.
[0029] In this embodiment, the terrain partition constraint refers to dividing the site into multiple functional partitions based on the terrain features and engineering restrictions of the photovoltaic site. Each partition corresponds to different design constraint parameters, such as slope constraint, forbidden construction constraint, and construction constraint, etc.
[0030] For example, the terrain features of the photovoltaic site can include slope, aspect, elevation, and ground cover type. The engineering restrictions can include forbidden construction area, cultural relic protection area, power access point, etc. The multiple functional partitions can include flat area, gentle slope area, steep slope area, and forbidden construction area, etc. The slope constraint can include that the flat area (slope less than or equal to 5°) allows the use of fixed support, the steep slope area (slope greater than or equal to 25°) requires the use of adjustable support, etc.; the forbidden construction constraint can include that the forbidden construction area has a component installation quantity of 0; the construction constraint can include that the gentle slope area (slope between 5°-15°) requires the component row and column spacing to be greater than or equal to 3m to avoid shadow shielding.
[0031] In this embodiment, chromosome coding refers to converting discrete design parameters such as component model, array partition, and support type into a chromosome structure that can be processed by genetic algorithm, which is essentially a symbolic expression of discrete variables. The typical coding method of chromosome coding is integer coding, that is, each gene position corresponds to a discrete design parameter:
[0032] For example, the component model: gene position 1, value [1, 2, 3] (corresponding to market mainstream component models A, B, G respectively); the array partition: gene position 2, value [1, 2, 3] (corresponding to site partition 1, partition 2, partition 3); the support type: gene position 3, value [1, 2] (corresponding to fixed support, adjustable support). The coding needs to satisfy the terrain partition constraint (such as partition 3 slope greater than or equal to 25°, gene position 3 can only take 2).
[0033] In this embodiment, the initial population is a set composed of multiple chromosomes generated randomly, such as a population size of 100, each chromosome in the initial population represents a candidate design scheme. The generation rules of the initial population include randomness, constraint, and diversity.
[0034] For example, the component model, partition, and support type are randomly combined within the legal range to obtain a chromosome, and then chromosomes that violate the terrain partition constraint are excluded. In addition, by controlling the distribution of the initial gene position, it is ensured that the initial population covers different design directions.
[0035] In this embodiment, genetic manipulation refers to the evolution of the initial population through selection, crossover, mutation, etc. The target population refers to the population after genetic manipulation, where the average fitness of the chromosomes is higher than that of the initial population, and the diversity is reduced, with the proportion of high-quality solutions increasing. The first threshold is a fitness threshold set according to engineering requirements, such as 1.2 times the average fitness of the target population, and the chromosomes with fitness higher than this value are selected as the first solution set for the initial input of the subsequent particle swarm optimization.
[0036] In this embodiment, the component model, array partition, and support type are discrete variables with limited values and no continuity, which cannot be directly processed by traditional gradient optimization methods. This embodiment uses the genetic algorithm encoding → selection → crossover → mutation population search mechanism to process discrete variables, which can efficiently explore the combination space of discrete variables and avoid falling into local optima.
[0037] In this embodiment, fitness is a quantitative indicator to measure the quality of chromosomes and evaluate the comprehensive performance of the design scheme under terrain constraints. The essence is to convert multi-objective optimization problems such as maximizing power generation, minimizing cost, terrain adaptability, and structural safety into a unified evaluation standard to select better design schemes in the genetic algorithm. The higher the fitness, the more the combination of component model, array partition, and support type conforms to the design goal, and the better it can be preserved and evolved in subsequent iterations.
[0038] In the initial population generation and genetic manipulation of this embodiment, all chromosomes must satisfy the terrain partition constraint to ensure the feasibility of the generated scheme. This constraint is achieved by limiting the value range of gene positions during encoding and constraint checking after genetic manipulation, avoiding invalid schemes entering the subsequent optimization process.
[0039] For example, this embodiment can divide functional partitions based on site DEM data and forbidden area vector maps, and define constraint parameters for each partition. This embodiment defines the chromosome structure as [component model, partition ID, support type]. According to the chromosome structure, N chromosomes are randomly generated, and individuals that violate the partition constraint are filtered to form the initial population.
[0040] This embodiment can calculate power generation, cost, etc. using simulation software and use the fitness function to calculate the fitness of each chromosome. This embodiment selects high-fitness individuals as parents, performs crossover and mutation, and generates a child population. This embodiment performs constraint checking on the children, repairs or discards illegal individuals. The chromosome structure is repeatedly manipulated until the population fitness converges, such as the optimal fitness changing by less than 5% for 10 consecutive generations. This embodiment sets the first threshold as 80% of the optimal fitness of the target population, and selects chromosomes with fitness higher than the threshold as the first solution set, which is the initial input for the subsequent particle swarm optimization.
[0041] In the embodiment, the determination manner of the terrain partition constraint comprises:
[0042] Based on the terrain data of the target region and the forbidden area, the target region is divided into multiple terrain partitions by using a clustering algorithm; the terrain data of the target region comprises a slope and a slope direction, and the forbidden area is determined by obstacle data;
[0043] A feasible solution boundary of a component model, an array partition and a support type of each terrain partition is determined, and the feasible solution boundary is taken as the terrain partition constraint.
[0044] In the embodiment, the forbidden area is an area in which photovoltaic components are prohibited or limited to be installed, and is determined by obstacle data such as buildings, vegetation, ecological protection areas and power transmission line corridors. The obstacle data can include parameters such as vector coordinates, area, obstacle type and constraint parameters. The feasible solution boundary refers to a legal value range of the component model, the array partition and the support type in each terrain partition.
[0045] For example, the component model boundary refers to the allowed component size determined according to the partition slope, such as disabling large-size components in steep slope areas to avoid wind load over-limit; the array partition boundary refers to the maximum / minimum land area of a single array determined according to the partition area and the forbidden area distribution; and the support type boundary refers to the partition slope range.
[0046] In the embodiment, the terrain slope and slope direction directly affect the light receiving efficiency of the component and the mechanical performance of the support. By using the clustering algorithm to group regions with similar terrain features, unified design parameters in the same partition, differentiated design of different partitions and reduced design complexity can be achieved.
[0047] In the embodiment, the forbidden area is determined by obstacle data, and the essence is a bottom-line constraint of engineering feasibility. For example, components are prohibited to be installed in ecological protection areas, and the height of components is limited near power transmission line corridors to avoid electromagnetic interference. Embedding the forbidden area into the terrain partition can exclude unfeasible areas in advance and reduce invalid calculations in subsequent optimization.
[0048] In the embodiment, the feasible solution boundary of each terrain partition needs to be strongly associated with the terrain features. For example, large-size components and fixed supports are allowed to be used in flat slope areas, which is low in cost and convenient to install; only small-size components and adjustable supports are allowed to be used in steep slope areas, which reduces wind load and improves power generation efficiency; the inclination angle of the component is limited in the shady slope area to avoid radiation loss caused by mismatching with the solar elevation angle.
[0049] The embodiment is based on clustering algorithm to divide functional partitions, so that component models, support types and terrain features such as slope and aspect can be accurately matched, and the power generation efficiency can be improved. The embodiment embeds the forbidden area and the feasible solution boundary into the design process, which can improve the engineering feasibility. The genetic algorithm of the embodiment can process discrete variables such as component models, cover all legal combinations, avoid local optimization, and provide a high-quality starting point for subsequent optimization.
[0050] S102: Determine an initial particle swarm based on the first solution set, the particles in the initial particle swarm correspond to the chromosomes in the first solution set one by one, and each particle includes a component inclination angle, a row spacing and a coordinate.
[0051] In the embodiment, each chromosome in the first solution set corresponds to a set of component models, array partitions and support types, and has met the terrain partition constraint. The initial particle swarm is obtained by mapping each chromosome in the first solution set. The component inclination angle refers to the angle between the surface of the component and the horizontal plane, which affects the solar radiation receiving efficiency and is constrained by the partition slope; the row spacing refers to the horizontal distance between adjacent component rows, which needs to meet the shadow blocking constraint; and the coordinate refers to the planar position of the component in the partition, which needs to avoid the forbidden area and meet the construction rules.
[0052] In the embodiment, each chromosome uniquely corresponds to a particle, and the particle inherits the discrete parameters of the chromosome, such as partition ID and support type, and optimizes the continuous parameters based on this. For example, if the chromosome corresponds to partition 2: gentle slope area with a slope of 10°, the initial value of the inclination angle of the particle can be set to 20° according to the empirical value of the optimal inclination angle of the partition, the initial value of the row spacing needs to meet the minimum spacing constraint and can be set to 3.5m, etc.
[0053] The embodiment uses genetic algorithm to process discrete variables, and 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 searches in the feasible region of continuous variables to improve the power generation efficiency. 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 have met the terrain constraint, and PSO only needs to search in the feasible region of continuous variables. The high fitness of the first solution set makes the initial particles located in the region of optimal solutions, and PSO does not need to start from random solutions, which can improve the convergence speed.
[0054] For example, the 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 features, the forbidden area distribution and the construction constraints corresponding to the array partition, and the structure form and material parameters corresponding to the support type, to provide a discrete framework for the initialization of continuous parameters.
[0055] The embodiment can set the initial value of the inclination angle of the component according to the zoning gradient, for example, the local latitude ±10° for the flat area, the gradient +10° for the gentle slope area, the gradient +5° for the steep slope area, and the upper limit 45°, etc. The embodiment can calculate the minimum distance based on the winter solstice day without shadow blocking, add a 0.5-meter buffer, and balance the power generation efficiency and land utilization rate. The embodiment can generate the component coordinates in the non-prohibited area according to the row and column alignment in a random manner, arrange the components along the contour lines in the transverse direction, and ensure the construction feasibility by keeping a distance greater than 5 meters from the boundary of the prohibited area.
[0056] The embodiment can perform constraint checking on the initial parameters, and correct the out-of-limit values according to the boundary. For example, if the inclination angle exceeds the gradient, the inclination angle is set to the boundary value, the row spacing exceeds the limit value, the extreme value is taken, and the coordinates fall into the prohibited area, the coordinates are translated to the legal area, and it is ensured that all particle parameters meet the engineering specifications.
[0057] The embodiment can combine the decoded discrete parameters and the checked continuous parameters to form a particle group corresponding to the first solution set. Each particle represents an independent design scheme and carries differentiated discrete parameters, providing a diversified and high-quality starting point for subsequent particle swarm optimization, bridging global optimization of discrete variables and local fine adjustment of continuous variables, and improving the overall design efficiency and feasibility.
[0058] S103: iteratively updating the initial particle group until the iteration convergence condition is met, taking the particle with the highest fitness in the iteration update process as the initial point, iteratively updating the initial point based on the negative gradient direction of the gradient of the objective function, until the iteration termination condition is met, and obtaining the target particle.
[0059] In the embodiment, the iteration convergence condition can include at least one of the change rate of the fitness of the continuous e-generation global optimal position being less than a preset threshold, the norm of the velocity vector of all particles being less than a preset threshold, and the preset iteration number reaching an upper limit. The negative gradient direction of the gradient of the objective function refers to the steepest descent direction of the objective function at the current point, which is used for gradient descent algorithm to finely adjust the continuous variable. The objective function can be a comprehensive function of maximizing power generation, minimizing cost, and minimizing shadow loss.
[0060] In the embodiment, the iteration termination condition refers to the basis for stopping the iteration. The iteration termination condition can include at least one of the modulus of the gradient vector being less than a preset threshold, the difference value of the objective function between two consecutive iterations being less than a preset threshold, and the preset iteration number being reached.
[0061] Exemplarily, each particle of the embodiment carries continuous parameters such as component inclination angle, row spacing, coordinates, and discrete parameters such as component model, partition, and support type determined by the genetic algorithm. The initial position of each particle can be set based on the terrain partition characteristics and engineering experience. The embodiment simulates the foraging behavior of a bird flock, and the particles move in the solution space, both referring to their own historical optimal positions, such as the high-power inclination angle found, and learning from the global optimal position of the group, such as the row spacing scheme with the best comprehensive performance among all particles. The moving step is dynamically adjusted, and in the early stage, a large range of search is performed to search for efficient parameter combinations in different terrain partitions, and in the later stage, the step is reduced to focus on high-quality areas. When the comprehensive performance of the global optimal scheme changes for multiple generations and is less than a preset threshold, or the particle moving speed is less than a threshold, the PSO is stopped, and the global optimal particle is extracted as the fine-tuning starting point.
[0062] The embodiment can integrate the maximization of power generation, the minimization of cost, and the minimization of shadow loss into a unified objective function, calculate the influence of each parameter at the current position on the objective function through a small perturbation method, and determine the steepest optimization direction, such as the direction in which the inclination angle is reduced to improve the power generation. The embodiment starts from the optimal position obtained by the PSO and moves in the direction in which the objective function value decreases most quickly, such as adjusting the inclination angle by 0.05° and the spacing by 0.02 m each time. When the influence of parameter adjustment on the objective function is less than a preset threshold, or a preset number of iterations is reached, the adjustment is stopped, and the final parameters are output as the target particle.
[0063] S104: Determine the photovoltaic power generation array based on the target particle.
[0064] In the embodiment, the target particle is the optimal solution obtained after three-stage optimization of the genetic algorithm, the particle swarm optimization, and the gradient descent, and essentially is a digital scheme containing complete design parameters, which can specifically include: discrete parameters: component model (such as a 540W monocrystalline silicon component), array partition ID (such as a partition 2 corresponding to a gentle slope sunny area), and support type (such as an adjustable aluminum alloy support); continuous parameters: component inclination angle (such as 23.5°), row spacing (3.8 m), and coordinates of each component (such as coordinates (100, 200) in partition 2); and constraint parameters: satisfying the terrain slope (the inclination angle is less than the partition slope + 5°), avoiding the prohibited area (the coordinates are more than 50 m away from the boundary of the protected area), and electrical rules (the component model in the same string is consistent).
[0065] The photovoltaic power generation array refers to a collection of components, supports, and electrical systems installed in a physical site based on the target particle parameters, and needs to achieve the maximization of power generation efficiency, the minimization of construction cost, and the facilitation of operation and maintenance.
[0066] Exemplarily, the embodiment can extract the partition information, the device parameter and the geometric parameter from the target particle, such as the steep slope shadow area, the partition constraint is the slope of 28°, the forbidden area is located on the west side; the component model is the size of 1.8m*1.1m, the support type is the adjustable support with the lowest 1.2m and the highest 1.8m; the component inclination is 23°, and the row spacing is 3.8m.
[0067] The embodiment can arrange the component rows along the contour direction, each row contains 20 components, and is determined according to the partition area and the forbidden area position; the row spacing is strictly 3.8m of the target particle, the column spacing is set to 0.5m; and the component coordinates are distributed according to the row and column alignment and the forbidden area buffer principle.
[0068] From the above, the embodiment forms a multi-stage collaborative optimization framework by fusing the genetic algorithm, the particle swarm optimization (PSO) and the gradient descent algorithm, and achieves the following remarkable beneficial effects in the photovoltaic power generation array design:
[0069] On the one hand, the embodiment adopts the genetic algorithm to perform chromosome coding and global search on the discrete variables such as the component model, the array partition and the support type, effectively solves the combination problem of the discrete variables under the multi-constraint condition of the complex terrain, generates the first solution set with high adaptability through the genetic operation driven by the fitness, ensures that the basic framework of the design scheme meets the terrain constraints, and takes into account the component efficiency and the cost, and significantly improves the early scheme screening efficiency.
[0070] On the other hand, the embodiment constructs the initial particle swarm based on the first solution set, iteratively updates the continuous variables such as the component inclination, the row spacing and the coordinates by using the particle swarm optimization algorithm, can quickly converge to the local optimal solution region, avoids the defect that a single algorithm falls into the local optimum, and provides a high-quality initial point for subsequent fine optimization.
[0071] Finally, the embodiment takes the optimal particle of the particle swarm optimization as the starting point, and performs fine adjustment along the negative gradient direction of the target function through the gradient descent algorithm, can further improve the precision of the continuous variables, ensures that the array layout reaches the optimal balance among the power generation, the cost and the shadow loss, and meets the legality and feasibility of the engineering implementation.
[0072] In an embodiment of the present application, the initial population is subjected to genetic operation to obtain a target population, including:
[0073] The fitness of all chromosomes in the initial population is calculated by using a first fitness function; the chromosomes include the component model, the array partition, the support type and the check segment;
[0074] The first fitness function is:
[0075] ;
[0076] wherein, , , and are weight coefficients, , is a fitness value of a chromosome , is a corresponding simulated annual power generation of a chromosome , is a theoretical maximum power generation, is a project budget, is a corresponding total cost of a chromosome , is a construction rule degree, is a corresponding violation coefficient of the ith constraint of a chromosome , is a penalty weight of the ith constraint, is a total number of constraints, is a maximum constraint violation value;
[0077] Genetically operate the initial population based on the fitness of all chromosomes to obtain a target population.
[0078] In the embodiment, , and are dimensionless and range from (0, 1). The maximum constraint violation value refers to a total sum when all constraints are violated, and introducing can make the range of shrink to (0, 1).
[0079] In the embodiment, the initial population is genetically operated based on the fitness of all chromosomes to obtain a target population, specifically including:
[0080] Select chromosomes that meet the fitness condition from the initial population as a parent population;
[0081] Randomly segmentally cross all chromosomes in the parent population based on an adaptive crossover probability to obtain a child population; the adaptive crossover probability is negatively correlated with the fitness of the chromosomes;
[0082] Segmentally mutate all chromosomes in the child population based on a terrain partition constraint to obtain the target population.
[0083] In the embodiment, the first fitness function is a quantitative index for measuring the advantages and disadvantages of chromosomes, and comprehensively considers power generation efficiency, cost control, construction feasibility and constraint violation penalty to provide a screening basis for genetic operation.
[0084] wherein, For power generation efficiency, For cost control. For construction regularity, used to measure the alignment of the component rows and columns, such as the standard deviation of the row and column spacing is less than 0.2m, take 1, otherwise linearly decrease with deviation. For constraint penalty, Constraint violation coefficient, such as the overlap rate of the forbidden area is greater than 5%, take 1, otherwise take 0.
[0085] In this embodiment, the adaptive crossover probability refers to the dynamic adjustment of the crossover probability with the fitness of the chromosome. The higher the fitness of the chromosome, the lower the corresponding crossover probability.
[0086] In this embodiment, the chromosome structure includes component model, array partition, support type and verification segment, wherein the component model represents different types of photovoltaic components. The array partition corresponds to different terrain areas divided by the site, and each area has specific design restrictions. The support type can include: 1 represents fixed support, 2 represents adjustable support. The verification segment is used to record whether the scheme conforms to the terrain constraints, such as 0 represents legal, 1 represents violation of slope or forbidden area constraints, used for subsequent screening and repair.
[0087] In this embodiment, the parent population is selected from the initial scheme, and better offspring schemes can be generated by crossover and mutation. The offspring population is a new generation of scheme population generated by the crossover and mutation of the parent scheme, which inherits the parent quality genes and introduces new parameter combinations, and the overall performance is theoretically better than the initial population.
[0088] This embodiment converts the four core targets of power generation, cost, construction and constraint into unified scores, avoiding the one-sidedness of single index optimization. This embodiment divides the chromosome into three paragraphs of component model, array partition and support type, and only exchanges genes within the same paragraph during crossover, such as exchanging within the component model paragraph, to avoid confusion between partition and support type, and to ensure the relevance of design parameters.
[0089] For example, for each scheme of the initial population, the annual power generation is simulated using relevant software, and the total cost is calculated by combining component, support and construction cost, to obtain the power generation efficiency index and the cost control index. According to the component arrangement data of the scheme, such as the row and column spacing and the alignment degree, the construction regularity is calculated. Check whether the scheme violates the terrain constraints, such as whether to install in the forbidden area and whether the support type matches the slope, and generate the constraint penalty score, which is 0 without violation, and is deducted according to the severity of the violation. According to the above data, the fitness of each scheme is calculated according to the first fitness function, and the scores are sorted from high to low.
[0090] The embodiment can retain high fitness individuals in the initial population as the parent population based on the fitness of the chromosome, using roulette or elite reservation strategy. For example, 20% of the high score schemes are directly retained, and the remaining 80% are randomly selected by roulette to ensure that high-quality schemes are given priority and the population is diverse.
[0091] For each parent scheme in the parent population, the embodiment automatically adjusts the crossover probability according to its fitness. The embodiment divides the parent scheme into three segments according to the component model, array partition, and support type, and after randomly selecting parent pairs, only exchanges genes within the same segment, such as exchanging array partition segments of two parents to generate a new partition combination, ensuring that the partition and support type are reasonably associated.
[0092] The embodiment can apply specific mutation rules to each child scheme gene segment, such as:
[0093] Component segment: when the scheme in the steep slope area is mutated, only small-size components are allowed to avoid the risk of wind load on large components in steep slopes;
[0094] Support segment: when the scheme in the flat slope area is mutated, 90% of the fixed support is retained, and only 10% of the adjustable support is changed.
[0095] Constraint verification and repair: after mutation, check the verification segment, if the scheme violates the terrain constraint, automatically repair or mark as invalid scheme and eliminate.
[0096] For example, the embodiment randomly selects two parent chromosomes, exchanges partition ID or support type, and generates new children; with a 5% probability, randomly mutate component model 1 to 3, etc.
[0097] The embodiment integrates the multi-dimensional goals of power generation, cost, construction, and constraints through the fitness function to balance the efficient power generation, controllable cost, and compliant construction, avoiding the defects of single index optimization. The embodiment embeds terrain constraints into gene encoding and mutation rules, reduces illegal scheme generation, improves scheme implementability, and reduces the risk of rework caused by design violations. The adaptive crossover combined with the elite reservation strategy of the embodiment protects high-quality designs and explores new combinations, significantly improving the overall fitness and convergence efficiency of the population. The directional mutation adjustment for different terrain partitions retains efficient designs that meet engineering reality, reduces manual intervention, and lays the foundation for subsequent optimization.
[0098] In an embodiment of the present application, the initial particle swarm is iteratively updated, including:
[0099] The fitness of all particles in the initial particle swarm is calculated using a second fitness function.
[0100] The second fitness function is:
[0101] ;
[0102] wherein, is the fitness value of particle X, , , and is a 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, is the project budget, is the shadow blocking loss rate corresponding to particle X, is the constraint penalty of the jth continuous variable corresponding to particle X, is the total number of continuous variables, is the maximum penalty value;
[0103] The initial particle swarm is iteratively updated based on the fitness of all particles.
[0104] In this embodiment, is dimensionless and ranges from (0, 1). The range of can be reduced to (0, 1).
[0105] In this embodiment, the initial particle swarm is iteratively updated based on the fitness of all particles, specifically including:
[0106] The initial particle swarm is iteratively updated based on the fitness of all particles using a position update formula and a velocity update formula;
[0107] The velocity update formula is:
[0108] ;
[0109] wherein, is the adjustment velocity of the k+1 generation of the mth particle in the dimension d, d=1 corresponds to the dimension of the component inclination angle, d=2 corresponds to the dimension of the row spacing, d=3 corresponds to the dimension of the coordinates, is the inertia weight, is the current velocity of the mth particle in the dimension d, is the individual learning factor, and are random numbers, is the historical optimal position of the mth particle in the dimension d of the mth particle in the dimension d, is the current position of the mth particle in the dimension d of the mth particle in the dimension d, is the social learning factor, is the optimal position of the mth particle in dimension d, is the gradient weight, is the gradient of the objective function at the current position;
[0110] The position update formula is:
[0111]
[0112] wherein, is the position of the mth particle in dimension d at the k+1 generation.
[0113] In the embodiment, the second fitness function is a comprehensive evaluation index for measuring the pros and cons of the particles, which comprehensively evaluates the power generation efficiency, cost, shadow loss and constraint penalty, and provides a quantitative basis for particle swarm optimization. The higher the value calculated by the second fitness function, the better the comprehensive performance of the corresponding photovoltaic array design scheme on the continuous parameters such as inclination, spacing and coordinates.
[0114] The second fitness function includes annual power generation , total cost , shadow loss rate and continuous variable constraint penalty . Among them, the annual power generation under different inclination and layout can be simulated by professional software to obtain , the annual power generation is significantly affected by the component inclination angle and row spacing, for example, when the inclination angle is reasonable, the sunlight directly strikes the surface of the component, and the power generation efficiency is higher. The total cost can include component procurement, support installation, land leveling and electrical connection costs, and the row spacing is too large to increase the land occupation cost, and too small will increase the later operation and maintenance cost due to shadow blocking. The shadow loss rate is used to evaluate the proportion of the rear row components covered by the front row shadow at the solstice day feature period, the higher the loss rate, the more obvious the power generation efficiency decreases. The continuous variable constraint penalty is for the component inclination exceeding the terrain slope limit, the row spacing being less than the minimum shadow-free spacing, the coordinates falling into the forbidden area and other violations, and the penalty is deducted according to the severity.
[0115] In this embodiment, the speed update refers to determining the adjustment direction and amplitude of the particle on the tilt angle, row spacing, and coordinates. The speed update rule mainly integrates four aspects of information: (1) historical movement inertia: the particle tends to maintain the original movement trend and avoid frequent mutations, such as moving in the direction of increasing tilt angle last time, and possibly continuing to adjust in that direction this time. (2) own 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, such as the highest power generation when the tilt angle is 25° and the row spacing is 3.8m, and will preferentially move towards this parameter. (3) global optimal experience of the group (i.e. the global optimal position of the particle group): the particle learns from the best parameter combination among all particles, such as the global optimal row spacing of 3.5m, and other particles will gather around this value. (4) power generation efficiency gradient: adjust the direction according to the sensitivity of power generation to parameter changes, such as an increase of 0.8% in power generation per 1° increase in tilt angle, and preferentially move in the direction of increasing tilt angle.
[0116] Position update refers to adjusting the continuous parameter values of the particle according to the speed update results, such as adjusting the component tilt angle from 24° to 24.5° and the row spacing from 3.6m to 3.7m, to ensure that each iteration evolves towards a better solution.
[0117] For example, this embodiment can obtain the component model, partition type, and support type from the first solution set screened by the genetic algorithm to determine the parameter constraints of the partition. This embodiment sets the initial angle of the component tilt angle according to 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-forbidden area of the partition, ensuring a distance of at least 5 meters from the forbidden area boundary and alignment of rows and columns for easy construction.
[0118] For each particle, this embodiment can calculate the annual power generation and shadow loss rate using simulation software, combine the cost data and constraint check results, and calculate the comprehensive fitness score using the second fitness function.
[0119] During the iterative update process, this embodiment can compare the current solution of the particle with the historical best solution, and if it is better, update the individual best parameters; and select the solution with the highest comprehensive score among all particles as the global best parameters.
[0120] This embodiment can determine the adjustment amplitude (i.e. speed) of each parameter according to the historical movement inertia, own best experience, global best experience, and sensitive direction of power generation efficiency, such as approaching the global optimal tilt angle by 0.5° and increasing the spacing by 0.2m according to the sensitivity of shadow loss; this embodiment can modify the parameter values (i.e. position) according to the adjusted amplitude, and if it exceeds the constraint range, it will be corrected to the boundary value.
[0121] When the change of the comprehensive score of the global optimal solution reaches a preset threshold value for 10 consecutive generations, or the number of iterations reaches a preset upper limit of iterations, the updating can be stopped.
[0122] The embodiment can significantly reduce shadow loss and improve power generation efficiency by precisely adjusting parameters such as component inclination and spacing through the particle swarm optimization algorithm, is closer to the actual optimal solution than traditional methods, and has reduced iteration times and reduced calculation time. The embodiment ensures that the parameters always meet the engineering requirements such as terrain slope and prohibited area through constraint punishment and automatic correction, greatly improves the compliance rate of the scheme, and enhances the implementation feasibility. The fitness function weight of the embodiment can be dynamically adjusted to adapt to different project requirements, so that the scheme achieves an ideal balance among power generation efficiency, cost, and construction convenience, and improves the design practicability and economy.
[0123] In an embodiment of the present application, the initial point is iteratively updated based on the negative gradient direction of the gradient of the objective function until the iteration termination condition is met, and the target particle is obtained, comprising:
[0124] The gradient vector of the objective function on the initial point is calculated based on the central difference method;
[0125] The objective function is:
[0126] ;
[0127] Wherein, is the target score corresponding to the particle X, is the power generation weight, b is the cost weight, and c is the shadow loss weight, +b+c=1, is the simulated annual power generation corresponding to the particle X, is the total cost corresponding to the particle X, is the shadow blocking loss rate corresponding to the particle X, is the theoretical maximum power generation, is the project budget;
[0128] The initial point is iteratively updated in the negative direction of the gradient vector until the iteration termination condition is met, and the target particle is obtained;
[0129] The iteration termination condition is that the norm of the gradient vector of the updated particle is less than a second threshold value; the second threshold value is a preset positive number.
[0130] In the embodiment, the objective function is a quantitative index for measuring the comprehensive performance of the particle, and provides an optimization direction for gradient descent by comprehensively considering power generation, cost, and shadow blocking loss. The lower the value calculated by the objective function, the better the comprehensive performance of the corresponding particle scheme in terms of high power generation, low cost, and low shadow loss.
[0131] In the embodiment, the gradient vector is the rate of change of the objective function at the current parameter point, indicating the degree and direction of the influence of each parameter on the objective function, such as whether the objective function rises or falls when the inclination angle increases. The central difference method can be used to calculate the rate of change of the objective function by applying a small perturbation (such as ±0.1° for the inclination angle and ±0.1m for the spacing) to each parameter, to approximately obtain the partial derivative of each parameter, and to combine to form the gradient vector.
[0132] In the embodiment, the negative gradient direction refers to the direction in which the objective function value decreases most quickly, and adjusting the parameters along this direction can most significantly reduce the objective function value, i.e., improve the power generation, reduce the cost and shadow loss. The negative gradient direction is the core optimization direction of the gradient descent method. The iteration termination condition can include that the rate of change of the objective function at the current point reaches a preset threshold, etc.
[0133] For example, the gradient vector of the objective function indicates the good or bad trend of the current parameters, a positive gradient indicates that increasing the parameter will cause the objective function to rise, such as an increase in the row spacing causing an increase in the cost, and a negative gradient indicates that reducing the parameter will cause the objective function to fall, such as adjusting the inclination angle to the optimal angle to reduce the shadow loss. Adjusting the parameters along the negative gradient direction can most significantly optimize the overall performance in each iteration. After particle swarm optimization, the parameters are in a relatively optimal solution region, and at this time, the 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 elevation angle.
[0134] The embodiment can customize the optimization direction according to different project requirements by adjusting the weights of the power generation, the cost and the shadow loss, such as increasing the cost weight when the distributed photovoltaic system focuses on cost control, and increasing the power generation weight when the centralized power station focuses on power generation, to ensure that the design scheme is optimal under a specific target. Although the gradient descent formula does not explicitly include constraints, the initial point from the legal solution of the particle swarm optimization satisfies the constraints such as the terrain slope and the forbidden area, and the adjustment step is small, which can avoid parameter over-limiting.
[0135] The embodiment can significantly reduce the shadow blocking loss by finely adjusting the component inclination angle, row spacing and other parameters along the negative gradient direction of the objective function, and further improve the power generation, approaching the theoretical optimal solution. The embodiment relies on the high-quality initial point of the particle swarm optimization, and the gradient descent does not need to blindly search, but only needs a small number of iterations to converge, improving the calculation efficiency and being suitable for rapid design of complex terrains.
[0136] A photovoltaic power generation array auxiliary design method corresponding to the above embodiment, Figure 2 A structural block diagram of a photovoltaic power generation array auxiliary design system provided by an embodiment of the present application is shown. For ease of illustration, only parts related to the embodiments of the present application are shown. For details, refer to Figure 2The photovoltaic power generation array auxiliary design system 20 comprises a genetic module 21, a particle swarm optimization module 22, a gradient optimization module 23 and a design module 24.
[0137] The genetic module 21 is configured to encode the component model, the array partition and the support type as chromosomes within the terrain partition constraint to generate an initial population, and perform genetic operations on the initial population to obtain a target population, and the chromosomes with the fitness greater than a first threshold in the target population are taken as a first solution set.
[0138] The particle swarm optimization module 22 is configured to determine an initial particle swarm based on the first solution set, the particles in the initial particle swarm correspond to the chromosomes in the first solution set one by one, and each particle comprises a component inclination, an inter-row spacing and a coordinate.
[0139] The gradient optimization module 23 is configured to perform iterative updating on the initial particle swarm until an iterative convergence condition is met, take a particle with the highest fitness in the iterative updating process as an initial point, perform iterative updating on the initial point based on a negative gradient direction of a target function gradient until an iterative termination condition is met, and obtain a target particle.
[0140] The design module 24 is configured to determine the photovoltaic power generation array based on the target particle.
[0141] In an embodiment of the present application, the determination manner of the terrain partition constraint comprises:
[0142] The target region is divided into a plurality of terrain partitions by using a clustering algorithm based on terrain data and a forbidden area of the target region; the terrain data of the target region comprises a slope and a slope direction, and the forbidden area is determined by obstacle data;
[0143] The feasible solution boundary of the component model, the array partition and the support type of each terrain partition is determined, and the feasible solution boundary is taken as the terrain partition constraint.
[0144] In an embodiment of the present application, the genetic module 21 is specifically configured to calculate the fitness of all chromosomes in the initial population by using a first fitness function; the chromosome comprises a component model, an array partition, a support type and a check segment.
[0145] The first fitness function is:
[0146]
[0147] wherein, , , and are weight coefficients, , is the fitness value of the chromosome , is the fitness value of the chromosome corresponding annual energy production, theoretical maximum energy production, project budget, chromosome corresponding total cost, construction rule degree, chromosome corresponding violation coefficient of the ith constraint, penalty weight of the ith constraint, total number of constraints, maximum constraint violation value;
[0148] Genetically operate the initial population based on the fitness of all chromosomes to obtain a target population.
[0149] In an embodiment of the present application, the genetic module 21 is specifically configured to select chromosomes satisfying the fitness condition from the initial population as a parent population;
[0150] Randomly segmentally cross all chromosomes in the parent population based on an adaptive crossover probability to obtain an offspring population; the adaptive crossover probability is negatively correlated with the fitness of the chromosomes;
[0151] Segmentally mutate all chromosomes in the offspring population based on a terrain partition constraint to obtain the target population.
[0152] In an 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 by using a second fitness function;
[0153] The second fitness function is:
[0154] ;
[0155] wherein, fitness value of the particle X, , , and weight coefficient, , corresponding annual energy production of the particle X, total cost corresponding to the particle X, theoretical maximum energy production, project budget, shadow blocking loss rate corresponding to the particle X, constraint penalty of the jth continuous variable corresponding to the particle X, total number of continuous variables, maximum penalty value;
[0156] updating the initial swarm of particles iteratively based on the fitness of all particles.
[0157] In an embodiment of the present application, the gradient optimization module 23 is further configured to update the initial swarm of particles iteratively based on the fitness of all particles, using a position update formula and a velocity update formula.
[0158] The velocity update formula is:
[0159] ;
[0160] wherein, is the adjusted velocity of the mth particle in dimension d in the k+1 generation, d=1 corresponds to the dimension of the component tilt angle, d=2 corresponds to the dimension of the row spacing, d=3 corresponds to the dimension of the coordinates, 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.
[0161] The position update formula is:
[0162] ;
[0163] wherein, is the position of the mth particle in dimension d in the k+1 generation.
[0164] In an 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.
[0165] The objective function is:
[0166] ;
[0167] wherein, is the target score corresponding to the particle X, is the power generation weight, b is the cost weight, and c is the shadow loss weight, +b+c=1, The simulated annual power generation for particle X. Let X be the total cost corresponding to particle X. Let X be the shadow occlusion loss rate corresponding to particle X. This is the theoretical maximum power generation. For project budget;
[0168] The initial point is iteratively updated along the negative direction of the gradient vector until the iteration termination condition is met, thus obtaining the target particle.
[0169] The iteration terminates when the norm of the updated particle's gradient vector is less than a second threshold; the second threshold is a preset positive number.
[0170] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment 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 memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The functions of the genetic module 21, particle swarm optimization module 22, gradient optimization module 23, and design module 24 are shown.
[0171] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), 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.
[0172] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0173] The memory 304 can include read-only memory and random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 can also include non-volatile random access memory. For example, the memory 304 can also store information such as component model, array partition, and support type.
[0174] In specific implementations, the processor 301, the input device 302, and the output device 303 described in the embodiments of the present application can perform the implementation described in the embodiments of the photovoltaic power generation array auxiliary design method provided by the embodiments of the present application, and can also perform the implementation of the electronic device 300 described in the embodiments of the present application, which will not be described here.
[0175] In another embodiment of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program includes program instructions, and the program instructions are executed by a processor to implement all or part of the processes of the above-mentioned embodiments. The computer program can also be used to instruct related hardware to complete, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, 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, etc.
[0176] The computer readable storage medium can be an internal storage unit of the electronic device of any of the above-mentioned embodiments, such as a hard disk or a 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 card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the electronic device. The computer readable storage medium is used to store the computer program 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 will be output.
[0177] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0178] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device and the unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0179] In several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces or units, and can also be electrical, mechanical or other forms of connection.
[0180] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0181] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software functional unit.
[0182] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of photovoltaic power array aided design, characterized in that, The method comprises the following steps: chromosome coding of component model, array partition and support type within terrain partition constraint to generate an initial population; genetic operation on the initial population to obtain a target population, and taking chromosomes with fitness greater than a first threshold value in the target population as a first solution set; determining an initial particle swarm based on the first solution set, particles in the initial particle swarm corresponding to chromosomes in the first solution set one by one, and each particle comprising a component tilt angle, an inter-row spacing and a coordinate; iterative updating of the initial particle swarm until an iterative convergence condition is met, taking a particle with the highest fitness in the iterative updating process as an initial point, and iteratively updating the initial point based on a negative gradient direction of a gradient of a target function until an iterative termination condition is met to obtain a target particle; determining a photovoltaic power generation array based on the target particle; the iterative updating of the initial particle swarm comprises: calculating the fitness of all particles in the initial particle swarm by using a second fitness function; the second fitness function is: ; wherein, fitness value of particle X, , , and weighting coefficient, , simulated annual energy production corresponding to particle X, total cost corresponding to particle X, theoretical maximum energy production, project budget, shadowing loss rate corresponding to particle X, constraint penalty of the jth continuous variable corresponding to particle X, total number of continuous variables, maximum penalty value; iterative updating of the initial particle swarm based on the fitness of all particles by using a position updating formula and a velocity updating formula; the velocity updating formula is: ; wherein, is the adjustment velocity of the mth particle for the k+1 generation in dimension d, d=1 corresponds to the dimension of the component tilt, d=2 corresponds to the dimension of the row spacing, d=3 corresponds to the dimension of the coordinates, 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 best 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 best position of all particles globally in dimension d, is the gradient weight, is the gradient of the objective function at the current position; the position updating formula is: ; wherein, is the position of the (k+1)th generation in dimension d for the mth particle.
2. A method of aiding the design of a photovoltaic power array as claimed in claim 1, wherein, the determination of the terrain partition constraint comprises: dividing a target area into multiple terrain partitions by using a clustering algorithm based on terrain data and forbidden areas of the target area; the terrain data of the target area comprises a slope and a slope direction, and the forbidden areas are determined by obstacle data; determining a feasible solution boundary of the component model, the array partition and the support type of each terrain partition, and taking the feasible solution boundary as the terrain partition constraint.
3. A method of aiding the design of a photovoltaic power array as claimed in claim 1, characterized in that, the genetic operation on the initial population to obtain a target population comprises: calculating the fitness of all chromosomes in the initial population by using a first fitness function; the chromosomes comprise a component model, an array partition, a support type and a check segment; the first fitness function is: ; wherein, , , and are weight coefficients, , is the fitness value of chromosome , is the corresponding simulated annual power generation of chromosome , is the theoretical maximum power generation, is the project budget, is the corresponding total cost of chromosome , is the construction rule degree, is the violation coefficient of the i-th constraint corresponding to chromosome , is the penalty weight of the i-th constraint, is the total number of constraints, is the maximum constraint violation value; genetic operation on the initial population based on the fitness of all chromosomes to obtain a target population.
4. A method of aiding the design of a photovoltaic power array as claimed in claim 3, wherein, the genetic operation on the initial population based on the fitness of all chromosomes to obtain a target population comprises: selecting chromosomes meeting a fitness condition from the initial population as a parent population; randomly segmenting and crossing all chromosomes in the parent population based on an adaptive crossover probability to obtain an offspring population; the adaptive crossover probability is negatively correlated with the fitness of the chromosomes; segmenting and mutating all chromosomes in the offspring population based on the terrain partition constraint to obtain a target population.
5. A method of aiding the design of a photovoltaic power array as defined in claim 1, wherein, the iterative updating of the initial point based on a negative gradient direction of a gradient of a target function until an iterative termination condition is met to obtain a target particle comprises: calculating a gradient vector of the target function with respect to the initial point based on a central difference method; the target function is: ; wherein, is a target score corresponding to particle X, is a power generation weight, b is a cost weight, and c is a shadow loss weight, +b+c=1, is a simulated annual power generation corresponding to particle X, is a total cost corresponding to particle X, is a shadow blocking loss rate corresponding to particle X, is a theoretical maximum power generation, is a project budget; iterative updating of the initial point in a negative direction of the gradient vector until an iterative termination condition is met to obtain a target particle; the iterative termination condition is that the norm of the gradient vector of the updated particle is less than a second threshold value; the second threshold value is a preset positive number.
6. A photovoltaic power array aided design system, characterized by, a genetic module, configured to perform chromosome encoding on the component model, the array partition and the support type within the terrain partition constraint to generate an initial population; performing genetic operation on the initial population to obtain a target population, and regarding chromosomes with fitness greater than a first threshold in the target population as a first solution set; a particle swarm optimization module, configured to determine an initial particle swarm based on the first solution set, particles in the initial particle swarm correspond to chromosomes in the first solution set one by one, and each particle includes a component tilt angle, an inter-row spacing and a coordinate; a gradient optimization module, configured to perform iterative updating on the initial particle swarm until an iterative convergence condition is met, take a particle with the highest fitness in the iterative updating process as an initial point, perform iterative updating on the initial point based on a negative gradient direction of a gradient of a target function until an iterative termination condition is met, and obtain a target particle; the gradient optimization module, specifically configured to calculate fitness of all particles in the initial particle swarm by using a second fitness function; the second fitness function is: ; wherein, fitness value of particle X, , , and weighting coefficient, , simulated annual energy production corresponding to particle X, total cost corresponding to particle X, theoretical maximum energy production, project budget, shadowing loss rate corresponding to particle X, constraint penalty of the jth continuous variable corresponding to particle X, total number of continuous variables, maximum penalty value; perform iterative updating on the initial particle swarm by using a position updating formula and a velocity updating formula based on the fitness of the all particles; the velocity updating formula is: ; wherein, is the adjustment velocity of the mth particle for the k+1 generation in dimension d, d=1 corresponds to the dimension of the component tilt, d=2 corresponds to the dimension of the row spacing, d=3 corresponds to the dimension of the coordinates, 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 best 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 best position of all particles globally in dimension d, is the gradient weight, is the gradient of the objective function at the current position; the position updating formula is: ; wherein, is the position of the (k+1)th generation of the mth particle in dimension d; a design module, configured to design a photovoltaic power generation array based on the target particle.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 5.
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