Shadow analysis method, device and equipment for photovoltaic power station and storage medium
The shadow analysis method based on GPU rendering and coordinate transformation solves the problems of low efficiency and low accuracy in photovoltaic power station shadow analysis, realizes fast and accurate shadow analysis, and reduces hardware requirements and operating costs.
Patent Information
- Application Number
- CN202510729773.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-09
AI Technical Summary
Existing photovoltaic power station shadow analysis methods have long calculation time, low efficiency, low calculation accuracy, and high hardware resource consumption, making it difficult to achieve efficient portability on multiple platforms.
The photovoltaic power station model is rendered using GPU, and a depth map is generated through the direction vector of the sun's rays. The model coordinates are converted to the solar perspective space for depth comparison, to determine the occlusion situation, and to improve computing efficiency by utilizing the parallel computing capabilities of the GPU.
Significantly shorten shadow analysis time from minutes to milliseconds, reduce hardware configuration requirements, improve calculation accuracy and design efficiency, and reduce operation and maintenance costs.
Smart Images

Figure CN120612420A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a shadow analysis method, device, equipment and storage medium for a photovoltaic power station. Background Art
[0002] Shadow analysis evaluates the impact of shadows on the power generation efficiency of photovoltaic panels by calculating and simulating the effects of sunlight being blocked by surrounding objects (such as buildings, trees, and equipment). Its core goal is to optimize panel layout, reduce power generation losses caused by shadows, and ensure the economic and reliability of power plants. Shadow analysis is an essential step in photovoltaic power plant design.
[0003] Existing shadow analysis methods are divided into two types based on the software used. One is to apply legends in drawing software such as AutoCAD. The other is to use sun ray tracing in 3D display software to determine the shadow range. These two methods mainly face the following problems:
[0004] The first is the time efficiency issue: the traditional method for photovoltaic power station shadow analysis is to use CPU for calculation, which takes a long time and has low efficiency.
[0005] The second is the problem of calculation accuracy: whether using CAD drawings or RayCasting methods, the accuracy is not high enough, and the occlusion time cannot be calculated.
[0006] Third, it consumes a lot of hardware resources: this single functional module occupies too much computer CPU resources and memory, has high requirements for user hardware configuration, and has difficulty supporting multiple platforms such as mobile portable devices. Summary of the Invention
[0007] In view of this, the present invention provides a shadow analysis method, device, equipment and storage medium for a photovoltaic power station to solve the problem of low efficiency of the shadow analysis method in the prior art.
[0008] In a first aspect, the present invention provides a shadow analysis method for a photovoltaic power station, the method comprising: determining the direction vector of sunlight at the time point to be analyzed based on the longitude and latitude of the photovoltaic power station and the time point to be analyzed; based on the direction vector of sunlight, using a GPU to render a power station model of the photovoltaic power station from the direction of sunlight to obtain a depth map of the time point to be analyzed; converting the pixel points of the power station model in the camera space to the solar perspective space to obtain the converted coordinates; performing a depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is blocked.
[0009] In this method, a GPU is used to render a photovoltaic power plant model from the direction of sunlight, generating a depth map. This map is then compared with the depth value converted from camera space to the sun's perspective to determine if there is any obstruction. This reduces CPU and memory usage, requires minimal hardware configuration, offers fast response, and shortens the design cycle. Furthermore, this method can facilitate the operation and maintenance of photovoltaic power plants, reducing operating and maintenance costs and thus improving economic efficiency.
[0010] In an optional embodiment, when the time points to be analyzed include multiple time points within a day, the method further includes: determining the number of obstructions within a day based on whether the multiple time points are obstructed; and generating a shadow heat map corresponding to the photovoltaic power station based on the number of obstructions.
[0011] The present invention generates a shadow heat map that clearly shows the severity of shadowing in various areas of a power station throughout the day, providing a scientific and visual reference for the layout of photovoltaic modules.
[0012] In an optional embodiment, the direction vector of the sunlight at the time to be analyzed is determined based on the longitude and latitude of the photovoltaic power station and the time to be analyzed, including: calculating the position of the sun based on the Julian day at the time to be analyzed; calculating the hour angle based on the longitude and latitude of the photovoltaic power station and the position of the sun; calculating the solar altitude angle and azimuth angle based on the hour angle and the solar position; converting the solar altitude angle and azimuth angle into a three-dimensional direction vector to obtain the sunlight direction vector.
[0013] In the present invention, the sun's position is calculated using the Julian day, which can accurately consider the influence of time factors on the sun's position. The altitude and azimuth angles are calculated in combination with the longitude and latitude and the hour angle, making the calculation more in line with the actual scene, accurately reflecting the direction of the sun's rays at a specific time and place, providing reliable basic data for subsequent shadow analysis, improving the accuracy of shadow analysis, and the error can be controlled within a smaller range.
[0014] In an optional embodiment, based on the sunlight direction vector, a GPU is used to render a power station model of a photovoltaic power station from the direction of sunlight to obtain a depth map of the time point to be analyzed, including: calculating a viewing angle matrix and a projection matrix according to the sunlight direction vector; based on the viewing angle matrix and the projection matrix, a GPU is used to convert the coordinates of the power station model into world coordinates, view coordinates, clip coordinates and screen coordinates in sequence to obtain a depth map of the time point to be analyzed.
[0015] This invention leverages the powerful parallel computing capabilities of GPUs to rapidly process large numbers of power plant model coordinate conversion tasks. Compared to traditional CPU calculations, rendering time can be significantly reduced from minutes to milliseconds, greatly improving the computational efficiency of shadow analysis. This makes the entire analysis process more real-time and rapid, significantly shortening the photovoltaic power plant design cycle.
[0016] In an optional embodiment, the pixel points of the power station model in the camera space are converted to the solar perspective space to obtain the converted coordinates, including: converting the coordinates of the power station model in the camera space into world coordinates based on the inverse view matrix of the camera; using the perspective matrix and the projection matrix to convert the world coordinates into solar perspective space coordinates, and the solar perspective space coordinates include depth values.
[0017] In the present invention, the coordinates of the power station model in the camera space are converted into world coordinates based on the camera inverse view matrix, and then converted into the solar perspective space coordinates using the view matrix and projection matrix. The user perspective (camera space) is associated with the solar perspective, thereby achieving unified conversion of coordinates under different perspectives, laying the foundation for subsequent accurate judgment of occlusion conditions.
[0018] In an optional embodiment, a depth comparison is performed based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is obscured, including: comparing the first depth value contained in the converted coordinates with the second depth value corresponding to the same coordinates in the depth map; when the first depth value is greater than the second depth value, it is determined that it is obscured; when the first depth value is less than the second depth value, it is determined that it is not obscured.
[0019] In the present invention, by comparing the depth value and judging the occlusion of each coordinate, accurate data reference is provided for the layout and optimization of the photovoltaic power station.
[0020] In an optional embodiment, the time points to be analyzed include fourteen time points from 9:00 to 15:00 in a day, and the interval between each time point is half an hour.
[0021] In the present invention, fourteen time points are used as time points to be analyzed for shadow analysis, thereby being able to capture shadow change trends in detail.
[0022] In a second aspect, the present invention provides a shadow analysis device for a photovoltaic power station, the device comprising: a direction vector determination module for determining the direction vector of sunlight at a time point to be analyzed based on the longitude and latitude of the photovoltaic power station and the time point to be analyzed; a depth map determination module for rendering a power station model of the photovoltaic power station from the direction of sunlight using a GPU based on the direction vector of sunlight to obtain a depth map of the time point to be analyzed; a conversion module for converting the pixel points of the power station model in the camera space to the solar perspective space to obtain the converted coordinates; and an occlusion judgment module for performing a depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is occluded.
[0023] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the shadow analysis method for a photovoltaic power station according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the shadow analysis method for a photovoltaic power station according to the first aspect or any corresponding embodiment thereof.
[0025] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the shadow analysis method for a photovoltaic power station according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 is a flow chart of a shadow analysis method for a photovoltaic power station according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of light direction vectors according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of the spatial coordinate conversion principle according to an embodiment of the present invention;
[0030] Figure 4 is a flow chart of another shadow analysis method for a photovoltaic power station according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of space conversion calculation in an actual development process according to an embodiment of the present invention;
[0032] Figure 6 is a structural block diagram of a shadow analysis device for a photovoltaic power station according to an embodiment of the present invention;
[0033] Figure 7 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0035] According to an embodiment of the present invention, an embodiment of a shadow analysis method for a photovoltaic power station is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In this embodiment, a shadow analysis method for a photovoltaic power station is provided. Figure 1 FIG. 1 is a flow chart of a shadow analysis method for a photovoltaic power station according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0037] Step S101 : determining the direction vector of the sunlight at the time to be analyzed according to the longitude and latitude of the photovoltaic power station and the time to be analyzed.
[0038] Specifically, during the construction of a photovoltaic power station, obstacles are often encountered that cause shadows to be blocked by the photovoltaic components of the power station. Common types of shadows are divided into fixed shadows, dynamic shadows, and local shadows. Among them, fixed shadows are shadows caused by permanent objects such as buildings, trees, and mountains. During the survey and design stages, the impact of these fixed shadows needs to be taken into account to prevent the components from being affected by the shadows and affecting the power generation efficiency. This type of shadow is often avoided through reasonable design. Dynamic shadows are shadows caused by moving objects (such as clouds, birds, airplanes, etc.). This type of shadow is inevitable, but it can be predicted and avoided in advance by pre-analyzing the shadows. Local shadows are caused by the shadows of the equipment itself, such as shadows between components, shadows of brackets, etc. Local shadows may affect the irradiation of adjacent components, thereby affecting the power generation efficiency of the entire photovoltaic power station. In order to avoid the impact of such shadows, reasonable calculations and avoidance are required during the design and construction stages. The shadows in this embodiment mainly refer to local shadows.
[0039] Specifically, partial shadows refer to the obstruction of sunlight, which prevents some photovoltaic modules in a photovoltaic power station from being illuminated. Therefore, when performing shadow analysis, it is necessary to first determine the direction of sunlight. In this embodiment, the direction of sunlight is represented by a sunlight direction vector, which specifically refers to a unit vector pointing from the sun to the ground. However, as time passes throughout the day, the position of the sun changes, and the sunlight direction vector also changes. Therefore, when calculating the sunlight direction vector, it is necessary to first determine the specific time point for the occlusion judgment. This time point can be a time point that specifically includes information such as the year, month, day, hour, minute, and second. At the same time, the sunlight direction vector at different locations is also different. This embodiment mainly analyzes photovoltaic power stations, so it is also necessary to first determine the specific location of the photovoltaic power station. This location includes information such as the latitude and longitude of the photovoltaic power station.
[0040] After determining the time point to be analyzed and the location information of the photovoltaic power station, the sun position is first determined based on the time point to be analyzed, and then the direction vector of the sunlight can be determined by combining the location information of the photovoltaic power station and the sun position.
[0041] Step S102 : Based on the sunlight direction vector, a GPU is used to render a power station model of the photovoltaic power station from the sunlight direction to obtain a depth map at the time point to be analyzed.
[0042] Specifically, sunlight at a given moment can be considered a parallel light source with a consistent direction. The shadow range at this moment is equivalent to the occlusion area seen when observing the power plant model from the same perspective (line of sight) as the sunlight. Because sunlight is parallel, an orthographic camera is suitable for simulating this perspective. Based on this, this embodiment uses a GPU to render the power plant model from the direction represented by the sunlight direction vector, generating a corresponding depth map that reflects the occlusion relationship of the model in the direction of the sun at that point in time.
[0043] Among them, when determining the depth map, the GPU makes the photovoltaic power station into a three-dimensional model, and uses technology similar to that of a game engine (OpenGL, Open Graphics Library) to let the GPU simulate sunlight from different angles to generate a "depth map". This realizes the migration and application of cross-industry technology, and applies the real-time shadow rendering technology of the gaming industry to the design of photovoltaic power stations. Specifically, the GPU can obtain the depth map through its built-in graphics rendering pipeline, such as vertex shaders, projection transformations and other processing processes. At the same time, the GPU has a large number of computing cores, such as stream processors, which can process data in parallel. Therefore, when generating a depth map, each computing core in the GPU can perform multiple coordinate conversion tasks at the same time, reducing the calculation speed from minutes to milliseconds, achieving efficient parallel computing and greatly improving performance.
[0044] Step S103, convert the pixel points of the power station model in the camera space to the solar perspective space to obtain the converted coordinates. Specifically, after determining the depth map, it is also necessary to judge the occlusion of each point on the power station model under the user's free perspective (the user's current viewing direction). Among them, the depth map is generated from the solar perspective, which records the depth information (distance from the sun) of each point when the power station model is viewed from the direction of the sun at the corresponding moment. Therefore, it is also necessary to convert the pixel points in the camera space to the solar perspective space for subsequent judgment. Among them, the camera space is a coordinate system established in the user's viewing direction.
[0045] Step S104 compares the depth of the converted coordinates with the depth map at the time point to be analyzed to determine whether the time point to be analyzed is obscured. Specifically, after converting the camera space to the sun's perspective space, the depth values in the converted coordinates can be compared with the depth values in the depth map to determine whether there is any obstruction. If there is any obstruction, it indicates the presence of a shadow.
[0046] The shadow analysis method for photovoltaic power plants provided by the present invention uses a GPU to render the power plant model from the direction of sunlight to obtain a depth map. This map is then compared with the depth value converted from camera space to the sun's perspective to determine whether there is occlusion. This method reduces CPU and memory usage, requires minimal hardware configuration, offers fast response, and shortens the design cycle. Furthermore, this method can facilitate the operation and maintenance of photovoltaic power plants, reduce operating and maintenance costs, and thus improve economic benefits.
[0047] In this embodiment, a shadow analysis method for a photovoltaic power station is provided, which includes the following steps:
[0048] Step S201 : determining the direction vector of the sunlight at the time to be analyzed according to the longitude and latitude of the photovoltaic power station and the time to be analyzed.
[0049] Specifically, the above step S201 includes:
[0050] Step S2011: Calculate the sun's position based on the Julian day at the time to be analyzed. Julian day is determined by taking into account the orbital periods of the sun and moon. Therefore, when determining the sun's position, the time to be analyzed is converted to Julian day. The specific conversion process can be calculated using the following formula:
[0051]
[0052] y = year + 4800 - a
[0053] m = month + 12a - 3
[0054]
[0055] Where JDN represents the Julian day number and JD represents the Julian day.
[0056] The sun's position is calculated using the following process:
[0057] 1. First calculate the mean anomaly angle using the following formula.
[0058]
[0059] M=M0+n·T+k·T 2 +l·T 3
[0060] Where, JD J2000 Indicates the Julian day value at 12:00 UTC on January 1, 2000; D century represents the number of days in a Julian century (100 Julian years); M0 is the initial mean anomaly of the epoch, n is the secular term of the mean angular velocity, k is the orbital precession correction; l is the high-order perturbation correction, and M is the mean anomaly.
[0061] 2. Use the following formula to calculate the sun's true ecliptic longitude L.
[0062] L=L0+e·sinM
[0063] Where L represents the mean ecliptic longitude of the Sun; e represents the eccentricity of the Earth's orbit; and M represents the perihelion angular distance of the Sun (the Sun's mean ecliptic longitude).
[0064] 3. Use the following formula to calculate right ascension and declination. Right ascension α represents the angle measured eastward along the Earth's equator from the vernal equinox (the ascending node of the ecliptic and the equator). Declination δ represents the latitude of the point on the Earth's surface where the sun is directly overhead, reflecting the Sun's north-south position in the equatorial coordinate system. Right ascension and declination together constitute the equatorial coordinate system.
[0065] α=arctan2(cosεsinλ,cosλ)
[0066] δ=arcsin(sinεsinλ)
[0067] Where ε represents the obliquity of the ecliptic, and λ represents the solar longitude.
[0068] Step S2012: Calculate the hour angle based on the longitude and latitude of the photovoltaic power station and the position of the sun. The hour angle represents the angular distance of the sun (or celestial body) measured westward from the local meridian. Specifically, the hour angle is calculated using the following formula:
[0069] LST = (GMST + longitude) / 15
[0070] H=(LST×15-α)mod 360
[0071] Where LST is the local sidereal time, GMST is the Greenwich mean sidereal time, λ is the solar longitude, α is the right ascension, and H is the hour angle.
[0072] Step S2013: Calculate the solar altitude angle and azimuth angle according to the hour angle and the solar position. Specifically, the altitude angle and azimuth angle are calculated using the following formula:
[0073] sinh=sinφsinδ+cosφcosδcosH
[0074] h=arcsin(sinh)
[0075]
[0076] A=arccos(cos A)
[0077] Where φ represents latitude; δ represents solar declination; H represents hour angle. If hour angle H>0, then azimuth angle A=2π-A.
[0078] Step S2014: Convert the solar altitude angle and azimuth angle into a three-dimensional direction vector to obtain the direction vector of the sun's rays. Specifically, the conversion process can be implemented using the following formula:
[0079] α=sinAcosh
[0080] β=cosAcosh
[0081] γ=sinh
[0082]
[0083] In the formula, α represents the east component (positive in the east direction); β represents the north component (positive in the north direction); γ represents the zenith component (positive in the vertical direction). Figure 2 As shown, the sun's ray vector is usually expressed as components in a three-dimensional rectangular coordinate system, that is, it can be represented by an east component, a north component and a zenith component.
[0084] Step S202 : Based on the sunlight direction vector, a GPU is used to render a power station model of the photovoltaic power station from the sunlight direction to obtain a depth map at the time point to be analyzed.
[0085] Specifically, the above step S202 includes:
[0086] Step S2021: Calculate the view matrix and the projection matrix according to the sun's ray direction vector.
[0087] Step S2022: Based on the view matrix and the projection matrix, the GPU is used to sequentially convert the power station model coordinates into world coordinates, view coordinates, clip coordinates, and screen coordinates to obtain a depth map at the time point to be analyzed.
[0088] To transform coordinates from one space to the next, several transformation matrices are required. The most important are the model matrix, the view matrix, and the projection matrix. Specifically, the view matrix simulates the camera's position and orientation, which can be calculated using the gluLookAt function in OpenGL. The projection matrix converts 3D coordinates in view space to clip space. Common projection methods include orthogonal and perspective projections. Here, we use the orthogonal projection matrix to simulate the situation of approximately parallel light in photovoltaic power plant shadow analysis.
[0089] Specifically, when determining the depth map, it is necessary to start from the local space as the local coordinates, then further process it into world coordinates, view coordinates, clip coordinates (Clip Space), and finally end up as screen coordinates. The conversion process is as follows Figure 3As shown. Among them, local space (also called object space) is the local coordinate space of the object, that is, the starting point of the object. Suppose a cube is created in a modeling software package (such as Blender), and all models start from the initial position. As for world space (World Space), if all objects are imported directly into the application, they may all be located somewhere inside each other. A position is defined for each object to place them in the larger world, called world space coordinates, and all vertices are relative to the coordinates of the world. View space (also called visual space) is what is commonly referred to as the camera of OpenGL (a programming language interface commonly used for image processing) (sometimes also called camera space or visual space). View space is the result of converting world space coordinates to coordinates in front of the user's view, usually achieved through a combination of translation and rotation to translate and rotate the scene so that certain items are transformed in front of the camera, and the world coordinates are converted into the view matrix of the view space. For Clip Space, at the end of each vertex shader run, OpenGL expects coordinates to be within a specific range, and any coordinates outside this range will be clipped, and the clipped coordinates will be discarded, so the remaining coordinates will eventually be displayed as fragments on the screen. Screen Space refers to the space coordinates displayed on the user's screen, such as the monitor terminal used by the user.
[0090] The model matrix, view matrix, and projection matrix shown in the figure are used to implement the above spatial transformation. Specifically, spatial transformation is achieved by multiplying the matrices. These matrices all have similar functions and serve as the medium for spatial transformation. Through a series of transformation matrices, the power station model coordinates are converted to clip coordinates. The specific principle is shown in the following formula:
[0091] V clip =M projection ·M view ·M model
[0092] Where M represents the matrix and V represents the viewing angle.
[0093] OpenGL then performs perspective division on the clip space coordinates to convert them to normalized device coordinates. OpenGL then uses the parameters in glViewPort (an image processing function) to map the normalized device coordinates to screen coordinates, where each coordinate corresponds to a point on the screen. This process is called the viewport transform.
[0094] Step S203 : converting the pixel points of the power station model in the camera space into the sun viewing angle space to obtain the converted coordinates.
[0095] Specifically, the above step S203 includes:
[0096] Step S2031, based on the inverse view matrix of the camera, the coordinates of the power station model in the camera space are converted into world coordinates; specifically, the camera space is a coordinate system constructed based on the user's viewing direction, and the world coordinates describe the absolute position of the object in the entire scene. This conversion process requires the use of the inverse view matrix of the camera. The view matrix is used to convert the world coordinates to the camera space, so the inverse view matrix can be used in reverse to convert the camera space coordinates back to the world coordinates. For example, if the position and orientation of the camera in the world coordinates are known (represented by the rotation matrix), the coordinates of the pixel point in the camera space can be converted into world coordinates through the inverse view matrix operation.
[0097] Step S2032, the view matrix and the projection matrix are used to convert the world coordinates into solar view space coordinates, and the solar view space coordinates include a depth value. Specifically, after obtaining the world coordinates, the view matrix and the projection matrix of the direction of the sun's rays at the corresponding moment are used for conversion. The view matrix determines the position and orientation of the sun as the observation point, and the projection matrix converts the three-dimensional coordinates into a two-dimensional plane (while retaining the depth information). Through the operation of these two matrices, the world coordinates are converted into solar view space coordinates, and this coordinate carries the depth value of the point under the sun's view. This is because during the projection matrix conversion process, a depth value is calculated based on the distance from the point to the sun and recorded in the converted coordinate information.
[0098] Step S204 : performing depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is blocked.
[0099] Specifically, the above step S204 includes:
[0100] Step S2041 : Compare the first depth value included in the converted coordinates with the second depth value corresponding to the same coordinates in the depth map.
[0101] Step S2042: When the first depth value is greater than the second depth value, it is determined to be blocked.
[0102] Step S2043: When the first depth value is less than the second depth value, it is determined that the image is not blocked.
[0103] Specifically, the depth values corresponding to the same point in the power plant model are compared. If the converted coordinates are obtained by converting the coordinates of a pixel in the power plant model, the depth value corresponding to the coordinates of the same pixel in the depth map is selected. If the first depth value is greater than the second depth value, it means that another object is in front of the point in this direction of the sun, blocking it, that is, the point is occluded; if the first depth value is less than the second depth value, it means that it is not occluded. This method can be used to determine occlusion for all pixels in the power plant model.
[0104] In this embodiment, a shadow analysis method for a photovoltaic power station is provided, which includes the following steps:
[0105] Step S301: Determine the direction vector of the sunlight at the time to be analyzed based on the latitude and longitude of the photovoltaic power station and the time to be analyzed; Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0106] Step S302: Based on the sunlight direction vector, a GPU is used to render a photovoltaic power station model from the sunlight direction to obtain a depth map at the time point to be analyzed. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0107] Step S303: Convert the pixel points of the power station model in the camera space to the sun's viewing angle space to obtain the converted coordinates. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0108] Step S304: perform depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is blocked. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0109] Step S305 , determining the number of shading times in a day according to whether multiple time points are blocked; and generating a shadow heat map corresponding to the photovoltaic power station according to the number of shading times.
[0110] Specifically, through the above steps, the shading situation of the power station model at a certain time point is determined. In order to facilitate shadow analysis, the shading situation within a day can be further evaluated. In this embodiment, fourteen time points from 9:00 to 15:00 in a day are selected as the time points to be analyzed, and the interval between each time point is half an hour, so that the shadow change trend can be captured in detail. Among them, for each time point to be analyzed, the above steps can be performed to obtain the shading situation of each pixel point in the power station model at each time point to be analyzed. For example, if a point is blocked, the number of shading of the point is increased by one; traversing all pixel points and fourteen time points, a shading frequency map (i.e., the number of shading of each pixel point) is finally obtained. Finally, according to the number of shading of each pixel point, the corresponding color can be mapped to generate a shadow heat map, which clearly shows the severity of shadow shading in each area of the power station site within a day. This provides a scientific and visual reference for the layout of photovoltaic modules.
[0111] As a specific application example of the embodiment of the present invention, Figure 4 As shown, the shadow analysis method for a photovoltaic power station can be implemented using the following process:
[0112] (1) Information input: Receive the latitude, longitude, and date information entered by the user.
[0113] (2) Direction vector calculation: Calculate the direction vector i of sunlight at each hour on the date specified by the user at this location, with a total of n.
[0114] (3) Space transformation: Calculate the view matrix and projection matrix of each light direction vector, and transform the model coordinates from the world coordinates to the screen coordinates under each view angle to obtain the depth map. Figure 5 As shown, in the actual software development process, the actual shadow of an object at a real moment is calculated and generated by selecting the shadow at a specific moment through independent design and development.
[0115] (4) Occlusion statistics: Calculate the perspective matrix and projection matrix of the software interactive interface, i.e., the user's perspective. When drawing the color of each point on the screen, calculate the depth value of each point under the i-th ray perspective and compare it with the depth value in the depth map of the ray perspective to determine whether it is occluded and the number of occlusions (the number of occlusions is reflected in the occlusion time). When the depth value of the ray perspective is greater than the corresponding depth value in the depth map, add 1 to the occlusion count j and proceed to the next ray perspective.
[0116] (5) Draw the corresponding color based on the heat map according to the number of occlusions.
[0117] In this invention, through GPU-side algorithm development, shadow analysis can be performed quickly without occupying CPU and memory. It has low hardware configuration requirements and fast response, shortening the design cycle from minutes to milliseconds. Photovoltaic design software that integrates this shadow analysis method can display shadow heat maps in real time, which is clear and unambiguous, helping users to make quick decisions. At the same time, based on the shadow occlusion heat map, the component design layout can be quantitatively and accurately controlled to an error of less than 3%. In addition, the design layout of the components can also maximize the utilization of roof space resources, reduce project costs, and increase economic benefits.
[0118] The shadow analysis method for photovoltaic power plants provided by this invention can improve the efficiency and accuracy of photovoltaic power plant design, reduce reliance on subjective human judgment, thereby lowering project costs and risks, ensuring system power generation efficiency and enhancing market competitiveness. Furthermore, it can contribute to environmental protection, promote the development of renewable energy, reduce reliance on traditional energy sources, and thus reduce environmental pollution and energy consumption.
[0119] Traditional shadow analysis suffers from low accuracy and efficiency, requiring significant time and technical expertise. However, this method significantly improves design efficiency and shortens plant construction cycles. Furthermore, this technology can facilitate the operation and maintenance of photovoltaic power plants, reducing operational and maintenance costs and thus improving economic benefits. This method leverages computer software to guide the design and optimization of photovoltaic power plants, providing greater precision, efficiency, and intelligence, thereby improving plant efficiency and power generation. Consequently, it can elevate the design and technical content of photovoltaic power plants, promoting the development and innovation of photovoltaic power plant technology.
[0120] This embodiment also provides a shadow analysis device for a photovoltaic power plant. This device is used to implement the above-mentioned embodiments and preferred embodiments, and details already described are omitted. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0121] This embodiment provides a shadow analysis device for a photovoltaic power station, such as Figure 6 Shown, including:
[0122] A direction vector determination module 61 is used to determine the direction vector of sunlight at the time to be analyzed based on the longitude and latitude of the photovoltaic power station and the time to be analyzed;
[0123] a depth map determining module 62 for rendering a power plant model of the photovoltaic power plant from the direction of sunlight using a GPU based on the sunlight direction vector to obtain a depth map at a time point to be analyzed;
[0124] A conversion module 63 is used to convert the pixel points of the power station model in the camera space to the sun viewing angle space to obtain the converted coordinates;
[0125] The occlusion determination module 64 is configured to perform depth comparison based on the converted coordinates and the depth map of the time point to be analyzed, and determine whether the time point to be analyzed is occluded.
[0126] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0127] The embodiment of the present invention also provides a computer device having the above Figure 6 The shadow analysis device shown is used for a photovoltaic power station.
[0128] See also Figure 7 , Figure 7 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0129] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0130] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0131] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0132] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0133] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0134] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0135] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0136] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A shadow analysis method for a photovoltaic power station, characterized in that: The method comprises: Determine the direction vector of the sunlight at the time to be analyzed based on the latitude and longitude of the photovoltaic power station and the time to be analyzed; Based on the sunlight direction vector, a GPU is used to render a photovoltaic power station model from the sunlight direction to obtain a depth map at the time point to be analyzed; Convert the pixel points of the power station model in the camera space to the sun's viewing angle space to obtain the converted coordinates; A depth comparison is performed based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is blocked.
2. The method according to claim 1, characterized in that When the time point to be analyzed includes multiple time points within a day, the method further includes: Determine the number of occlusions in a day based on whether multiple time points are blocked; A shadow heat map corresponding to the photovoltaic power station is generated according to the number of shading times.
3. The method according to claim 1, characterized in that Determine the direction vector of the sunlight at the time to be analyzed based on the latitude and longitude of the photovoltaic power station and the time to be analyzed, including: Calculate the sun's position based on the Julian day at the time to be analyzed; Calculate the hour angle based on the longitude and latitude of the photovoltaic power station and the position of the sun; Calculating the solar altitude angle and the azimuth angle according to the hour angle and the solar position; The solar altitude angle and azimuth angle are converted into a three-dimensional direction vector to obtain a solar ray direction vector.
4. The method according to claim 1, wherein Based on the sunlight direction vector, a GPU is used to render a photovoltaic power station model from the sunlight direction to obtain a depth map at the time point to be analyzed, including: Calculate the viewing angle matrix and the projection matrix according to the direction vector of the sun light; Based on the viewing matrix and projection matrix, the GPU is used to sequentially convert the power station model coordinates into world coordinates, view coordinates, clip coordinates, and screen coordinates to obtain a depth map at the time point to be analyzed.
5. The method according to claim 4, characterized in that Convert the pixel points of the power station model in the camera space to the sun's viewing angle space to obtain the converted coordinates, including: Based on the inverse view matrix of the camera, the coordinates of the power station model in the camera space are converted to world coordinates; The world coordinates are converted into solar perspective space coordinates using the perspective matrix and the projection matrix, where the solar perspective space coordinates include a depth value.
6. The method according to claim 2, characterized in that Perform a depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is blocked, including: Comparing the first depth value contained in the converted coordinates with the second depth value corresponding to the same coordinates in the depth map; When the first depth value is greater than the second depth value, it is determined to be blocked; When the first depth value is less than the second depth value, it is determined that the image is not blocked.
7. The method according to claim 1, characterized in that The time points to be analyzed include fourteen time points from 9:00 to 15:00 in a day, and the interval between each time point is half an hour.
8. A shadow analysis device for a photovoltaic power station, characterized in that: The device comprises: A direction vector determination module is used to determine the direction vector of sunlight at the time to be analyzed based on the longitude and latitude of the photovoltaic power station and the time to be analyzed; A depth map determination module is configured to render a power plant model of the photovoltaic power plant from the direction of sunlight using a GPU based on the sunlight direction vector to obtain a depth map at a time point to be analyzed; A conversion module is used to convert the pixel points of the power station model in the camera space to the sun's viewing angle space to obtain the converted coordinates; The occlusion judgment module is used to perform depth comparison based on the converted coordinates and the depth map of the time point to be analyzed to determine whether the time point to be analyzed is occluded.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the shadow analysis method for a photovoltaic power station according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the shadow analysis method for a photovoltaic power station according to any one of claims 1 to 7.