CNN-XGBoost fused airfoil aerodynamic coefficient prediction method based on self-attention mechanism

By introducing a self-attention mechanism and using an XGBoost output layer in CNN, the airfoil aerodynamic coefficient prediction model is improved, solving the feature extraction and prediction accuracy problems of traditional CNNs with small sample data, and achieving high-precision airfoil aerodynamic coefficient prediction.

CN121960210AActive Publication Date: 2026-05-01INST OF AEROSPACE TECH CHINA AERODYNAMIC RES & DEV CENT
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610370171.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-25
Publication Date
2026-05-01
Estimated Expiration
2046-03-25

AI Technical Summary

Technical Problem

Existing CNN-based airfoil aerodynamic coefficient prediction methods struggle to effectively extract features and make accurate predictions when training sample data is insufficient. Furthermore, the output layer of traditional CNNs cannot fully utilize feature information, leading to reduced prediction accuracy.

Method used

A CNN-XGBoost fusion model is constructed by improving the CNN network with a self-attention mechanism and combining it with XGBoost as the output layer. The self-attention mechanism assigns different weights to image features, and XGBoost is used to effectively classify and predict features.

Benefits of technology

The generalization ability and prediction accuracy of the airfoil aerodynamic coefficient prediction model have been improved, and high-precision prediction has been achieved with small sample data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960210A_ABST
    Figure CN121960210A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of deep learning, and discloses a CNN-XGBoost fusion airfoil aerodynamic coefficient prediction method based on a self-attention mechanism. The prediction method comprises the following steps: establishing an airfoil profile and an aerodynamic coefficient database of the airfoil profile; generating an airfoil geometric image; generating an airfoil grayscale image; establishing a prediction model; training and storing a prediction model; and airfoil aerodynamic coefficient prediction is carried out. According to the prediction method, an attention mechanism is introduced into a CNN and XGBoost is used for replacing an output layer in a CNN structure, so that the structure of a CNN airfoil aerodynamic coefficient prediction model is improved, the network performance is improved, airfoil image key feature learning is effectively carried out, and high-precision prediction of the airfoil aerodynamic coefficient under small sample data is realized.
Need to check novelty before this filing date? Find Prior Art

Description

A self-attention mechanism-based CNN-XGBoost fusion method for predicting airfoil aerodynamic coefficients Technical Field

[0001] This invention belongs to the field of deep learning technology, specifically relating to a method for predicting airfoil aerodynamic coefficients based on CNN-XGBoost fusion with a self-attention mechanism. Background Technology

[0002] Calculating airfoil aerodynamic coefficients is a fundamental aspect of aircraft optimization design and research, and is crucial for improving aircraft flight performance. Traditional methods for obtaining airfoil aerodynamic coefficients involve computational fluid dynamics or wind tunnel testing. While these methods have proven effective, they suffer from drawbacks such as high computational complexity, long testing cycles, and high testing costs. Therefore, developing more efficient and advanced methods for calculating airfoil aerodynamic coefficients has remained a research hotspot in the field of aircraft aerodynamic optimization design.

[0003] In recent years, deep learning-based airfoil aerodynamic coefficient prediction methods have proven to provide rapid and accurate aerodynamic performance evaluation of airfoils with lower overhead, overcoming the shortcomings of traditional methods, shortening design cycles, and improving design efficiency. Among these, the airfoil aerodynamic coefficient prediction method based on Convolutional Neural Networks (CNNs) can effectively predict the aerodynamic coefficients of an airfoil given a fixed angle of attack, Mach number, and Reynolds number, provided only with an airfoil image. However, when extracting features from the airfoil image, CNN-based airfoil aerodynamic coefficient prediction methods cannot consciously prioritize the extracted features, especially when training sample data is insufficient, making it even more difficult to determine the importance of the extracted features relative to the predicted content.

[0004] When training data is insufficient, if CNN-based airfoil aerodynamic coefficient prediction methods adjust the network structure, improve network performance, and enhance the ability to extract feature information by increasing the number of network layers, feature surfaces, and convolutional kernels, the CNN's performance will gradually reach saturation, becoming computationally complex and prone to overfitting. Simultaneously, the CNN's output layer will also be unable to effectively utilize the extracted features for classification and prediction, leading to a decrease in the accuracy of CNN's airfoil aerodynamic coefficient prediction.

[0005] To address the problems of the aforementioned CNN-based airfoil aerodynamic coefficient prediction methods, a new airfoil aerodynamic coefficient prediction method based on self-attention mechanism CNN-XGBoost fusion is proposed, which integrates extreme gradient boosting (XGBoost). Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a method for airfoil aerodynamic coefficients based on CNN-XGBoost fusion with self-attention mechanism, so as to overcome the defects of the prior art.

