A complex terrain wind field prediction method, device and electronic equipment
Patent Information
- Application Number
- CN202611205024.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]本发明提供了一种复杂地形风场预测方法、装置及电子设备,以解决在缺乏完整边界条件和实测风场数据的情况下,难以实现高精度的实时风场预测的问题
[0011]有益效果:通过在风速数据为稀疏风速数据时将地形距离场、稀疏风速数据以及观测掩码组合为第一输入集输入网络,而在风速数据为非稀疏风速数据时根据非稀疏风速数据生成非稀疏风速分量并与地形距离场组合为第二输入集输入网络;这在神经网络前向传播计算层面提供了极强的兼容性与多工况适配性,使得单个预训练的三维卷积神经网络能够一套架构同时完美适配全域稀疏、子域稀疏、轨迹稀疏以及基于入流扩展算法或角点插值算法得到的非稀疏等多种复杂的多源异构现实观测场景,扩大了该预测方法的工程应用边界。
Smart Images

Figure CN123010140A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of wind energy utilization and aviation flight planning technology, specifically to a method, device, and electronic equipment for predicting wind fields in complex terrain. Background Technology
[0002] In engineering fields that rely on wind field data, such as wind energy utilization and aviation flight planning, the actual operating environment is complex and variable. Complex terrains, including mountains, canyons, and hills, can cause severe spatial heterogeneity in wind fields. Accurately obtaining high-resolution wind field prediction data under complex terrains is of great significance for applications such as micro-site optimization of wind farms and UAV path planning. Existing solutions mainly include numerical weather prediction and computational fluid dynamics simulation. Numerical weather prediction suffers from low spatial and temporal resolution, failing to meet the engineering requirements for small-scale wind field prediction in complex terrain. While traditional computational fluid dynamics simulation can generate high-resolution, detailed wind fields, it typically requires explicit global boundary conditions and is computationally expensive and time-consuming, thus failing to meet the real-time prediction needs of dynamic programming applications. To improve prediction speed, existing solutions have attempted to introduce artificial intelligence models, but in practical engineering, they can only acquire sporadic wind measurement data, failing to fully consider the three-dimensional spatial constraints of complex terrain. This results in low efficiency in utilizing sparse observation data, making it difficult to achieve high-precision real-time predictions in the absence of complete boundary conditions and measured wind field data. Summary of the Invention
[0003] This invention provides a method, apparatus, and electronic device for predicting wind fields in complex terrain, in order to solve the problem that it is difficult to achieve high-precision real-time wind field prediction when complete boundary conditions and measured wind field data are lacking.
[0004] In a first aspect, the present invention provides a method for predicting wind fields in complex terrain, comprising: Obtain wind speed data for the area to be predicted and construct a terrain distance field; Generate an observation mask based on wind speed data; The terrain distance field, wind speed data, and observation mask are used as input sets and fed into a pre-trained 3D convolutional neural network for forward propagation to obtain the predicted output tensor. The pre-trained 3D convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation. The fluid domain mask is obtained from the topographic distance field, and the prediction output tensor is constrained based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted.
[0005] Beneficial effects: This invention breaks away from the strict dependence of traditional computational fluid dynamics simulation on prior input information such as explicit global boundary conditions. It utilizes the powerful forward propagation and fitting capabilities of a pre-trained 3D convolutional neural network to achieve ultra-fast reconstruction at the second level. Furthermore, by using element-wise constraints of the fluid domain mask, it ensures that the predicted value inside the terrain is zero to meet the physical non-penetrating boundary condition. This fundamentally solves the problem that traditional wind field prediction methods cannot balance high computational efficiency and high spatial resolution in small-scale complex terrain scenarios.
[0006] In one alternative implementation, the terrain distance field is constructed as follows: Acquire terrain data of the area to be predicted, and construct a terrain occupancy volume on a regular grid based on the terrain data; use the terrain occupancy volume as a terrain mask to represent the occupancy state of the terrain in three-dimensional space; Generate a Boolean mask for the fluid domain based on the terrain mask; Applying an Euclidean distance transformation to the fluid domain Boolean mask yields a terrain distance field, which includes multiple voxels, each representing the Euclidean distance from the voxel to the nearest terrain surface.
[0007] Beneficial effects: By constructing a terrain occupancy volume on a regular grid based on the terrain data of the area to be predicted as a terrain mask, and generating a fluid domain Boolean mask accordingly to apply Euclidean distance transformation, a terrain distance field is obtained, which clearly and digitally defines the Euclidean distance from each location in the voxel space to the nearest terrain surface. This provides a low-level terrain representation with high spatial continuity and clear spatial geometric features for subsequent pre-trained 3D convolutional neural networks, avoiding the insufficiency of traditional discrete representation of elevation maps in terms of spatial 3D feature constraints, and enhancing the accuracy of deep learning models in capturing the spatial heterogeneity of complex 3D terrains with large undulations and many changes.
[0008] In one alternative implementation, the wind speed data is either sparse or non-sparse. An observation mask is generated based on wind speed data, including: When the wind speed data is sparse, obtain the grid positions of the sparse wind speed data at a preset ratio within the area to be predicted, and mark the grid positions as the initial mask. Obtain the terrain mask corresponding to the initial mask in the terrain distance field, and use the product of the initial mask and the terrain mask as the observation mask for sparse wind speed data.
[0009] Beneficial effects: By acquiring a preset proportion of sparse wind speed data and marking the grid positions in the area to be predicted as the initial mask, and then multiplying it with the terrain mask to obtain the observation mask for the sparse wind speed data, this step can accurately locate and mark the positions of known measurements in space. At the same time, the terrain mask filters out unreasonable sampling cells located inside the terrain, preventing invalid or erroneous data from interfering with the network input, and improving the efficiency of artificial intelligence models in mining and utilizing extremely sporadic and noisy sparse observation data in actual engineering.
[0010] In one alternative implementation, the terrain distance field, wind speed data, and observation mask are used as input sets and fed into a pre-trained 3D convolutional neural network for forward propagation to obtain a predicted output tensor, including: When the wind speed data is sparse, the terrain distance field, sparse wind speed data and observation mask are combined into the first input set, and the first input set is input into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor. When the wind speed data is non-sparse, a non-sparse wind speed component is generated based on the non-sparse wind speed data. The terrain distance field and the non-sparse wind speed component are combined into a second input set, and the second input set is input into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
[0011] Beneficial effects: When the wind speed data is sparse, the terrain distance field, sparse wind speed data, and observation mask are combined into the first input set and input into the network. When the wind speed data is non-sparse, a non-sparse wind speed component is generated based on the non-sparse wind speed data and combined with the terrain distance field into the second input set and input into the network. This provides strong compatibility and multi-condition adaptability at the forward propagation computation level of the neural network, enabling a single pre-trained 3D convolutional neural network to perfectly adapt to various complex multi-source heterogeneous real-world observation scenarios such as global sparseness, subdomain sparseness, trajectory sparseness, and non-sparseness obtained based on inflow expansion algorithms or corner interpolation algorithms, thus expanding the engineering application boundaries of this prediction method.
[0012] In one alternative implementation, the flow field data is generated in the following manner: Computational fluid dynamics simulations were performed on various terrains using Reynolds average time to generate baseline flow field data. The terrains included mountains, valleys, and hills. The baseline flow field data included velocity vector field, pressure field, baseline turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient. The reference flow field data is mapped from the computational grid to a regular grid using a resampling operator, and samples larger than a preset threshold are removed to form supervised label data; The wind speed scaling ratio is determined based on the ratio of the preset target wind speed to the reference wind speed, and the monitoring label data is scaled according to the wind speed scaling ratio to obtain the flow field data.
[0013] Beneficial effects: By using Reynolds-averaged time-of-flight (RAF) simulations of various terrains including mountains, canyons, and hills, a baseline flow field data including velocity vector field, pressure field, baseline turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient is generated. After resampling and mapping, outliers are removed by thresholding, and the supervised label data is scaled using wind speed scaling to obtain the flow field data. This discrete-synthetic data technology not only ensures the high-fidelity physical-fluid dynamics credibility of the underlying training sample set through RAF simulation, but also cleverly utilizes wind speed scaling to achieve cross-condition and multi-wind-speed reuse of existing converged flow fields. This expands the global flow field feature training database at low cost and high quality without the need for large-scale and expensive field observations.
[0014] In one alternative implementation, the pre-trained 3D convolutional neural network employs a 3D encoder-decoder structure; The pre-trained 3D convolutional neural network is trained in the following way: The preset training terrain distance field, training wind speed data, and training observation mask are combined into a training input set; The training input set is subjected to random translation, rotation, flipping and subdomain sampling to obtain an enhanced training input set. The rotation process includes rotating the horizontal wind speed component of the training wind speed data in the training input set according to a preset rotation transformation formula. The enhanced training input set is fed into the 3D convolutional neural network to be trained for forward propagation to obtain the prediction tensor; The mean squared error loss between the prediction tensor and the corresponding supervised label data is calculated, and the weight parameters of the 3D convolutional neural network to be trained are optimized based on the mean squared error loss until the 3D convolutional neural network to be trained converges, thus obtaining the pre-trained 3D convolutional neural network.
[0015] Beneficial effects: By limiting the pre-trained 3D convolutional neural network to a 3D encoder-decoder structure, and utilizing training terrain distance field, training wind speed data, and training observation masks through translation, rotation, flipping, and subdomain sampling enhancements, the mean squared error loss between the prediction tensor and the supervised label data is calculated to optimize the weight parameters until convergence. The 3D encoder-decoder network can achieve hierarchical extraction and lossless restoration of macroscopic features of large-scale flow fields in 3D space to microscopic fine wind fields. Combined with online data augmentation, especially the rotation transformation formula correction for horizontal wind speed components, the generalization ability and noise robustness of the model are enhanced, ensuring that the trained 3D convolutional neural network has extremely high fitting accuracy and convergence stability.
[0016] In one optional implementation, a fluid domain mask is obtained based on the terrain distance field, and the prediction output tensor is constrained based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted, including: Input the terrain distance field into the sign function to obtain the fluid domain mask. The indicator value inside the terrain in the fluid domain mask is zero, and the indicator value of the fluid domain is one. The wind field prediction result for the region to be predicted is obtained by performing element-wise multiplication of the fluid domain mask and the prediction output tensor.
[0017] Beneficial effects: By specifically constraining the use of symbolic functions, the terrain distance field is transformed into a fluid domain mask with an internal terrain indicator value of zero and a fluid domain indicator value of one. This mask is then multiplied element-wise with the prediction output tensor to obtain the wind field prediction result for the region to be predicted. This mathematical constraint mechanism forcibly applies physical reality hard constraints at the very end of the neural network output, ensuring that no false wind speeds or airflows will be generated inside the mountain structure, thus perfectly and powerfully realizing the crucial physical non-penetrating boundary conditions in fluid mechanics within a purely data-driven AI architecture, thereby improving the engineering reliability of the wind field prediction results.
[0018] In one optional implementation, after obtaining the wind field prediction results for the area to be predicted, the method further includes: Obtain the preset sample scaling factor; The wind field prediction results are inversely transformed based on the sample scale factor to obtain the three-dimensional volume-average wind speed and actual turbulent kinetic energy.
[0019] Beneficial effects: After obtaining the wind field prediction results for the area to be predicted, a preset sample scale factor is acquired, and the wind field prediction results are inversely transformed according to the sample scale factor to finally restore the three-dimensional volume average wind speed and actual turbulent kinetic energy. This dimensionless inverse transformation mechanism can accurately and losslessly restore and amplify the intermediate abstract values that are normalized in the neural network to avoid numerical gradient explosion or dissipation back to the real physical quantity scales such as meters per second and square seconds per second squared in nature. This can directly provide intuitive and high-precision data support for application scenarios such as wind farm micro-site selection optimization and UAV path planning.
[0020] Secondly, the present invention provides a wind field prediction device for complex terrain, comprising: The acquisition module is used to acquire wind speed data for the area to be predicted and to construct a terrain distance field; The generation module is used to generate observation masks based on wind speed data; The input module is used to take the terrain distance field, wind speed data and observation mask as input sets and input them into the pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor. The pre-trained three-dimensional convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation. The constraint module is used to obtain the fluid domain mask based on the terrain distance field, and to constrain the prediction output tensor based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted.
[0021] Thirdly, the present invention provides an electronic device, comprising: 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 computer instructions to perform a method for predicting wind fields in complex terrain as described in the first aspect or any corresponding embodiment.
[0022] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute a method for predicting wind fields in complex terrain as described in the first aspect or any corresponding embodiment.
[0023] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute a method for predicting wind fields in complex terrain as described in the first aspect or any corresponding embodiment. Attached Figure Description
[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating a method for predicting wind fields in complex terrain according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the process for constructing a terrain distance field according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the process for calculating the observation mask according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the hill simulation results according to an embodiment of the present invention; Figure 5 This is a diagram illustrating the training process of a three-dimensional convolutional neural network according to an embodiment of the present invention; Figure 6 This is a predicted streamline diagram in hilly terrain according to an embodiment of the present invention; Figure 7 These are comparison graphs of prediction simulations according to embodiments of the present invention; Figure 8 This is a neural network framework diagram according to an embodiment of the present invention; Figure 9 This is a structural block diagram of a wind field prediction device for complex terrain according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0027] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0028] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0029] To address the engineering pain points of existing numerical weather prediction, which cannot meet the needs of small-scale prediction due to low spatial and temporal resolution, and traditional computational fluid dynamics simulation, which cannot meet the needs of real-time prediction due to its high dependence on explicit global boundary conditions, extremely high computational cost, and long time consumption, this study aims to overcome the technical shortcomings of existing solutions that introduce artificial intelligence models, which have low efficiency in utilizing sparse observation data and do not fully consider the three-dimensional spatial characteristics of complex terrain, making it difficult to achieve both high accuracy and real-time performance in the absence of complete boundary conditions and measured wind field data.
[0030] This invention acquires wind speed data of the area to be predicted and constructs a terrain distance field with continuous geometric features. Simultaneously, it generates an observation mask based on the wind speed data to spatially lock and mark the locations of known measurements and filter out anomalies. Subsequently, the terrain distance field, wind speed data, and observation mask are fed into the model as input sets. A pre-trained 3D convolutional neural network, with its powerful forward propagation fitting capability, performs second-level predictions to output a predicted tensor. The pre-trained 3D convolutional neural network is trained in advance using flow field data generated from offline high-fidelity computational fluid dynamics simulations, thus eliminating the need for complete prior boundary conditions during inference. Finally, a fluid domain mask is generated based on the terrain distance field, and element-wise multiplication constraints are applied to the predicted output tensor. Physically impenetrable boundary conditions are forcibly embedded in the pure data-driven architecture, ultimately providing high-precision, low-cost, and real-time wind field prediction results for the area to be predicted, perfectly solving the challenge of real-time, refined reconstruction of small-scale wind fields.
[0031] According to an embodiment of the present invention, a method for predicting wind fields in complex terrain is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0032] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 1 This is a flowchart illustrating a method for predicting wind fields in complex terrain according to an embodiment of the present invention, as shown below. Figure 1 As shown, the process includes the following steps: Step S101: Obtain wind speed data for the area to be predicted and construct a terrain distance field.
[0033] Specifically, the area to be predicted refers to the target spatial region where a three-dimensional wind field prediction is required. Wind speed data refers to the acquired wind measurement data used as input. The terrain distance field refers to a three-dimensional voxel representation constructed based on the terrain data of the target area. Each cell within the fluid domain represents its Euclidean distance to the nearest terrain surface, and the distance value of cells within the terrain is uniformly kept at zero.
[0034] The terrain data of the target area is obtained through a public geographic information service platform. After processing, the terrain elevation is extracted in three-dimensional space and a terrain voxel representation is constructed. Subsequently, a fluid domain Boolean mask is generated, and an Euclidean distance transformation is applied to the fluid domain Boolean mask to calculate the distance from each point in the spatial grid to the terrain surface, thereby constructing a terrain distance field.
[0035] Step S102: Generate an observation mask based on the wind speed data.
[0036] Specifically, an observation mask refers to a channel matrix of wind speed measurement values used to mark observation locations in a three-dimensional spatial grid, so as to locate known wind speed observation points at the input end.
[0037] Based on the grid distribution of the acquired wind speed data within the computational domain of the area to be predicted, the observation locations are marked using masks; the marked observation location information is then used to generate corresponding observation masks as independent channel features.
[0038] Step S103: The terrain distance field, wind speed data, and observation mask are used as input sets and fed into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor. The pre-trained three-dimensional convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation.
[0039] Specifically, the input set refers to the multi-channel input features composed of terrain distance field, wind speed data, and observation masks. The pre-trained 3D convolutional neural network refers to a network model that employs a 3D encoder-decoder structure and is pre-trained and optimized using offline high-fidelity synthetic data. The flow field data refers to high-resolution gridded data containing 3D wind speed and turbulent kinetic energy generated by solving a computational fluid dynamics model based on the steady-state Reynolds-averaged Navier-Stokes equations. The predicted output tensor refers to the original 3D wind field prediction matrix output after the network's forward propagation calculation.
[0040] The terrain distance field, wind speed data, and observation mask are combined to construct the input set of the standard channel. The input set is then fed into a pre-trained 3D convolutional neural network. The network learns the mapping relationship from the input to the wind field and performs forward propagation to calculate the corresponding predicted output tensor.
[0041] Step S104: Obtain the fluid domain mask based on the terrain distance field, and constrain the prediction output tensor based on the fluid domain mask to obtain the wind field prediction result for the area to be predicted.
[0042] Specifically, the fluid domain mask is a binary indicator matrix derived from the terrain distance field, used to distinguish between the terrain interior and the air fluid domain, where the indicator value for the terrain interior is zero and the indicator value for the fluid domain is one. The wind field prediction result for the area to be predicted refers to the final real-time output of the high-resolution three-dimensional volume-average wind speed and turbulent kinetic energy of the near-ground wind field.
[0043] A corresponding fluid domain mask is generated based on the numerical distribution characteristics of the terrain distance field. The fluid domain mask and the prediction output tensor of the network are constrained to ensure that the prediction value inside the terrain is zero to satisfy the non-penetrating boundary condition, thereby obtaining high-precision wind field prediction results for the area to be predicted in real time.
[0044] This embodiment provides a method for predicting wind fields in complex terrain. This invention breaks away from the strict dependence of traditional computational fluid dynamics simulation on prior input information such as explicit global boundary conditions. It utilizes the powerful forward propagation and fitting capabilities of a pre-trained 3D convolutional neural network to achieve ultra-fast reconstruction at the second level. Furthermore, the element-wise constraint of the fluid domain mask ensures that the predicted value inside the terrain is zero to meet the physical non-penetrating boundary condition. This fundamentally solves the problem that traditional wind field prediction methods cannot balance high computational efficiency and high spatial resolution in small-scale complex terrain scenarios.
[0045] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 2 This is a schematic diagram of the process for constructing a terrain distance field according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain terrain data of the area to be predicted, and construct a terrain occupancy volume on a regular grid based on the terrain data; use the terrain occupancy volume as a terrain mask to represent the occupancy state of the terrain in three-dimensional space.
[0046] Specifically, a regular grid refers to a computational system of uniformly orthogonal grids divided in three-dimensional space. A terrain volume refers to a solid representation model in three-dimensional space derived from continuous terrain elevation data. A terrain mask refers to three-dimensional matrix data used to identify the spatial location of a terrain volume. Terrain data refers to DEM (Digital Elevation Model) data, GeoTIFF (GeographicTagged Image File Format) files, or preprocessed STL (Stereo Lithography) terrain models obtained from publicly available data.
[0047] In elevation extraction, continuous terrain elevation surfaces are obtained through two-dimensional spline interpolation. Based on the terrain data, it is voxelized into a three-dimensional terrain occupier on a regular grid, and used as a terrain mask, as shown in formula (1): (1) in, Planar position The corresponding height value of the continuous terrain elevation surface. For indicator functions, take the condition if it is true. Otherwise take .
[0048] Step S202: Generate a fluid domain Boolean mask based on the terrain mask.
[0049] Specifically, the fluid domain Boolean mask refers to a binary matrix model used to clearly distinguish the effective region of air fluids from the solid region of terrain in a spatial grid.
[0050] Define the relationship between the wind voxel mask and the terrain mask, and generate the fluid domain Boolean mask based on the terrain mask, as shown in formula (2): (2) in, Indicates spatial location The fluid domain indicator value at that location, i.e., the wind voxel mask. This indicates the terrain occupancy indicator value, i.e., the terrain mask. These are the three-dimensional coordinate components.
[0051] Step S203: Apply Euclidean distance transformation to the fluid domain Boolean mask to obtain the terrain distance field, wherein the terrain distance field includes multiple voxels, and the value of each voxel represents the Euclidean distance from the voxel to the nearest terrain surface.
[0052] Specifically, a voxel is the smallest computational unit in a regular mesh in three-dimensional space. Euclidean distance is the straight-line physical distance from the center point of a voxel to the nearest undulating surface in three-dimensional space.
[0053] Applying EDT (Euclidean Distance Transform) to the fluid domain Boolean mask yields the terrain range field, as shown in Equation (3): (3) in, Spatial location The terrain distance value is calculated for each cell within the fluid domain using this distance transformation operator, with the distance value calculated per grid cell. The distance value for cells within the terrain is uniformly maintained at a certain value. .
[0054] This embodiment provides a method for predicting wind fields in complex terrain. It constructs a terrain occupancy volume on a regular grid based on terrain data of the area to be predicted, using this as a terrain mask. A fluid domain Boolean mask is then generated to apply an Euclidean distance transformation, yielding a terrain distance field. This clearly and digitally defines the Euclidean distance from each location in voxel space to the nearest terrain surface. This provides a low-level terrain representation with high spatial continuity and clear spatial geometric features for subsequent pre-trained 3D convolutional neural networks, avoiding the inadequacy of traditional discrete elevation map representations in terms of spatial 3D feature constraints. It also enhances the accuracy of deep learning models in capturing the spatial heterogeneity of complex 3D terrains with large undulations and numerous variations.
[0055] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 3 This is a flowchart illustrating the calculation of the observation mask according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process includes the following steps: Step S301: When the wind speed data is sparse wind speed data, obtain the grid positions of the sparse wind speed data of a preset ratio in the area to be predicted, and mark the grid positions as the initial mask.
[0056] Specifically, sparse wind speed data refers to wind field observation feature input information randomly sampled within the area to be predicted, or containing only sporadic measurements. Preset scale refers to a grid sampling ratio value pre-set between a minimum lower limit and a maximum upper limit to simulate local or limited measurement scenarios. Initial mask refers to a marker matrix that initially records the spatial distribution of the sampling points within the grid. Global sparseness refers to random sampling throughout the entire computational domain; subdomain sparseness refers to sampling within a random sub-region of the computational domain, with the starting position biased towards the lower part along the z-direction and uniformly distributed along the x and y directions, limiting the maximum sampling to no more than a specific proportion of cells in the sub-region; trajectory sparseness refers to simulating the flight trajectory of a drone, sampling measurements along a randomly generated three-dimensional polyline path.
[0057] When the wind speed data is sparse, it can be obtained within the entire computational domain, a random sub-region of the computational domain, or a three-dimensional polyline path. A predetermined ratio of grid cells is uniformly and randomly determined between the known measured values. The grid positions of sparse wind speed data in the area to be predicted are extracted in this way, and the grid positions are marked as the initial mask. The remaining unsampled positions are set to zero.
[0058] Step S302: Obtain the terrain mask corresponding to the initial mask in the terrain distance field, and use the product of the initial mask and the terrain mask as the observation mask for sparse wind speed data.
[0059] Obtain the terrain mask corresponding to the initial mask in the terrain distance field. After randomly selecting the grid index, multiply the initial mask and the terrain mask to ensure that cells inside the terrain are not sampled. Perform iterative correction to make the actual sampling number close to the target. Finally, use the product of the initial mask and the terrain mask as the observation mask for sparse wind speed data.
[0060] This embodiment provides a method for predicting wind fields in complex terrain. It obtains a preset proportion of sparse wind speed data and marks the grid positions in the area to be predicted as an initial mask. Then, it multiplies the initial mask with the terrain mask to obtain the observation mask for the sparse wind speed data. This step can accurately locate and mark the positions of known measurements in space. At the same time, it filters and removes unreasonable sampling cells located inside the terrain through the terrain mask, preventing invalid or erroneous data from interfering with the network input. This improves the efficiency of artificial intelligence models in mining and utilizing extremely sporadic and noisy sparse observation data in actual engineering.
[0061] This embodiment provides a method for predicting wind fields in complex terrain. It obtains a preset proportion of sparse wind speed data and marks the grid positions in the area to be predicted as an initial mask. Then, it multiplies the initial mask with the terrain mask to obtain the observation mask for the sparse wind speed data. This step can accurately locate and mark the positions of known measurements in space. At the same time, it filters and removes unreasonable sampling cells located inside the terrain through the terrain mask, preventing invalid or erroneous data from interfering with the network input. This improves the efficiency of artificial intelligence models in mining and utilizing extremely sporadic and noisy sparse observation data in actual engineering.
[0062] In one optional implementation, step S103 includes the following steps: Step S401: When the wind speed data is sparse wind speed data, the terrain distance field, sparse wind speed data and observation mask are combined into a first input set, and the first input set is input into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
[0063] Specifically, the first input set refers to the standard pre-trained 3D convolutional neural network multichannel input tensor, which is composed of the distance field, sparse wind measurement information, and a mask marking the effective points, in the channel dimension when using the sparse mode.
[0064] When the wind speed data is in a sparse wind speed data pattern such as global sparse, subdomain sparse, or trajectory sparse, the terrain distance field, sparse wind speed data, and observation mask are combined into the first input set, and a mask channel is appended at the end. The input tensor satisfies formula (4): (4) in, The input tensor for the pre-trained 3D convolutional neural network, i.e., the first input set, For terrain distance field channels, To sparsely observe wind speed components, unobserved locations are set to zero. To observe the mask channel, Channels can be omitted depending on the configuration. The first input set is fed into a pre-trained 3D convolutional neural network for one forward propagation to obtain the predicted output tensor.
[0065] Step S402: When the wind speed data is non-sparse wind speed data, generate non-sparse wind speed components based on the non-sparse wind speed data, combine the terrain distance field and non-sparse wind speed components into a second input set, and input the second input set into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
[0066] Specifically, non-sparse wind speed data refers to continuous wind speed distribution input information obtained through specific boundary conditions. Non-sparse wind speed components refer to directional wind speed values generated after filling the initial non-sparse information into three-dimensional space using either the inflow expansion algorithm or the corner wind interpolation algorithm. The second input set refers to the pre-trained three-dimensional convolutional neural network input multidimensional tensor, composed of the terrain distance field channel and the non-sparse wind speed component channel, when using the non-sparse input mode. The inflow expansion algorithm replicates and extends the velocity profile of the inflow surface along the x-direction to the entire computational domain; the corner wind interpolation algorithm fills the entire domain using the wind speed values on the four vertical edges of the computational domain through bilinear interpolation.
[0067] When the wind speed data is non-sparse, a non-sparse wind speed component is generated based on the non-sparse wind speed data, and the terrain distance field and the non-sparse wind speed component are combined into a second input set. The input tensor satisfies the formula (5): (5) in, The input tensor, i.e., the second input set, is used to input the pre-trained 3D convolutional neural network. For terrain distance field channels, The wind speed component is generated by inflow or interpolation, i.e., the non-sparse wind speed component. The second input set is fed into a pre-trained 3D convolutional neural network for forward propagation to obtain the predicted output tensor.
[0068] This embodiment provides a method for predicting wind fields in complex terrain. When the wind speed data is sparse, the terrain distance field, sparse wind speed data, and observation mask are combined into a first input set and input into the network. When the wind speed data is non-sparse, a non-sparse wind speed component is generated based on the non-sparse wind speed data and combined with the terrain distance field into a second input set and input into the network. This provides strong compatibility and multi-condition adaptability at the forward propagation computation level of the neural network, enabling a single pre-trained 3D convolutional neural network to perfectly adapt to various complex multi-source heterogeneous real-world observation scenarios, such as global sparseness, subdomain sparseness, trajectory sparseness, and non-sparseness obtained based on inflow expansion algorithms or corner interpolation algorithms, thus expanding the engineering application boundaries of this prediction method.
[0069] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 4This is a schematic diagram of the hill simulation results according to an embodiment of the present invention, such as... Figure 4 As shown, Figure 4 This paper demonstrates the flow field state with velocity magnitude (U Magnitude) directly obtained from physical simulations of hilly terrain patches using the steady-state Reynolds-averaged Navier-Stokes model (Open Foam solver). This figure serves as a high-fidelity reference for the original physical field, providing a direct visual and data source for subsequent mapping from a non-uniform computational grid to a regular grid to form supervised labeled data using resampling operators. The process includes the following steps: Step S501: Computational fluid dynamics simulations are performed on various terrains using Reynolds average time to generate baseline flow field data. The various terrains include mountains, canyons, and hills. The baseline flow field data includes velocity vector field, pressure field, baseline turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient.
[0070] Specifically, Reynolds average (RAI) refers to an efficient fluid dynamics calculation method that uses time averaging of the Navier-Stokes equations to solve for steady flow states. Reference flow field data refers to the raw results directly obtained from high-fidelity physical simulation software, encompassing complete spatial fluid field parameters. Reference turbulent kinetic energy refers to a standard simulation reference physical quantity, without normalization or scaling, characterizing the strength of the fluid's own turbulent kinetic energy fluctuations.
[0071] The steady-state Reynolds-averaged Navier-Stokes model was used to perform computational fluid dynamics simulations of wind fields under various terrains, including mountains, canyons, and hills. Specific simulation parameters are shown in Table 1. Table 1 Simulation Parameters
[0072] The reference flow field data is generated by calculating the inlet turbulent flow rate based on the atmospheric boundary layer parameters, as shown in formulas (6), (7), and (8): (6) (7) (8) in, For friction speed, For von Kármán's constant, For reference height, the incoming air velocity For reference height, The length of the surface roughness. As the reference turbulent kinetic energy, for Model coefficients For turbulent dissipation rate, To calculate the height of the point, Ground reference height, The value is the natural logarithm. The final output includes reference flow field data containing velocity vector field, pressure field, reference turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient.
[0073] Step S502: The reference flow field data is mapped from the computational grid to the regular grid using the resampling operator, and samples larger than a preset threshold are removed to form supervised label data.
[0074] Specifically, the resampling operator is a core tool for data transformation that interpolates and maps the original non-uniform computational grid within a computational fluid dynamics simulation to the uniform, regular 3D grid space required by the 3D convolutional neural network to be trained. The preset threshold is a pre-set numerical upper limit used to automatically identify and intercept divergent or anomalous flow field samples before training. The supervision label data refers to the processed and saved physical ground truth matrix specifically used to provide a benchmark for backpropagation error comparison to the 3D convolutional neural network to be trained.
[0075] The baseline flow field data is mapped from the computational grid to the regular grid using a resampling operator, and divergent or abnormal samples are removed by threshold filtering to form a supervised label data channel.
[0076] Step S503: Determine the wind speed scaling ratio based on the preset ratio of target wind speed to reference wind speed, and scale the monitoring label data according to the wind speed scaling ratio to obtain flow field data.
[0077] Specifically, the preset target wind speed refers to the absolute value of the new wind speed expected to be generated in order to reuse existing flow field conditions to expand the training library. The wind speed scaling ratio refers to the scaling constant between the target wind speed and the reference wind speed of the original reference flow field condition.
[0078] The wind speed scaling ratio is determined based on the ratio of the preset target wind speed to the reference wind speed. ,in, For the preset target wind speed, Using the reference wind speed, the existing converged flow field is initialized and scaled according to a similar ratio, and the supervision label data is scaled according to the wind speed scaling ratio to obtain the flow field data, as shown in formulas (9), (10), (11), (12), and (13): (9) (10) (11) (12) (13) in, This is the wind speed scaling factor; These are the monitoring label data for the baseline operating condition, namely velocity, pressure, baseline turbulent kinetic energy, dissipation rate, and turbulent viscosity coefficient. Initialize the flow field data for the new operating conditions obtained after reuse scaling.
[0079] This embodiment provides a method for predicting wind fields in complex terrain. By using Reynolds-averaged time-of-flight (RAF) simulations of various terrains including mountains, canyons, and hills, a baseline flow field data including velocity vector field, pressure field, baseline turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient is generated. After resampling and mapping, outliers are removed by thresholding, and the supervised label data is scaled using a wind speed scaling ratio to obtain the flow field data. This discrete-synthetic data technology not only ensures the high-fidelity physical-fluid dynamics credibility of the underlying training sample set through RAF simulation, but also cleverly utilizes the wind speed scaling ratio to achieve cross-condition and multi-wind-speed reuse of existing converged flow fields. This expands the global flow field feature training database at low cost and high quality without the need for large-scale and expensive field observations.
[0080] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 5 This is a diagram illustrating the training process of a three-dimensional convolutional neural network according to an embodiment of the present invention, such as... Figure 5 As shown, Figure 5 The diagram records the decrease and convergence trajectory of the training set loss and validation set loss of the 3D convolutional neural network over a given 200 training epochs. The magnified area in the figure reflects the state of stable convergence and minimal training error (less than 0.025) as the weight parameters are iteratively optimized, demonstrating the reliability of the model optimization. The process includes the following steps: Step S601: Combine the preset training terrain distance field, training wind speed data, and training observation mask into a training input set.
[0081] Specifically, the preset training terrain distance field refers to the three-dimensional distance matrix pre-read from the offline sample database for extracting terrain features in the training batch. Training wind speed data refers to the wind measurement data of different modes included in the corresponding training batch. The training observation mask refers to the channel matrix used to assist in identifying the status of feature points during the training process. The training input set refers to the composite input feature data block composed of the above channel features merged and concatenated according to a fixed format, which is used by the three-dimensional convolutional neural network to be trained for weight learning.
[0082] Based on the framework configuration requirements of the three-dimensional convolutional neural network to be trained, its input and output channels are dynamically determined according to the task configuration, as shown in formulas (14) and (15): (14) (15) in, Input the number of network channels. Enable channel indication, enable fetching Not enabled ,constant Corresponding terrain channel, i.e., training terrain distance field; Number of network output channels, a constant. Corresponding to the three velocity components, Enable the indicator value for the corresponding physical quantity output.
[0083] Meanwhile, the three-dimensional convolutional neural network to be trained adopts a three-dimensional encoder-decoder structure, including a downsampling convolution module, an upsampling module, and optional skip connections. Skip connections refer to the U-Net (U-shaped Network) network structure design that stores the output features of the encoder layer in the corresponding layer of the decoder and concatenates them with the upsampling features in the channel dimension. The encoder consists of multiple layers of three-dimensional convolutions, each layer containing convolution, activation, and pooling operations. The pooling uses max pooling with a stride of 2, and the spatial resolution is halved for each layer. The number of channels satisfies the layer-by-layer doubling formula, as shown in formula (16): (16) in, The number of channels per layer, This represents the number of channels on the first floor. As the channel multiplier, This is the layer number. The decoder consists of multiple upsampled convolutions. Each layer is first upsampled by a factor of 2 using nearest-neighbor interpolation, then concatenated with the skip features of the corresponding layer in the encoder, and then processed through two more convolutions. The last layer does not apply an activation function. The encoder convolution kernel size is... The decoder convolution kernel size is The encoder uses symmetrical copy padding, while the decoder uses asymmetric copy padding to ensure that the spatial dimensions remain unchanged after convolution. Finally, the preset training terrain distance field, training wind speed data, and training observation mask are combined in the channel dimension to form the training input set.
[0084] Step S602: Randomly translate, rotate, flip and subdomain sample the training input set to obtain an enhanced training input set. The rotation process includes rotating the horizontal wind speed component of the training wind speed data in the training input set according to a preset rotation transformation formula.
[0085] Specifically, the enhanced training input set refers to a dataset with enhanced data diversity obtained by performing spatial geometric transformations and random truncation on the original batch of training samples. The preset rotation transformation formula refers to a pre-constructed trigonometric function matrix transformation equation used to realize the synchronous rotational mapping of the wind speed vector with the coordinate system in a two-dimensional plane.
[0086] The training input set is subjected to random translation, rotation, flipping, and subdomain sampling processing online. Gaussian noise and bias can be superimposed on the input observations, and unobserved cells are smoothed by zero-filling, mean-filling, or linear / nearest neighbor interpolation to obtain an enhanced training input set. Among them, the rotation process includes rotating the horizontal wind speed component of the training wind speed data in the training input set according to the preset rotation transformation formula, as shown in formula (17): (17) in, The horizontal wind speed component before rotation. The horizontal wind speed component after rotation. It is the plane rotation angle.
[0087] Step S603: The enhanced training input set is input into the three-dimensional convolutional neural network to be trained for forward propagation to obtain the prediction tensor.
[0088] Specifically, the 3D convolutional neural network to be trained refers to the initial network body in which the network layers and channel structure have been completed, but the set of internal weight parameters has not yet been optimized through backpropagation loss function convergence. The prediction tensor refers to the intermediate result of the 3D flow field feature prediction output by the 3D convolutional neural network to be trained in a single inference process for the current batch of input set.
[0089] The enhanced training input set is fed into the three-dimensional convolutional neural network to be trained for forward propagation computation, and the output is a prediction tensor that covers the entire field and contains the predicted wind speed features.
[0090] Step S604: Calculate the mean squared error loss between the prediction tensor and the corresponding supervised label data, and optimize the weight parameters of the three-dimensional convolutional neural network to be trained based on the mean squared error loss until the three-dimensional convolutional neural network to be trained converges, thus obtaining the pre-trained three-dimensional convolutional neural network.
[0091] Specifically, mean squared error loss refers to the average of the squared errors of the physical features at each location in the fluid domain grid, used to quantify the difference between the predicted tensor and the supervised label data (which serves as the true answer). Weight parameters refer to the feature response coefficient matrix contained within the convolutional kernels of each network layer, which is numerically updated and iterated using the gradient descent algorithm.
[0092] Calculate the mean squared error loss between the predicted tensor and the corresponding supervised label data, where the loss function is in a composable form, as shown in formula (18): (18) (19) in, For the total loss, For the index of the loss component, For the first The item can learn weight parameters. It is a natural constant. To sum over all loss terms, For the first One basic loss term. When excluding terrain voxels, the L2 squared loss, i.e., the mean squared error loss, is used. ,Depend on Predicted vector That is, the prediction tensor and the corresponding label vector. That is, the supervised label data is calculated to obtain, fluid domain region The sample size calculated internally.
[0093] The specific parameter selections for the 3D convolutional neural network to be trained are shown in Table 2. The training optimizer is selected from Adam (Adaptive Moment Estimation), RAdam, or Ranger. The training error is less than 0.025 when the model converges stably. Table 2 Neural Network Training Parameters
[0094] The weight parameters of the 3D convolutional neural network to be trained are optimized based on the mean squared error loss until the 3D convolutional neural network to be trained converges, thus obtaining the pre-trained 3D convolutional neural network.
[0095] This embodiment provides a method for predicting wind fields in complex terrain. By limiting the pre-trained 3D convolutional neural network to a 3D encoder-decoder structure, and utilizing training terrain distance field, training wind speed data, and training observation masks through translation, rotation, flipping, and subdomain sampling enhancements, the mean squared error loss between the prediction tensor and the supervision label data is calculated to optimize the weight parameters until convergence. The 3D encoder-decoder network can achieve hierarchical extraction and lossless reconstruction of macroscopic features of large-scale flow fields in 3D space into microscopic fine wind fields. Combined with online data augmentation, especially the rotation transformation formula correction for horizontal wind speed components, the generalization ability and noise robustness of the model are enhanced, ensuring that the trained 3D convolutional neural network has extremely high fitting accuracy and convergence stability.
[0096] In one optional implementation, step S104 includes: Step S701: Input the terrain distance field into the sign function to obtain the fluid domain mask. The indicator value inside the terrain in the fluid domain mask is zero, and the indicator value of the fluid domain is one.
[0097] Specifically, the sign function refers to a step function used to extract the positive and negative properties of distance values. Here, it is used to force a truncated binary output of the continuously changing terrain distance field.
[0098] By inputting the terrain distance field into the sign function, the fluid domain mask is obtained, as shown in formula (20): (20) in, For fluid domain masking, For symbolic functions. Terrain interior. ,lead to Fluid domain ,lead to Therefore, the indicator value inside the terrain in the fluid domain mask is zero, and the indicator value of the fluid domain is one.
[0099] Step S702: Perform element-wise multiplication of the fluid domain mask and the prediction output tensor to obtain the wind field prediction result for the region to be predicted.
[0100] The fluid domain mask and the predicted output tensor are multiplied element-wise, as shown in Equation (21): (twenty one) in, To obtain the wind field prediction results for the area to be predicted, For fluid domain masking, For element-wise multiplication, For parameters The pre-trained 3D convolutional neural network mapping, For network parameter set, The input tensor is used. This constraint ensures that the predicted value inside the terrain is zero, satisfying the no-penetration boundary condition. When sparse convolution is enabled, the first convolution layer excludes the terrain distance field channel and generates an active mask only based on the wind speed data channel, ensuring that the convolution output of the terrain region is zero, thus achieving submanifold sparse convolution.
[0101] This embodiment provides a method for predicting wind fields in complex terrain. By specifically defining and utilizing a symbolic function, the terrain distance field is transformed into a fluid domain mask with an internal terrain indicator value of zero and a fluid domain indicator value of one. This mask is then multiplied element-wise with the prediction output tensor to obtain the wind field prediction result for the region to be predicted. This mathematical constraint mechanism forcibly applies physical reality hard constraints at the very end of the neural network output, ensuring that no false wind speeds or airflows will be generated inside the mountain structure, thus perfectly and powerfully realizing the crucial physical non-penetrating boundary conditions in fluid mechanics within a purely data-driven AI architecture, thereby improving the engineering reliability of the wind field prediction results.
[0102] This embodiment provides a method for predicting wind fields in complex terrain, which can be used in the aforementioned electronic equipment. Figure 6 This is a predicted streamline diagram in hilly terrain according to an embodiment of the present invention. Figure 6 The three-dimensional visualization presents the final result of the predicted area after the network model's output and inverse transformation of the sample scale factor. The figure uses dense spatial wind speed vector arrows to directly show the actual flow pattern, climbing effect, and spatial heterogeneous distribution characteristics of airflow when encountering complex hilly terrain.
[0103] Figure 7 These are comparison charts of prediction and simulation according to embodiments of the present invention. Figure 7 Three data matrices were compared horizontally: (a) the model prediction results of this invention, (b) the true values of the physical CFD simulation, and (c) the calculation error between the model prediction results and the CFD results. This figure shows a detailed comparison along three axes: the X-axis (Velocity X), Y-axis (Velocity Y), and Z-axis (Velocity Z), visually verifying that this invention can still accurately predict CFD simulation results without relying on global boundary conditions.
[0104] Step S801: Obtain the preset sample scale factor.
[0105] Specifically, the preset sample scaling factor refers to a constant parameter set during the configuration phase to scale and normalize the values of each physical channel in order to prevent large values from causing the gradient of the pre-trained 3D convolutional neural network to collapse.
[0106] Obtain the preset sample scale factor to prepare for scale recovery of the model output results.
[0107] Step S802: Perform an inverse transformation on the wind field prediction results based on the sample scale factor to obtain the three-dimensional volume-averaged wind speed and actual turbulent kinetic energy.
[0108] Specifically, the three-dimensional volume-averaged wind speed refers to the actual vector data of airflow velocity obtained by averaging within the three-dimensional physical grid voxel space. The actual turbulent kinetic energy refers to the value of the turbulent fluctuation index at the true physical scale, which is reflected by the normalized tensor prediction value after being inversely amplified and restored by the sample scale factor.
[0109] If automatic scale normalization is enabled, the wind field prediction results are subjected to inverse scale recovery transformation according to the channel based on the sample scale factor, as shown in formulas (22), (23), (24), (25), and (26): (twenty two) (twenty three) (twenty four) (25) (26) in, The sample scaling factor; These are the raw quantities of velocity, pressure, actual turbulent kinetic energy, dissipation rate, and turbulent viscosity coefficient, respectively. All values are normalized. The inverse transformation yields the three-dimensional volume-averaged wind speed and the actual turbulent kinetic energy.
[0110] Table 3 shows the comparison between the predicted results of this invention and the computational fluid dynamics simulation results after the prediction is restored: Table 3 Comparison of Predicted Results and Simulation Results - Errors
[0111] Compared with the computational fluid dynamics simulation results, the predicted wind speed vectors have an RMSE (Root Mean Square Error) of no less than 0.6 m / s, with an average value of only 0.497 m / s across all prediction channels, and the correlation coefficient is also low. The value is as high as 0.996. Computational fluid dynamics simulations under different terrains take about 2 hours each time, while the total time for the model of this invention to predict the wind field of a single terrain is 1 to 2 minutes. This time overhead mainly occurs in the early startup stages such as computing environment initialization, memory allocation, and model weight loading. In batch prediction mode, the average time for the model to complete the reconstruction of the three-dimensional wind field of a single terrain condition is about 0.1 seconds.
[0112] This embodiment provides a method for predicting wind fields in complex terrain. After obtaining the wind field prediction results for the area to be predicted, a preset sample scale factor is acquired, and the wind field prediction results are inversely transformed according to the sample scale factor to finally restore the three-dimensional volume average wind speed and actual turbulent kinetic energy. This dimensionless inverse transformation mechanism can accurately and losslessly restore and amplify the intermediate abstract values that are normalized in the neural network to avoid numerical gradient explosion or dissipation back to the real physical quantity scales such as meters per second and square seconds per second squared in nature. This can directly provide intuitive and high-precision data support for application scenarios such as wind farm micro-site selection optimization and UAV path planning.
[0113] Figure 8 This is a neural network framework diagram according to an embodiment of the present invention, such as... Figure 8 As shown, the pre-trained 3D convolutional neural network adopts a 3D encoder-decoder structure. Its internal data flow and network framework specifically include: input features, encoder network, bottleneck layer, skip connections, decoder network, and output prediction. The details are as follows: 1. Input features: Figure 8 The input features correspond to the input set. In the initial stage of the network's forward propagation, the terrain distance field, wind speed data, and observation mask are combined in the channel dimension to construct a multi-channel input set, which serves as the starting input data for the entire pre-trained 3D convolutional neural network.
[0114] 2. Encoder Network: Figure 8 The encoder network consists of four sequentially connected downsampling convolutional modules, specifically a first, second, third, and fourth encoding layer. After the input set enters the encoder network, each encoding layer sequentially performs 3D convolution, activation, and pooling operations. The encoder convolution kernel size is set to... Symmetrical copying and padding are employed; max pooling with a stride of 2 is used, resulting in a halving of the 3D spatial resolution with each encoding layer. Simultaneously, the number of feature channels in the encoder network satisfies a layer-by-layer doubling formula. This allows for the extraction and enhancement of deep spatial characteristics of the wind field while gradually reducing the spatial size.
[0115] 3. Bottleneck layer: Figure 8 The bottleneck layer is located between the bottom of the encoder network and the beginning of the decoder network, and is used to transition and reconstruct the very deep features output by the fourth coding layer. When the fully connected bottleneck layer is not used, the bottleneck layer is replaced by two three-dimensional convolutional layers, with the number of channels increasing and then decreasing. When the fully connected bottleneck layer is used, the features output by the fourth coding layer are flattened, compressed by two fully connected layers, and then restored to a three-dimensional mesh structure before being fed into the subsequent networks.
[0116] 4. Skip-connection and decoder network: Figure 8 The decoder network consists of four sequentially connected upsampled convolutional modules, specifically the fourth decoding layer, the third decoding layer, the second decoding layer, and the first decoding layer, which are restored layer by layer from the bottom layer to the top layer according to the information flow.
[0117] Meanwhile, the skip connections shown by the dashed lines in the figure are used to pass spatial details across layers. When skip connections are enabled, the output features of each layer of the encoder network are preserved and concatenated with the upsampled features at the corresponding layer of the decoder network in the channel dimension to form a complete U-Net structure.
[0118] In each layer of the decoder network, the features are first upsampled by a factor of 2 using nearest-neighbor interpolation to increase spatial resolution. They are then concatenated with the corresponding coding layer features received via skip connections. The concatenated features are then processed through two convolutional layers. The decoder convolutional kernel size is set to... Asymmetric copy padding is used to ensure that the spatial dimensions remain unchanged after convolution.
[0119] 5. Output Prediction: Figure 8 The output prediction in this context corresponds to the final prediction output tensor generated by the network in the aforementioned implementation steps. In the decoder network, the last layer, i.e., the very end of the first decoding layer, does not apply an activation function and directly outputs a three-dimensional flow field feature matrix with the number of channels aligned with the prediction task. This prediction output tensor contains normalized features such as wind speed components at each grid location. After outputting the network, the system performs element-wise multiplication constraints on the prediction output tensor based on the fluid domain mask, thereby forcibly cutting off the prediction values within the terrain, ultimately generating a high-resolution wind field prediction result for the area to be predicted.
[0120] This embodiment also provides a complex terrain wind field prediction device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described previously. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0121] This embodiment provides a wind field prediction device for complex terrain, such as Figure 9 As shown, it includes: The acquisition module 901 is used to acquire wind speed data for the area to be predicted and to construct a terrain distance field.
[0122] The generation module 902 is used to generate an observation mask based on the wind speed data.
[0123] The input module 903 is used to input the terrain distance field, the wind speed data and the observation mask as input sets into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain a predicted output tensor. The pre-trained three-dimensional convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation.
[0124] The constraint module 904 is used to obtain a fluid domain mask based on the terrain distance field, and to constrain the prediction output tensor based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted.
[0125] In some alternative implementations, a wind field prediction device for complex terrain further includes: The terrain occupancy volume construction unit is used to acquire terrain data of the area to be predicted and construct a terrain occupancy volume on a regular grid based on the terrain data; the terrain occupancy volume is used as a terrain mask to represent the occupancy state of the terrain in three-dimensional space.
[0126] A fluid domain Boolean mask generation unit is used to generate a fluid domain Boolean mask based on the terrain mask.
[0127] A terrain distance field construction unit is used to apply an Euclidean distance transformation to the fluid domain Boolean mask to obtain a terrain distance field, wherein the terrain distance field includes multiple voxels, and the value of each voxel represents the Euclidean distance from the voxel to the nearest terrain surface.
[0128] In some alternative implementations, the generation module 902 includes: An initial mask marking unit is used to obtain a grid position of the sparse wind speed data in the area to be predicted at a preset ratio when the wind speed data is sparse wind speed data, and to mark the grid position as an initial mask.
[0129] The observation mask calculation unit is used to obtain the terrain mask corresponding to the initial mask in the terrain distance field, and to use the product of the initial mask and the terrain mask as the observation mask of the sparse wind speed data.
[0130] In some alternative implementations, the input module 903 includes: The first unit for obtaining the predicted output tensor is used to combine the terrain distance field, the sparse wind speed data, and the observation mask into a first input set when the wind speed data is sparse wind speed data, and input the first input set into the pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
[0131] The second unit for obtaining the predicted output tensor is used to generate a non-sparse wind speed component based on the non-sparse wind speed data when the wind speed data is non-sparse wind speed data, combine the terrain distance field and the non-sparse wind speed component into a second input set, and input the second input set into the pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
[0132] In some alternative implementations, a wind field prediction device for complex terrain further includes: The reference flow field data generation unit is used to perform computational fluid dynamics simulations on various terrains using Reynolds averages to generate reference flow field data. The various terrains include mountains, canyons, and hills. The reference flow field data includes velocity vector field, pressure field, reference turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient.
[0133] The supervised label data forming unit is used to map the reference flow field data from the computational grid to the regular grid using a resampling operator, and to remove samples larger than a preset threshold to form supervised label data.
[0134] The flow field data scaling unit is used to determine the wind speed scaling ratio based on the preset ratio of the target wind speed to the reference wind speed, and to scale the supervision label data according to the wind speed scaling ratio to obtain flow field data.
[0135] The training input set combination unit is used to combine the preset training terrain distance field, training wind speed data, and training observation mask into a training input set.
[0136] The training wind speed data conversion unit is used to perform random translation, rotation, flipping and subdomain sampling processing on the training input set to obtain an enhanced training input set. The rotation process includes rotating the horizontal wind speed component of the training wind speed data in the training input set according to a preset rotation transformation formula.
[0137] The prediction tensor prediction unit is used to input the enhanced training input set into the three-dimensional convolutional neural network to be trained for forward propagation to obtain the prediction tensor.
[0138] A pre-trained 3D convolutional neural network construction unit is used to calculate the mean squared error loss between the prediction tensor and the corresponding supervision label data, and to optimize the weight parameters of the 3D convolutional neural network to be trained based on the mean squared error loss until the 3D convolutional neural network to be trained converges, thereby obtaining the pre-trained 3D convolutional neural network.
[0139] In some alternative implementations, the constraint module 904 includes: The fluid domain masking unit is used to input the terrain distance field into a sign function to obtain a fluid domain mask, wherein the indicator value inside the terrain is zero and the indicator value of the fluid domain is one.
[0140] The wind field prediction result calculation unit is used to perform element-wise multiplication of the fluid domain mask and the prediction output tensor to obtain the wind field prediction result of the region to be predicted.
[0141] In some alternative implementations, a wind field prediction device for complex terrain further includes: The sample scaling factor acquisition unit is used to acquire the preset sample scaling factor.
[0142] The three-dimensional volume-average wind speed and actual turbulent kinetic energy transformation unit is used to perform inverse transformation on the wind field prediction results based on the sample scale factor to obtain the three-dimensional volume-average wind speed and actual turbulent kinetic energy.
[0143] The complex terrain wind field prediction device provided in this embodiment of the invention can execute a complex terrain wind field prediction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.
[0144] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0145] The following is a detailed reference. Figure 10 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from memory 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device. The processor 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0146] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; memory devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 10Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0147] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 1009, or installed from a memory 1008, or installed from a ROM 1002. When the computer program is executed by the processor 1001, it performs the functions defined in the complex terrain wind field prediction method of the embodiments of the present invention.
[0148] Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0149] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, it implements the complex terrain wind field prediction method shown in the above embodiments.
[0150] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0151] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for predicting wind fields in complex terrain, characterized in that, The method includes: Obtain wind speed data for the area to be predicted and construct a terrain distance field; Generate an observation mask based on the wind speed data; The terrain distance field, the wind speed data, and the observation mask are used as input sets and fed into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor. The pre-trained three-dimensional convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation. The fluid domain mask is obtained based on the topographic distance field, and the prediction output tensor is constrained based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted.
2. The method according to claim 1, characterized in that, The terrain distance field is constructed in the following manner: The terrain data of the area to be predicted is obtained, and a terrain occupancy volume is constructed on a regular grid based on the terrain data; the terrain occupancy volume is used as a terrain mask to represent the occupancy state of the terrain in three-dimensional space. Generate a fluid domain Boolean mask based on the terrain mask; Applying an Euclidean distance transformation to the fluid domain Boolean mask yields a terrain distance field, wherein the terrain distance field comprises multiple voxels, and the value of each voxel represents the Euclidean distance from the voxel to the nearest terrain surface.
3. The method according to claim 2, characterized in that, The wind speed data is either sparse wind speed data or non-sparse wind speed data; Generate an observation mask based on the wind speed data, including: When the wind speed data is sparse wind speed data, obtain the grid positions of the sparse wind speed data in the area to be predicted at a preset ratio, and mark the grid positions as the initial mask; Obtain the terrain mask corresponding to the initial mask in the terrain distance field, and use the product of the initial mask and the terrain mask as the observation mask for the sparse wind speed data.
4. The method according to claim 3, characterized in that, The terrain distance field, the wind speed data, and the observation mask are used as input sets and fed into a pre-trained 3D convolutional neural network for forward propagation to obtain a predicted output tensor, including: When the wind speed data is sparse wind speed data, the terrain distance field, the sparse wind speed data and the observation mask are combined into a first input set, and the first input set is input into the pre-trained three-dimensional convolutional neural network for forward propagation to obtain the prediction output tensor. When the wind speed data is non-sparse wind speed data, a non-sparse wind speed component is generated based on the non-sparse wind speed data. The terrain distance field and the non-sparse wind speed component are combined into a second input set, and the second input set is input into the pre-trained three-dimensional convolutional neural network for forward propagation to obtain the predicted output tensor.
5. The method according to claim 1, characterized in that, The flow field data is generated in the following manner: Computational fluid dynamics simulations were performed on various terrains using Reynolds average time to generate baseline flow field data. These terrains included mountains, valleys, and hills. The baseline flow field data included velocity vector field, pressure field, baseline turbulent kinetic energy, turbulent dissipation rate, and turbulent viscosity coefficient. The reference flow field data is mapped from the computational grid to a regular grid using a resampling operator, and samples larger than a preset threshold are removed to form supervised label data; The wind speed scaling ratio is determined based on the preset ratio of target wind speed to reference wind speed, and the monitoring label data is scaled according to the wind speed scaling ratio to obtain flow field data.
6. The method according to claim 5, characterized in that, The pre-trained 3D convolutional neural network adopts a 3D encoder-decoder structure; The pre-trained 3D convolutional neural network is trained in the following manner: The preset training terrain distance field, training wind speed data, and training observation mask are combined into a training input set; The training input set is subjected to random translation, rotation, flipping and subdomain sampling to obtain an enhanced training input set. The rotation process includes rotating the horizontal wind speed component of the training wind speed data in the training input set according to a preset rotation transformation formula. The enhanced training input set is fed into the three-dimensional convolutional neural network to be trained for forward propagation to obtain the prediction tensor; Calculate the mean squared error loss between the predicted tensor and the corresponding supervised label data, and optimize the weight parameters of the three-dimensional convolutional neural network to be trained based on the mean squared error loss until the three-dimensional convolutional neural network to be trained converges, thereby obtaining a pre-trained three-dimensional convolutional neural network.
7. The method according to claim 1, characterized in that, The fluid domain mask is obtained based on the topographic distance field, and the prediction output tensor is constrained based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted, including: The terrain distance field is input into the sign function to obtain the fluid domain mask, in which the indicator value inside the terrain is zero and the indicator value of the fluid domain is one; The wind field prediction result for the region to be predicted is obtained by performing element-wise multiplication of the fluid domain mask and the prediction output tensor.
8. The method according to claim 1, characterized in that, After obtaining the wind field prediction results for the area to be predicted, the method further includes: Obtain the preset sample scaling factor; The wind field prediction results are inversely transformed based on the sample scale factor to obtain the three-dimensional volume-average wind speed and actual turbulent kinetic energy.
9. A wind field prediction device for complex terrain, characterized in that, The device includes: The acquisition module is used to acquire wind speed data for the area to be predicted and to construct a terrain distance field; The generation module is used to generate an observation mask based on the wind speed data; The input module is used to input the terrain distance field, the wind speed data and the observation mask as input sets into a pre-trained three-dimensional convolutional neural network for forward propagation to obtain a predicted output tensor. The pre-trained three-dimensional convolutional neural network is trained using flow field data generated by computational fluid dynamics simulation. The constraint module is used to obtain a fluid domain mask based on the terrain distance field, and to constrain the prediction output tensor based on the fluid domain mask to obtain the wind field prediction result for the region to be predicted.
10. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform a method for predicting wind fields in complex terrain as described in any one of claims 1 to 8.