Method for quickly calculating geometric parameters of airfoil profile based on image enhancement and attention mechanism

Through the convolutional neural network model based on image enhancement and attention mechanism, the geometric parameters are calculated directly from the two-dimensional image of the airfoil, which solves the problem of difficult to obtain the geometric parameters of the airfoil inverse design in the existing technology, and improves the airfoil design and data Efficiency and quality of excavation.

CN118607147APending Publication Date: 2024-09-06ZHEJIANG UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410752508.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The existing airfoil inverse design method based on deep learning is difficult to directly obtain geometric parameters, and the conversion efficiency between different airfoil databases is low, which limits the quality of airfoil design and data mining.

Method used

Using a convolutional neural network model based on image enhancement and attention mechanism, by constructing a multi-source enhanced sample set of signed distance function images and geometric parameters, the convolutional neural network model for solving airfoil parameters is trained, including learnable image compression The device, the residual network and the regressor module that fuse the channel-spatial attention mechanism realize rapid calculation of airfoil geometric parameters.

Benefits of technology

It achieves the direct acquisition of geometric parameters from the two-dimensional image of the airfoil, improves the closed-loop verification of the airfoil inverse design process and the conversion efficiency between different databases, and improves the quality of airfoil design and data mining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607147A
    Figure CN118607147A
Patent Text Reader

Abstract

The invention provides an airfoil profile geometric parameter rapid calculation method based on image enhancement and an attention mechanism, and relates to the field of airfoil profile design. The method comprises the following steps: constructing a multi-source enhanced sample set; and constructing a convolutional neural network model based on an attention mechanism and used for airfoil profile parameter solving, performing training, and performing airfoil profile geometric parameter calculation by using the trained target model. The learnable image compressor module is utilized, the image size is reduced, the training cost is reduced, and meanwhile feature information is reserved as much as possible; an attention mechanism is utilized to capture an image global feature distribution mechanism, the neural network model training efficiency and the geometric parameter solving speed are improved, the airfoil profile geometric parameters are obtained directly based on the airfoil profile two-dimensional image, closed-loop verification of the airfoil profile inverse design process can be achieved, and the accuracy of airfoil profile design is improved. And the conversion efficiency among different forms of airfoil profile databases can be improved, and the airfoil profile design and data mining quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of airfoil design, and in particular to a method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism. Background Art

[0002] The optimization design of two-dimensional airfoils is an important part of the design of aerodynamic product components such as wings, wind turbine blades, and turbine blades. Its geometric shape will directly affect the aerodynamic performance of the product. The airfoil optimization design methods include the traditional proxy model forward design method and the inverse design method. The inverse design method gives a target pressure coefficient distribution that meets the design requirements, obtains a new airfoil by adding geometric perturbations to the initial basic airfoil, and obtains an airfoil design that meets the requirements by minimizing the difference between the pressure coefficient distribution of the new airfoil and the target pressure coefficient distribution. The key to this type of method is that the designer needs to provide a reasonable pressure coefficient distribution, and the optimization process is also quite dependent on design experience. In recent years, with the rapid development of deep learning methods, some scholars have applied the data-driven method of neural networks to the field of airfoil inverse design, which has become a popular research direction. For example, Sekar et al. first proposed an inverse design method in 2019 in the paper “Inverse Design of Airfoil Using a Deep Convolutional Neural Network” in the AIAA Journal, which takes the pressure distribution coefficient image under fixed angle of attack and Reynolds number as input, and reversely predicts the coordinates of discrete points of the airfoil shape that meet its aerodynamic conditions through deep convolutional neural network; then, in response to the defect of the pressure coefficient distribution design in the inverse design problem of supercritical airfoils relying on design experience, Lei et al. proposed a multi-stage inverse design method in the paper “Deep learning based multistage method for inverse design” in Aerospace Science and Technology in 2021, which first uses an adversarial neural network to generate a physically achievable target pressure distribution image, and then uses a deep convolutional neural network to obtain the coordinates of discrete points of the airfoil that meet the target. However, the final design scheme of the current deep learning-based inverse design method is in the form of two-dimensional coordinates of several discrete points on the airfoil, and the geometric parameter level of the airfoil is not further obtained.