[0007] The core idea of ​​the self-attention mechanism-based CNN-XGBoost fusion airfoil aerodynamic coefficient prediction method of this invention is: considering that each network model has its own advantages and disadvantages, by utilizing them, we can take advantage of each and thus effectively improve the prediction accuracy of the airfoil aerodynamic coefficient prediction model. Specifically, on the one hand, to address the problem that the output layer of traditional CNN cannot effectively utilize the extracted features for classification, XGBoost is used to replace the output layer of CNN. CNN is integrated into a trainable feature extractor to automatically extract features from the input airfoil image, and XGBoost is then integrated into the top-level recognizer of the prediction model to predict the airfoil's aerodynamic coefficient, thereby providing a more accurate output. On the other hand, to address the problem that traditional CNN networks cannot fully utilize the feature information of airfoil images, a self-attention mechanism is introduced into CNN for improvement. By applying different weights to the extracted image features, the purpose of effectively distinguishing airfoil image features is achieved, thereby more accurately establishing the relationship between the airfoil image data label and its extracted features, and thus improving the generalization ability and prediction accuracy of the airfoil aerodynamic coefficient prediction model.

[0008] The airfoil aerodynamic coefficient prediction method based on CNN-XGBoost fusion with self-attention mechanism of the present invention includes the following steps: S10. Establishing an aerodynamic coefficient database for airfoils and airfoil types; the sample data in the database includes the airfoil category, shape function transformation (CST) parameters, and operating conditions; the data format is: ;in, Let be the CST parameters and flow parameters of the airfoil, and m be the number of CST parameters and flow parameters of the airfoil. S20. Generate airfoil geometry image; preprocess the airfoil by converting the Reynolds number Re into pixel density values ​​and fusing them to obtain a standardized airfoil; then convert the point coordinate data of the standardized airfoil into an airfoil geometry image; S30. Generate airfoil grayscale image; fuse the flow parameters with the airfoil geometry image; then convert the fused airfoil geometry image into an airfoil grayscale image, with a pixel size of S; S40. Build prediction model; construct the overall structure of the airfoil aerodynamic coefficient prediction model, including three modules: CNN deep feature extraction module, deep feature fusion module, and prediction module; S50. Prediction model training and saving; extract a set proportion of data from the airfoil sample database as the training set, denoted as u, and determine the parameters of the prediction model; then, input the training set into the pre-constructed attention-based CNN-XGBoost fusion network for training, setting the correlation coefficient R. 2 To evaluate the prediction accuracy of the prediction model, an adaptive Huber function is used as the loss function, and the conditions for training termination are set. Finally, the trained prediction model is saved as cnn_xgboost.py. S60. Predict the airfoil aerodynamic coefficients. A set proportion of data is extracted from the airfoil sample database as the validation set, denoted as v. Then, the validation set v is input into the prediction model for prediction. Finally, the lift coefficient of the airfoil is output. drag coefficient , Where m1 is the lift coefficient The total number of predicted values, where n1 is the resistance coefficient. The total number of predicted values.

[0009] Further, S40 includes the following steps: First, the input grayscale image is sequentially subjected to convolution, activation function activation, and pooling operations to extract high-level features from the low-level features of the grayscale image; then, the extracted feature information is compressed, cross-processed, and residual-sharing processed; subsequently, it is connected to a multi-head attention mechanism as a CNN deep feature extraction module; through the processing of the previous module, the deep features extracted from the image are further fused; then, the fused features are input into XGBoost, with XGBoost as the output layer to generate the result; finally, the lift coefficient of the airfoil is output. drag coefficient , .

[0010] The airfoil aerodynamic coefficient prediction method based on self-attention mechanism CNN-XGBoost fusion of the present invention improves the structure of CNN airfoil aerodynamic coefficient prediction model by introducing an attention mechanism into CNN and using XGBoost to replace the output layer in CNN structure, thereby improving the network performance, effectively learning key features of airfoil images, and achieving high-precision prediction of airfoil aerodynamic coefficients with small sample data. Attached Figure Description

[0011] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. Furthermore, the same reference numerals denote the same parts throughout the drawings.