[0003] In addition, a variety of open-source airfoil databases have been established, including the UIUC airfoil database, the NACA airfoil database, etc., but the airfoil data in their databases are not in the same unified form, including discrete point coordinates, control point coordinates, or various parameterized forms such as CST and PARSEC. Traditional airfoil parameter conversion work includes parameterization, discretization, and genetic algorithm reconstruction to obtain the target form of blade parameters. The process is computationally intensive and extremely time-consuming, which limits the development of data mining research on airfoils. Summary of the invention

[0004] The purpose of the present invention is to provide a method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism, which can directly obtain the airfoil geometric parameters from the two-dimensional image of the airfoil. It can not only realize the closed-loop verification of the airfoil inverse design process, but also improve the conversion efficiency between different forms of airfoil databases and improve the quality of airfoil design and data mining.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism, the method comprising:

[0007] constructing a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image;

[0008] A convolutional neural network model based on an attention mechanism for solving airfoil parameters is constructed as a target model; the convolutional neural network model based on the attention mechanism includes: a learnable image compressor module, a residual network module fused with a channel-space attention mechanism, and a regressor module; wherein the learnable image compressor module is used to reduce the dimension of the features of the signed distance function image to generate a compressed image; the residual network module fused with the channel-space attention mechanism is used to perform feature extraction and attention calculation on the compressed image to generate fused features; the regressor module is used to perform regression calculation on the fused features to obtain the model computational geometry parameters corresponding to the signed distance function image;

[0009] Using the multi-source enhanced sample set to train the target model to obtain a trained target model;

[0010] The trained target model is used to calculate the airfoil geometric parameters.

[0011] Optionally, constructing a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image specifically includes:

[0012] Obtain multiple standard airfoil parameter samples from the UIUC standard airfoil dataset;

[0013] According to the plurality of standard airfoil parameter samples, a plurality of simulated airfoil parameter samples are obtained by using a CTGAN self-supervised network learning method;

[0014] The various geometric parameters of each standard airfoil parameter sample are randomly sampled by the Latin hypercube random sampling method to obtain a plurality of randomly generated airfoil parameter samples;

[0015] A signed distance function is used to calculate the signed minimum two-norm distance between each pixel point in the airfoil image of each airfoil parameter sample in the target sample set and the airfoil profile, as a feature of each pixel point, to obtain a signed distance function image corresponding to the airfoil image; the target sample set includes a plurality of airfoil parameter samples, and the airfoil parameter samples are standard airfoil parameter samples, simulated airfoil parameter samples, or randomly generated airfoil parameter samples;

[0016] A multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image is constructed.

[0017] Optionally, the signed distance function is:

[0018]

[0019] Where Z represents the set of points on the airfoil curve contour, Π Ω (i',j') represents the function describing the relationship between point (i',j') and the boundary of the airfoil curve contour, (i',j') is a point on the airfoil curve contour, D(i,j) represents the signed distance function of point (i,j) with respect to the airfoil curve contour, (i,j) is a point in the airfoil image, min||(i,j)-(i',j')|| represents finding the minimum bi-norm distance from point (i,j) to the airfoil curve contour, sign(Π Ω (i,j)) represents the sign function describing whether the point (i,j) is outside or inside the airfoil curve contour, ∏ Ω (i, j) represents the function describing the relationship between point (i, j) and the boundary of the airfoil curve contour. When point (i, j) is within the airfoil curve contour, Π Ω (i,j)<0, point (i,j) is outside the airfoil curve contour Π Ω (i,j)>0, only Π Ω (i, j) = 0 means that point (i, j) is on the airfoil curve contour, and the set of pixel points recorded on the contour is Ω.

[0020] Optionally, the learnable image compressor module includes: a backbone path and a direct path;

[0021] The trunk path includes: a first convolutional layer, a first LeakyReLU activation function layer, a second convolutional layer, a second LeakyReLU activation function layer, a first batch normalization layer, a first linear interpolation scaler, a residual module, a first adder, a third convolutional layer and a second adder;

[0022] The direct path includes: a second linear interpolation scaler;

[0023] Among them, the first convolution layer, the first LeakyReLU activation function layer, the second convolution layer, the second LeakyReLU activation function layer, the first batch normalization layer, the first linear interpolation scaler and the residual module are connected in sequence, the output end of the residual module is connected to an input end of the first adder, the output end of the first adder is connected to the input end of the third convolution layer; the output end of the third convolution layer is connected to an input end of the second adder; the output end of the first batch normalization layer is also connected to another input end of the first adder;

[0024] The output terminal of the second linear interpolation scaler is connected to another input terminal of the second adder, and the output terminal of the second adder is used to output the compressed image;

[0025] The input ends of the first convolution layer and the second linear interpolation scaler are both used to input the signed distance function image.

[0026] Optionally, the residual module includes a first residual layer, a second residual layer, a fourth convolutional layer and a second batch normalization layer connected in sequence.

[0027] Optionally, the residual network module integrating the channel-spatial attention mechanism includes: a preprocessing block and a plurality of residual attention modules connected in sequence;

[0028] The preprocessing block is connected to a first residual attention module among a plurality of residual attention modules connected in sequence;

[0029] The residual attention module includes: a residual block and a first CBAM attention block connected to the residual block; the first CBAM attention block includes a channel attention layer and a spatial attention layer connected in sequence.

[0030] Optionally, the residual block includes a third residual layer, a second CBAM attention block and a fourth residual layer connected in sequence.

[0031] Optionally, the loss function for training the target model is:

[0032]

[0033] Among them, TotalLoss is the total loss function, MAE and L2 are the mean absolute error and L2 regularization term, N and K are the number of samples and the number of neurons in the target model, respectively. n and are the true geometric parameters and model calculated geometric parameters corresponding to the signed distance function image of the nth sample in the multi-source enhanced sample set, respectively, nk is the weight parameter of the kth neuron in the target model obtained by training with the nth sample.

[0034] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0035] The embodiment of the present invention provides a method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism, the method comprising: constructing a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image; constructing a convolutional neural network model based on the attention mechanism for solving airfoil parameters as a target model; using the multi-source enhanced sample set to train the target model to obtain a trained target model; and using the trained target model to calculate airfoil geometric parameters. The present invention utilizes a learnable image compressor module to reduce the image size and reduce the training cost while retaining feature information as much as possible; utilizes the attention mechanism to capture the global feature distribution mechanism of the image, improves the training efficiency of the neural network model and the speed of solving geometric parameters, and the present invention realizes obtaining airfoil geometric parameters directly based on the two-dimensional image of the airfoil, which can not only realize the closed-loop verification of the airfoil inverse design process, but also improve the conversion efficiency between different forms of airfoil databases, and improve the quality of airfoil design and data mining. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 An overall framework diagram of a method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism provided by an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of a method for constructing a multi-source sample data set provided by an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of the structure of a convolutional neural network model for quickly solving airfoil parameters based on an attention mechanism provided in an embodiment of the present invention;

[0040] Figure 4 This is a comparison example diagram of the airfoil geometric parameter solution results and the original shape provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] The purpose of the present invention is to provide a method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism, which can directly obtain the airfoil geometric parameters from the two-dimensional image of the airfoil. It can not only realize the closed-loop verification of the airfoil inverse design process, but also improve the conversion efficiency between different forms of airfoil databases and improve the quality of airfoil design and data mining.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] like Figure 1 As shown, this embodiment provides a method for quickly calculating airfoil geometric parameters based on image enhancement and attention mechanism, the method comprising:

[0045] Step 101: construct a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image.

[0046] Specifically, the airfoil geometric parameter combinations are first obtained through parameter reconstruction, CTGAN simulation generation and super Latin cube random sampling. From the perspective of sample composition, auxiliary enhanced samples are introduced to improve the solution accuracy of the model for commonly used real airfoils. The KOSTAS parameterization method is used to generate airfoil curves from various geometric parameters, and then the curve image is calculated to obtain the signed distance function graph to enhance the sample quality in the form of an image. The corresponding geometric parameter combinations are used as samples to form a multi-source enhanced sample set for model training.