[0012] Figure 1 is a flowchart of the airfoil aerodynamic coefficient prediction method based on CNN-XGBoost fusion with self-attention mechanism according to the present invention; Figure 2 is the calculation grid for airfoil lift coefficient and drag coefficient; Figure 3 is a schematic diagram of the preprocessed standardized airfoil; Figure 4 is the structural framework of the airfoil aerodynamic coefficient prediction model based on CNN-XGBoost fusion with self-attention mechanism used in the present invention; Figure 5 is the training history curve of the loss function of the airfoil aerodynamic coefficient prediction model; Figure 6 is C L Comparison of predicted values ​​and CFD simulation values; Figure 7 shows C D Comparison of predicted values ​​and CFD simulation values; Figure 8 shows the C values ​​for each round. L C D correlation coefficient R 2 . Detailed Implementation

[0013] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0014] Example: As shown in Figure 1, the airfoil aerodynamic coefficient prediction method based on CNN-XGBoost fusion with self-attention mechanism in this example includes the following steps: S10. Establish an airfoil and an aerodynamic coefficient database; the sample data in the database includes the airfoil category, shape function transformation (CST) parameters, and operating conditions; the data format is: ;in, Let represent the CST and flow parameters of the airfoil, and m represent the number of CST and flow parameters for the airfoil. is the aerodynamic coefficient of the airfoil, and n is the number of aerodynamic coefficients of the airfoil; in this embodiment, the CST parameter is set with 5 variables and the corresponding value range is limited, namely: relative thickness Tc: 0.08~0.2; relative thickness location Tc x: 0.2~0.45; relative curvature C b : 0~0.08; Location of relative curvature C bx The airfoil has a radius of attack (LER) of 0.2–0.5; a radius of attack (LER) of 1–9; each airfoil has 149 discrete points of its profile. 3060 sets of airfoil data were randomly generated, and the generated files were named “airfoil1.dat, airfoil2.dat, airfoil3.dat, …, airfoil3060.dat”. Then, the airfoil was preprocessed to obtain a normalized airfoil. Finally, CFD software was used to calculate the airfoil aerodynamic coefficients. Figure 2 shows the mesh used in the calculation. The calculation model used a shear stress transport model SSTk-w with an angle of attack α = 4° and a Reynolds number Re = 6.0 × 10⁻⁶. 7 The aerodynamic lift and drag coefficients (airfoil1) for each airfoil were calculated. ~airfoil3060: S20. Generate airfoil geometry image; preprocess the airfoil, convert the Reynolds number Re into pixel density values ​​and fuse them to obtain the standardized airfoil shown in Figure 3; then convert the point coordinate data of the standardized airfoil into an airfoil geometry image; in this embodiment, the matplotlib library in Python is used to convert the point coordinate data of the standardized airfoil into an airfoil geometry image. The airfoil geometry image uses the rotation angle to represent the angle of attack of the airfoil under real conditions; the pixel density values ​​of all pixels in the airfoil geometry image are between 0 and 255; then, the Reynolds number Re is converted into pixel density values ​​and fused, and finally the Reynolds number Re is represented by the pixel density value; Equation (1) gives the conversion formula: ;in, This represents the original pixel density value of the airfoil geometry image, with a value between 0 and 100; This represents the maximum original pixel density value, which is 255. The incoming Reynolds number; the maximum incoming Reynolds number. , The new pixel density value after fusion is obtained; the fused airfoil geometry image is obtained; S30. Generate airfoil grayscale image; fuse the flow parameters with the airfoil geometry image; then convert the fused airfoil geometry image into an airfoil grayscale image with a pixel size of S; in this embodiment, the PIL library is used to convert the fused airfoil geometry image into an airfoil grayscale image of S=49×49 pixels, which is used as the input of the prediction model; S40. Establish the prediction model; construct the overall structure of the airfoil aerodynamic coefficient prediction model, including three modules: CNN deep feature extraction module, deep feature fusion module. The system consists of a prediction module and an input grayscale image. First, the input grayscale image undergoes convolution, activation function activation, and pooling operations to extract high-level features from its low-level features. Then, the extracted features are compressed, cross-referenced, and residual-shared. Next, it is connected to a multi-head attention mechanism as a CNN deep feature extraction module. The deep features extracted from the image are further fused using the previous module's processing. Subsequently, the fused features are input into XGBoost, which is used as the output layer to generate the results. Finally, the lift coefficient of the airfoil is output. drag coefficient , As shown in Figure 4, the overall structure of the airfoil aerodynamic coefficient prediction model in this embodiment includes 3 convolutional layers, 3 pooling layers, a feature compression layer, a shared residual block, and an XGBoost output layer. The settings and parameters of each layer are as follows: a. Convolutional layer Conv1; The processing flow of convolutional layer Conv1 is: convolution, activation function ReLU activation, pooling, and batch normalization; The convolution input is a grayscale image of S=49×49 pixels, which is convolved using 32 convolutional kernels of size 5×5 (convolution kernel parameter p: 5×5×32) with a stride of 1 to obtain 32 feature maps of size 24×24; Then, the feature maps output by convolutional layer Conv1 are input into the activation function R. In eLU; then max pooling is performed using a pooling unit of size 2×2 (pooling region parameter q: 2×2) and stride of 2; finally, batch normalization is performed to output two 24×24 feature maps; b. Convolutional layer Conv2; the processing flow of the convolutional layer Conv2 is: convolution, activation function ReLU activation, pooling, batch normalization; the convolution input is a grayscale image of S=24×24 pixels, which is convolved using 64 convolution kernels of size 3×3 (p: 3×3×64) and stride of 1 to obtain 64 feature maps of size 12×12; then the feature maps output by the convolutional layer Conv2 are input into the activation function ReLU. In ReLU, max pooling is performed using pooling units of size 2×2 (pooling region parameter q: 2×2) and stride 2. Finally, batch normalization is performed, outputting 64 feature maps of size 12×12. c. Convolutional layer Conv3: The processing flow of the Conv3 convolutional layer is: convolution, ReLU activation, pooling, and batch normalization. The input to the convolution is a grayscale image of S=12×12 pixels, which is convolved using 128 kernels of size 3×3 (kernel parameter p: 3×3×128) and stride 1, resulting in 128 feature maps of size 6×6. Then, the feature maps output from the Conv3 convolutional layer are input to the activation function R. In the eLU; then max pooling is performed using pooling units of size 2×2 (pooling region parameter q: 2×2) and stride 2; finally, batch normalization is performed to output 128 6×6 feature maps; d. Flattening layer; by designing a flattening layer, the 128 6×6 feature maps input to the Conv3 convolutional layer are transformed into 4608-dimensional vectors; e. Feature compression layer; by using feature compression layer parameter a, the 4608-dimensional vector is compressed into a 256-dimensional vector, and then input into the ReLU activation function; f. Feature cross layer; by using the feature cross layer, the nonlinear interaction relationship between the data in the compressed layer is automatically learned; the feature cross layer parameter b: the interaction weight matrix is ​​a 256×256 two-dimensional matrix; g.Input projection layer; perform batch normalization on each layer of the feature cross layer and activate it using the GELU function; h. Residual block; set the shared residual block c=6 to extract the lift coefficient C. L and drag coefficient C D Useful general characterizations, starting with shared features, specifically optimizing the lift coefficient C. L and drag coefficient C D The prediction; training stability is maintained through residual connections. Meanwhile, the lift coefficient C... L and drag coefficient C D Branch residual blocks are set to 10 and 8 respectively, with a deactivation rate of 0.2% for both; i. Attention mechanism: The self-attention is divided into multiple "heads" for parallel computation, with d attention heads set to 8; j. Feature fusion layer: The lift coefficient C is... L Branch and drag coefficient C D The features are concatenated; then, the SiLU function is used for activation; k. XGBoost output layer; the 256-dimensional feature vector of the feature fusion layer is input into the output XGBoost layer, and the final output XGBoost layer outputs the aerodynamic coefficient value of the airfoil; the output XGBoost parameters e: the number of decision trees is set to 200, the maximum depth is 6, the learning rate is 0.1, and the regularization parameter is 1.0; S50. Prediction model training and saving; a set proportion of data is extracted from the airfoil sample database as the training set, denoted as u, and the parameters of the prediction model are determined; then, the training set is input into the pre-constructed attention-based CNN-XGBoost fusion network for training, and the correlation coefficient R is set. 2 To evaluate the prediction accuracy of the prediction model, an adaptive Huber function is used as the loss function, and the conditions for training termination are set. Finally, the trained prediction model is saved as cnn_xgboost.py. S60. Predict the airfoil aerodynamic coefficients. A set proportion of data is extracted from the airfoil sample database as the validation set, denoted as v. Then, the validation set v is input into the prediction model for prediction. Finally, the lift coefficient of the airfoil is output. drag coefficient , Where m1 is the lift coefficient The total number of predicted values, where n1 is the resistance coefficient. The total number of predicted values.