[0047] Figure 2 Build processes for multi-source sample datasets, such as Figure 2 As shown, the specific steps of the process are as follows:

[0048] Firstly, the UIUC standard airfoil data set was manually screened to obtain a clear part after removing some abnormal data such as duplicate airfoils and incomplete airfoils. Then, the KOSTAS parameterization method was used to fit and reconstruct 1000 groups of standard airfoil samples to enhance the sample data quality. After that, the parameter value distribution of these 1000 groups of standard airfoils was learned using the CTGAN self-supervised network and 4000 groups of simulated standard airfoils were generated, which were used as 5000 groups of enhanced samples to concentrate the design space to the area where common airfoils are located and enhance the solution accuracy. Then, 20000 groups of KOSTAS airfoil parameter samples were obtained as the backbone of the data set through Latin hypercube random sampling, and each sample contained 17 airfoil geometric parameters. After obtaining the above 25000 groups of geometric parameter samples, the KOSTAS parameterization method was used to calculate the corresponding airfoil curves from the 17 geometric parameters for each sample, and the airfoil curve image with a unified coordinate scale was calculated as the signed distance function (Signed Distance Function). Function) form is used to realize sample image enhancement; specifically, the calculation of the signed distance function is to take the airfoil curve as the closed contour in the image, and its formula is:

[0049]

[0050] Among them, Z represents the set of points on the airfoil curve contour, ∏ Ω (i',j') represents the function describing the relationship between point (i',j') and the boundary of the airfoil curve contour, (i',j') is a point on the airfoil curve contour, D(i,j) represents the signed distance function of point (i,j) with respect to the airfoil curve contour, (i,j) is a point in the airfoil image, min||(i,j)-(i',j')|| represents finding the minimum bi-norm distance from point (i,j) to the airfoil curve contour, sign(Π Ω (i, j)) represents the sign function describing whether the point (i, j) is outside or inside the airfoil curve contour, Π Ω (i, j) represents the function describing the relationship between point (i, j) and the boundary of the airfoil curve contour. When point (i, j) is within the airfoil curve contour, Π Ω (i,j)<0, point (i,j) is outside the airfoil curve contour Π Ω (i,j)>0, only Π Ω (i, j) = 0 means that point (i, j) is on the airfoil curve contour, and the set of pixel points recorded on the contour is Ω.

[0051] The signed distance function image of each airfoil is calculated as a feature and the corresponding 17 geometric parameter values ​​are used as labels to form a data set of 25,000 samples for the airfoil parameter calculation neural network model. The 25,000 sample data set is divided into training set, validation set and test set in the ratio of 8:1:1, taking into account both model training verification and generalization testing.

[0052] Step 102, constructing a convolutional neural network model based on an attention mechanism for solving airfoil parameters as a target model; the convolutional neural network model based on the attention mechanism includes: a learnable image compressor module, a residual network module fused with a channel-space attention mechanism, and a regressor module; wherein the learnable image compressor module is used to reduce the dimension of the features of the signed distance function image to generate a compressed image; the residual network module fused with the channel-space attention mechanism is used to perform feature extraction and attention calculation on the compressed image to generate a fused feature; the regressor module is used to perform regression calculation on the fused feature to obtain the model calculation geometry parameters corresponding to the signed distance function image.

[0053] Step 103: Use the multi-source enhanced sample set to train the target model to obtain a trained target model.

[0054] Step 102 and step 103 specifically include: this model takes the data set containing the airfoil image and geometric parameters of the signed distance function as the model input, and the model is composed of a learnable image compressor module, a residual network module integrating the channel-space attention mechanism, and a regressor module; wherein the learnable image compressor module extracts the main features of the sample image to reduce the dimension and generates a compressed image that is easier to train; the channel-space attention module generates an attention feature map by using the convolution layer filtering and the weighted summation of the pooling layer, and fuses it with the high-level feature map extracted by the residual regression backbone network based on ResNet18, that is, the fusion feature; the regressor module realizes the regression calculation from the high-level features to the geometric parameters. During training, the geometric parameters calculated based on the model and the real geometric parameters of the airfoil are used to jointly calculate the corresponding loss function value, and the parameters of each layer are optimized and updated through the back propagation process until the model converges.