[0015] This embodiment divides the sample database into a training set and a validation set, where the training set u accounts for 80% of the total samples and the validation set v accounts for 20%. The training epoch size is 100, the batch size is 64, and the learning rate is 0.0001. The training epochs are iterated, with each batch of samples trained being considered one iteration. An adaptive Huber function is used as the loss function to calculate the difference between the predicted and true values ​​during the prediction model training process, expressed as the correlation coefficient RV. 2 To evaluate model accuracy, R 2 The value ranges from [0,1], and the closer the value is to 1, the higher the model's prediction accuracy. The Huber function is as follows: ;in, This represents the actual lift-drag coefficient value. For the corresponding predicted value, n is the average of the true values, and n2 is the total number of samples.

[0016] As shown in Figure 5, the training history curves of the prediction model show that after 30 iterations, the two loss curves become relatively flat, and the loss values ​​of the prediction model on both the training and validation sets are less than 1×10. -3 Therefore, it is considered that the prediction model has converged, and the CNN-XGBoost prediction model based on the self-attention mechanism has completed training. Figures 6 and 7 show the prediction results of the model on the validation set, comparing the predicted values ​​on the validation dataset with the lift coefficient C in the CFD simulation values. L and C D Drag coefficient. As can be seen from Figures 6 and 7, the dashed lines represent... The points represent data from the airfoil validation dataset. The more the predicted points cluster along the diagonal, the more accurate the prediction. Almost all sample points in the validation dataset are clustered together. Near the line, it is demonstrated that the airfoil aerodynamic coefficient prediction method based on the self-attention mechanism and CNN-XGBoost fusion of the present invention has reliable prediction accuracy. As shown in Figure 8, the prediction results of the prediction model are correlated with the numerical simulation results, and the lift coefficient C is obtained. L correlation coefficient R 2 and drag coefficient C D correlation coefficient R 2 All values ​​were above 0.95, indicating that the prediction model has high prediction accuracy.