[0055] like Figure 3 The structure of the convolutional neural network model for quickly solving airfoil parameters based on the attention mechanism is shown in the figure. Figure 3 (a) is a schematic diagram of the convolutional neural network model structure for quickly solving airfoil parameters based on the attention mechanism. Figure 3 (b) is a schematic diagram of the structure of the residual layer. Figure 3 (c) in is a schematic diagram of the structure of the channel-spatial attention module, as shown in Figure 3 As shown in the figure, according to the model forward propagation order, the model structure and calculation process are as follows:

[0056] 2.1) Input the signed distance function image of the airfoil into the learnable image compressor module of the model to generate a more training-friendly compressed image (i.e. Figure 3 (a) The compressed image in (a).

[0057] 2.2) The compressed image is input into the residual network module of the fused channel-spatial attention mechanism to extract the important features and the high-level feature map fused with the attention mechanism, i.e., the fused features.

[0058] 2.3) The high-level feature map of the geometric airfoil image is input into the regressor module, and the geometric parameters of the airfoil are obtained by regression calculation, thereby completing the rapid calculation of the geometric parameters based on the airfoil image.

[0059] 2.4) The model-calculated geometric parameters and their true geometric parameters are input into the loss function, the loss function value is calculated, and the network parameters of the geometric parameter calculation model (i.e., the target model) are updated through the loss function value until the model converges.

[0060] The learnable image compressor module in step 2.1) includes a trunk path and a direct path, such as Figure 3 As shown in (a); the trunk path includes a first convolution layer, a first LeakyReLU activation function layer, a second convolution layer, a second LeakyReLU activation function layer, a first batch normalization layer, a first linear interpolation scaler, a residual module, a first adder, a third convolution layer and a second adder; the direct path includes: a second linear interpolation scaler;

[0061] Among them, the first convolution layer, the first LeakyReLU activation function layer, the second convolution layer, the second LeakyReLU activation function layer, the first batch normalization layer, the first linear interpolation scaler and the residual module are connected in sequence, the output end of the residual module is connected to an input end of the first adder, and the output end of the first adder is connected to the input end of the third convolution layer; the output end of the third convolution layer is connected to an input end of the second adder; the output end of the first batch normalization layer is also connected to another input end of the first adder; preferably, the convolution kernel size of the first convolution layer is 7*7, and the convolution kernel size of the second convolution layer is 1*1.

[0062] The output end of the second linear interpolation scaler is connected to another input end of the second adder, and the output end of the second adder is used to output the compressed image.

[0063] The input ends of the first convolutional layer and the second linear interpolation scaler are both used to input the signed distance function image; optionally, the first linear interpolation scaler and the second linear interpolation scaler both use bilinear interpolation, which is implemented through the "bilinear" mode of the image resize() function in the opencv image processing library.

[0064] Preferably, the residual module includes a first residual layer, a second residual layer, a built-in convolutional layer (ie, a fourth convolutional layer) and a built-in batch normalization layer (ie, a second batch normalization layer) which are connected in sequence.

[0065] Preferably, the residual module includes a trunk sub-path and a direct sub-path, wherein the trunk sub-path passes through the first residual layer and the second residual layer in sequence, is filtered by a built-in convolution layer with a convolution kernel size of 3*3, and then input into the built-in batch normalization layer to obtain the trunk sub-path output; the output result of the trunk sub-path is added pixel by pixel to the input of the direct path of the residual module to obtain the output of the residual module.

[0066] As a preferred embodiment, the residual layer structure used in the residual module is as follows: Figure 3 As shown in (b), it contains the first and last two convolutional layers. The first convolutional layer uses a 3*3 convolution kernel to filter and then performs batch normalization. After activation by the LeakyReLu function, it is input into the tail convolutional layer; the tail convolutional layer uses a 3*3 convolution kernel, batch normalizes the convolution filtering result, and then adds it pixel by pixel to the input image of the direct channel to obtain the output of the residual layer.

[0067] Preferably, the third convolution layer of the trunk path adopts a 7*7 convolution kernel, and adds the output of the trunk path after convolution filtering to the output of the linear interpolation scaler direct path pixel by pixel to obtain the compressed image result of the image compressor module; preferably, in order to be compatible with subsequent network modules, the compressed image size is 224*224, which is compatible with the conventional ResNet18 residual network.

[0068] In step 2.2), the channel-spatial attention mechanism module structure is as follows Figure 3As shown in (c) in the figure, it includes a channel attention block and a spatial attention block connected to each other. Since its core is to use convolution operation to extract attention features, they are subsequently referred to as CBAM (Convolutional Block Attention Mechanism) attention blocks. The present invention combines the channel-spatial attention mechanism module with the ResNet18 residual network. Its structure includes a preprocessing block and 4 residual blocks, wherein each residual block is connected with a CBAM attention block. In the embodiment of the present invention, the residual block is connected with the CBAM attention block to form a residual attention module, and the last residual block is followed by a CBAM attention block to fuse the extracted high-level features. Each residual block includes two residual layers connected by the CBAM attention block in the middle, and the CBAM attention block is composed of a channel attention layer and a spatial attention layer connected to each other.

[0069] Preferably, the preprocessing block includes a convolution layer with a convolution kernel size of 7*7, which is pooled using a 3*3 maximum pooling layer after batch normalization, and then connected to the subsequent residual block through the CBAM attention block.

[0070] As a preferred embodiment, the CBAM attention block includes a channel attention layer and a spatial attention layer connected in front and behind. The specific structure is as follows Figure 3 As shown in (c), the channel attention layer first passes through a 1*1 maximum pooling layer and a 1*1 average pooling layer in parallel, and each output map is input into a multi-layer perceptron with shared parameters and activated by the ReLU function. The output maps are added pixel by pixel and then activated by a Sigmoid function as the input of the spatial attention layer; the spatial attention layer performs maximum pooling and average pooling operations along the channel dimension in parallel, concatenates the pooling results based on the channel dimension, and reduces the dimension to a single-channel two-dimensional feature map after filtering through a 7*7 convolutional layer, and finally activates the Sigmoid function to obtain the attention feature map generated this time. The two components of the CBAM attention block can be summarized as:

[0071]

[0072] Among them, M c (·) and M s (·) denote the channel attention layer and the spatial attention layer, σ(·) denotes the Sigmoid activation function, and W 0 and W 1 They represent learnable multilayer perceptron parameters; MaxPool(·) and AvgPool(·) represent global maximum pooling and global average pooling operations, respectively. 7×7(·) represents the convolution operation with a kernel size of 7*7; F represents the input feature map, and They represent the features after maximum pooling and average pooling respectively. The channel encoding and spatial encoding after the CBAM attention block are:

[0073]

[0074] in, represents the pixel-by-pixel multiplication operation, F' is the channel attention feature extracted by the channel attention layer, and F" represents the final extracted feature map output.

[0075] In step 2.2), preferably, the residual block structure includes two residual layers (i.e., the third residual layer and the fourth residual layer), and a CBAM attention block (i.e., the second CBAM attention block) connecting the two residual layers in series; the residual layer also adopts Figure 3 In the structure shown in (b), a 3*3 convolution kernel is first used for filtering and then batch normalization is performed. After activation by the LeakyReLU function, a 3*3 convolution kernel is used for convolution operation. The convolution filtering result is batch normalized and then added pixel by pixel to the input image of the direct channel. The output of the residual layer is obtained after activation by the LeakyReLu function.

[0076] As a preferred example, Figure 3 As shown in (a), each residual block uses a 3*3 convolution kernel, but the number of channels of each residual block doubles as the network deepens, from 64 channels in the first residual block to 512 channels in the last residual block; each residual block is connected in series with a CBAM attention block, and the last residual block is also fused with the extracted high-level feature maps through a CBAM attention block as the output of the residual network module that integrates the channel-spatial attention mechanism.