[0017] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. For those skilled in the art, all features disclosed in the present invention, or all steps in all methods or processes disclosed, except for mutually exclusive features and / or steps, can be combined in any way without departing from the principles of the present invention. The present invention is not limited to the specific details and illustrations shown and described herein.

Claims

1. A method for predicting airfoil aerodynamic coefficients based on a self-attention mechanism using CNN-XGBoost fusion, characterized in that, Includes the following steps: S10. Establish a database of aerodynamic coefficients for airfoils and airfoil types; the sample data in the database includes airfoil category, shape function transformation (CST) parameters, and operating conditions; the data format is: ;in, Let be the CST parameters and flow parameters of the airfoil, and m be the number of CST parameters and flow parameters of the airfoil. S20. Generate airfoil geometry image; preprocess the airfoil by converting the Reynolds number Re into pixel density values ​​and fusing them to obtain a standardized airfoil; then convert the point coordinate data of the standardized airfoil into an airfoil geometry image; S30. Generate airfoil grayscale image; fuse the flow parameters with the airfoil geometry image; then convert the fused airfoil geometry image into an airfoil grayscale image, with a pixel size of S; S40. Build prediction model; construct the overall structure of the airfoil aerodynamic coefficient prediction model, including three modules: CNN deep feature extraction module, deep feature fusion module, and prediction module; S50. Prediction model training and saving; extract a set proportion of data from the airfoil sample database as the training set, denoted as u, and determine the parameters of the prediction model; then, input the training set into the pre-constructed attention-based CNN-XGBoost fusion network for training, setting the correlation coefficient R. 2 To evaluate the prediction accuracy of the prediction model, an adaptive Huber function is used as the loss function, and the conditions for training termination are set. Finally, the trained prediction model is saved as cnn_xgboost.py. S60. Predict the airfoil aerodynamic coefficients. A set proportion of data is extracted from the airfoil sample database as the validation set, denoted as v. Then, the validation set v is input into the prediction model for prediction. Finally, the lift coefficient of the airfoil is output. drag coefficient , Where m1 is the lift coefficient The total number of predicted values, where n1 is the resistance coefficient. The total number of predicted values.

2. The airfoil aerodynamic coefficient prediction method based on CNN-XGBoost fusion with self-attention mechanism according to claim 1, characterized in that, The S40 process includes the following steps: First, the input grayscale image is sequentially subjected to convolution, activation function activation, and pooling operations to extract high-level features from the low-level features of the grayscale image; then, the extracted feature information is compressed, cross-processed, and residual-sharing processed; subsequently, it is connected to a multi-head attention mechanism as a CNN deep feature extraction module; through the processing of the previous module, the deep features extracted from the image are further fused; then, the fused features are input into XGBoost, with XGBoost used as the output layer to generate the result; finally, the lift coefficient of the airfoil is output. drag coefficient , 。

Citation Information

Patent Citations

  • Orthopedic surgery navigation registration method based on UWB mark points

    CN116650115A

  • CNN-XGBoost power load prediction method based on attention mechanism

    CN119577598A

  • Unknown class aware, privacy preserving, customizable and scalable sensitive document classification system

    US20250390735A1