[0077] In step 2.3), as a preferred method, the regressor module of the convolutional neural network model for quickly solving the airfoil parameters based on the attention mechanism first uses an adaptive global average pooling layer to pool the high-level feature maps of 512 channels into 512 1*1 images respectively, which are then expanded into 512 neuron inputs and regressed to a fully connected layer with 17 outputs. The regression calculation results are finally activated by a sigmoid function, and each output is limited to a geometric parameter value range of 0 to 1, and finally the airfoil geometric parameter calculation results are obtained.

[0078] In step 2.4), as a preferred method, in order to take into account both calculation accuracy and generalization ability, the mean absolute error (Mean Absolute Error) and the L2 regularization term are combined as the error loss function, and the loss function is calculated as follows:

[0079]

[0080] Among them, TotalLoss represents the total loss function, MAE and L2 represent the mean absolute error and L2 regularization term respectively; N and K are the number of samples and the number of neurons in the target model respectively, y n and The real geometric parameters and model calculated geometric parameters corresponding to the signed distance function image in the nth sample in the multi-source enhanced sample set are respectively, is the absolute value difference between the two; λ is the regular term weight, is the square of each weight parameter in the neural network.

[0081] Preferably, during the training process, the geometric parameter calculation model uses the loss error between the calculated geometric parameters and the true geometric parameters after each batch of training data undergoes the forward process, and uses the training loss of each layer to update the network weights during the back propagation process. The modules of the model are jointly trained until the training of the geometric parameter calculation model converges.

[0082] Step 104, using the trained target model to calculate airfoil geometric parameters.

[0083] The present invention solves the following results for a certain type of airfoil: Figure 4 As shown, the airfoil image consistent with the training sample size is read and input into the model built by the present invention, and the computational geometric parameters of the airfoil are obtained by regression. The airfoil curve is calculated using these two sets of geometric parameters, and the comparison results are shown in FIG. Figure 4 As shown in , the dots are the airfoil shapes corresponding to the real geometric parameters, and the lines are the airfoil curves corresponding to the calculated geometric parameters. 200 discrete points are uniformly sampled from the airfoil curve corresponding to the calculated geometric parameters, and the average deviation from each discrete point to the airfoil curve corresponding to the real geometric parameters is 0.00024, the maximum value is 0.00068, and the maximum deviation point is located near the trailing edge of the airfoil. The deviation is less than the Kulfan tolerance requirement, so it is considered that the reconstruction error can be ignored.

[0084] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program.

[0085] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism, characterized in that: The method comprises: constructing a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image; A convolutional neural network model based on an attention mechanism for solving airfoil parameters is constructed as a target model; the convolutional neural network model based on the attention mechanism includes: a learnable image compressor module, a residual network module fused with a channel-space attention mechanism, and a regressor module; wherein the learnable image compressor module is used to reduce the dimension of the features of the signed distance function image to generate a compressed image; the residual network module fused with the channel-space attention mechanism is used to perform feature extraction and attention calculation on the compressed image to generate fused features; the regressor module is used to perform regression calculation on the fused features to obtain the model computational geometry parameters corresponding to the signed distance function image; Using the multi-source enhanced sample set to train the target model to obtain a trained target model; The trained target model is used to calculate the airfoil geometric parameters.

2. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 1 is characterized in that: Constructing a multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image, specifically including: Obtain multiple standard airfoil parameter samples from the UIUC standard airfoil dataset; According to the plurality of standard airfoil parameter samples, a plurality of simulated airfoil parameter samples are obtained by using a CTGAN self-supervised network learning method; The various geometric parameters of each standard airfoil parameter sample are randomly sampled by the Latin hypercube random sampling method to obtain a plurality of randomly generated airfoil parameter samples; A signed distance function is used to calculate the signed minimum two-norm distance between each pixel point in the airfoil image of each airfoil parameter sample in the target sample set and the airfoil profile, as a feature of each pixel point, to obtain a signed distance function image corresponding to the airfoil image; the target sample set includes a plurality of airfoil parameter samples, and the airfoil parameter samples are standard airfoil parameter samples, simulated airfoil parameter samples, or randomly generated airfoil parameter samples; A multi-source enhanced sample set including a signed distance function image and geometric parameters of the signed distance function image is constructed.

3. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 2 is characterized in that: The signed distance function is: Where Z represents the set of points on the airfoil curve contour, Π Ω (i',j') represents the function describing the relationship between point (i',j') and the boundary of the airfoil curve contour, (i',j') is a point on the airfoil curve contour, D(i,j) represents the signed distance function of point (i,j) with respect to the airfoil curve contour, (i,j) is a point in the airfoil image, min||(i,j)-(i',j')|| represents finding the minimum bi-norm distance from point (i,j) to the airfoil curve contour, sign(Π Ω (i, j)) represents the sign function describing whether the point (i, j) is outside or inside the airfoil curve contour, Π Ω (i, j) represents the function describing the relationship between point (i, j) and the boundary of the airfoil curve contour. When point (i, j) is within the airfoil curve contour, Π Ω (i,j)<0, point (i,j) is outside the airfoil curve contour Π Ω (i,j)>0, only Π Ω (i, j) = 0 means that point (i, j) is on the airfoil curve contour, and the set of pixel points recorded on the contour is Ω.

4. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 1, characterized in that: The learnable image compressor module includes: a backbone path and a direct path; The trunk path includes: a first convolutional layer, a first LeakyReLU activation function layer, a second convolutional layer, a second LeakyReLU activation function layer, a first batch normalization layer, a first linear interpolation scaler, a residual module, a first adder, a third convolutional layer and a second adder; The direct path includes: a second linear interpolation scaler; Among them, the first convolution layer, the first LeakyReLU activation function layer, the second convolution layer, the second LeakyReLU activation function layer, the first batch normalization layer, the first linear interpolation scaler and the residual module are connected in sequence, the output end of the residual module is connected to an input end of the first adder, the output end of the first adder is connected to the input end of the third convolution layer; the output end of the third convolution layer is connected to an input end of the second adder; the output end of the first batch normalization layer is also connected to another input end of the first adder; The output terminal of the second linear interpolation scaler is connected to another input terminal of the second adder, and the output terminal of the second adder is used to output the compressed image; The input ends of the first convolution layer and the second linear interpolation scaler are both used to input the signed distance function image.

5. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 4 is characterized in that: The residual module includes a first residual layer, a second residual layer, a fourth convolutional layer, and a second batch normalization layer which are connected in sequence.

6. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 1, characterized in that: The residual network module integrating the channel-spatial attention mechanism includes: a preprocessing block and multiple residual attention modules connected in sequence; The preprocessing block is connected to a first residual attention module among a plurality of residual attention modules connected in sequence; The residual attention module includes: a residual block and a first CBAM attention block connected to the residual block; the first CBAM attention block includes a channel attention layer and a spatial attention layer connected in sequence.

7. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 6, characterized in that: The residual block includes a third residual layer, a second CBAM attention block and a fourth residual layer connected in sequence.

8. The method for fast calculation of airfoil geometric parameters based on image enhancement and attention mechanism according to claim 1, characterized in that: The loss function for training the target model is: Among them, TotalLoss is the total loss function, MAE and L2 are the mean absolute error and L2 regularization term, λ is the regularization term weight, N and K are the number of samples and the number of neurons in the target model, respectively, y n and are the true geometric parameters and model calculated geometric parameters corresponding to the signed distance function image of the nth sample in the multi-source enhanced sample set, respectively, nk is the weight parameter of the kth neuron in the target model obtained by training with the nth sample.

Citation Information

Cited By

  • Offshore wind power plant power prediction method and device fusing spatio-temporal information

    CN119130204A

  • A method and device for predicting offshore wind farm power by integrating temporal and spatial information

    CN119130204B

  • Shock wave overpressure field reconstruction method based on physical information

    CN121031021A

  • A method for reconstructing a shock wave overpressure field based on physical information

    CN121031021B