A GAN-based dimensionality reduction technique for aerodynamic shape optimization

: Aerodynamic shape optimization (ASO) based on computational fluid dynamics simulations is extremely computationally demanding because a search needs to be performed in a high-dimensional design space. One solution to this problem is to reduce the dimensionality of the design space for aircraft optimization. Hence, in this study, a dimensionality reduction technique is designed based on a generative adversarial network (GAN) to facilitate ASO. The novel GAN model is developed by combining the GAN with airfoil curve parameterization and can directly produce realistic and highly accurate airfoil curves from input data of aerodynamic shapes. In addition, the respective interpretable characteristic airfoil variables can be obtained by extracting latent codes with physical meaning, while reducing the dimensionality of the airfoil design space. The results of simulation experiments show that the proposed technique can significantly improve the optimization convergence rate of the ASO process.


Introduction
Aerodynamic shape design is a core technology for aircraft. An excellent aerodynamic shape translates into high aircraft performance. Aerodynamic shape optimization (ASO) is an important step in aerodynamic shape design. An optimum search algorithm can be used to determine the optimum search direction with aerodynamic parameters (e.g., the lift-todrag ratio (CL/CD ratio) and flight power) as constraints to ensure that the required aerodynamic objective function is satisfied. The ultimate goal is to find an extreme value for the objective function or a feasible region that meets the design requirements. [1] Computational fluid dynamics (CFD) techniques are playing an increasingly important role in aerodynamic shape analysis and design. [2] ASO combines CFD and optimization theories to calculate the extreme value of the objective function, taking advantage of a computer's ability to perform fast computations and multiple iterations, while satisfying the required aerodynamic conditions to produce highperformance aerodynamic shape designs. Conventional ASO methods based on gradients [3] [4] and genetic algorithms [5] [6] often require relatively large design spaces and are therefore associated with enormous iteration-related computational loads. By contrast, global optimization methods based on surrogate models [7][8][9][10] reduce the number of simulation iterations through downsampling the sample space and using an model to approximate the original objective function.
However, these methods also produce an exponential increase in the computational load with the dimensionality of the design variables. One solution to the problem of high-dimensional design variables involved in aerodynamic shapes is to reduce the dimensionality of the design space and extract characteristic variables, thereby improving upon optimization methods based on surrogate models. [11][12][13][14][15][16] Two types of methods are currently mainly used to implement this solution, namely, dimensionality reduction (DR) methods based on linear techniques [17] and nonlinear methods based on artificial neural networks.
The rapid development of neural networks and deep learning technology in recent years has produced a novel approach for implementing ASO that has garnered considerable attention from the academic community. Dimensionality reduction has been extensively investigated in the deep learning field. Deep neural network algorithms, such as variational autoencoders [18] and generative adversarial networks (GANs), [19] have been found to successfully represent data in complex, high-dimensional distributions (e.g., images) through low-dimensional latent codes (LCs).
These techniques based on deep learning can effectively reduce data complexity and maximize the integrity of effective information, while achieving data dimensionality reduction.
Hennigh proposed Lat-Net, [20]  successfully used a conditional GAN (CGAN) to reduce the dimensionality of an airfoil design space. [21] The CGAN trains on data labels and can generate aerodynamic shape data with any given labels. Labeling each airfoil with precomputed aerodynamic characteristics (e.g., the CL/CD ratio and structural requirements) can be used to guide the shape generation process towards labeled samples of particular types.
Thus, the CGAN constitutes novel strategy for shape optimization.

Model structure
The basic concept of dimensionality reduction is to convert high-dimensional data to low-dimensional representations. Dimensionality reduction improves the

BézierGAN
The GAN used in this study, BézierGAN, is a dimensionality reduction model with an encoderdecoder structure. [22] The BézierGAN adopts the basic structure of the interpretable representation learning using an information maximizing GAN (InfoGAN) [23] and can map the probability model of the original data to several specific LCs, each of which represents one feature of the original data. Therefore, the BézierGAN can reduce the dimensionality of the original data at the feature level.
The BézierGAN model structure primarily differs from that of the InfoGAN by a Bézier layer constructed in the output part of the encoder for producing the parameters of the Bézier curve equation. The Bézier layer is constructed because discrete point sets for airfoil curves generated by conventional GANs cannot effectively represent some basic curve properties (e.g., smoothness and continuity), which are often better represented and controlled by the parametric equations of curves (e.g., Bézier or spline curves). Figure 1 shows the BézierGAN architecture, which consists of a generator and a discriminator. The input of the discriminator is the twodimensional coordinate vector x of the discrete points on the continuous airfoil curve. The discriminator outputs two terms, namely, the probability that the data originate from real samples and the predicted LC.

Network architecture
(2) Generator The generator converts the input LC and noise to a control point P, a weight w, and a node variable u for the Bézier curve. The Bézier layer subsequently converts these Bézier parameters to discrete points on the airfoil curve, forming the final airfoil curve pattern.
The generator combines the input LC c and noise z in the first layer of the network, forming an independent vector cz that then propagates forward along two different paths. On one path, cz first passes through two fully connected neural networks, followed by three deconvolutional layers, and eventually outputs a control point P and a weight w for the Bézier curve, each through an independent convolutional layer. On the other path, cz passes through three fully connected layers in which computations are performed and then produces a node variable u for the Bézier curve following a simple transformation through a functional layer.

Bézier layer
After the network outputs the learned Bézier parameters (i.e., P, w, and u), the Bézier layer converts these parameters to a coordinate point x on the discrete airfoil curve using the function given in Equation (1): where n is the order of the Bézier curve and m + 1 is the number of discrete nodes on the curve. Because the P, w, and u parameters in the equation are differentiable, the network can be trained using the backpropagation algorithm.

Regularization terms
To prevent BézierGAN from converging to a relatively inferior local optimal solution, regularization terms can be used to adjust the abovementioned Bézier parameters.
(1) Weight L1 regularization can be applied to the weight to eliminate the effects of unnecessary or extreme control points, thereby minimizing the number of redundant control points.
(2) Control points The dispersiveness and randomness of the control points may cause anomalous behavior of the weight and node variables. Regularization can be used to reduce the distance between control points. The mean and maximum Euclidean distances between two adjacent control points are used as the regularization term in Equations (3) and (4), respectively: where N is the sample size.

Correlation analysis method for LCs
The correlations between the LCs and the physical characteristics of the airfoil are analyzed to examine the interpretability of the dimensionality reduction model.

Correlation evaluation metric
In this study, the linear regression and determination coefficient R 2 is primarily used to evaluate the correlations between the LCs and the physical characteristics of the airfoil (i.e., the radius of the leading edge Rl, the thickness of the trailing edge Ht, the maximum thickness Hmax, and the maximum camber Cmax).

Correlation analysis algorithm
The LC vector ⃗ is uniformly sampled in the domain of the function. Figure 2 shows the airfoil curves generated using different values of ⃗ . These generated airfoils are arranged in ascending order of the value of each LC component ci. (2)Input ⃗ into the dimensionality reduction model to produce airfoil data with a sample size n.
(3)Calculate the physical parameters based on each of the n airfoil data points using Profili software.
(4)Determine the characteristic physical parameters of the airfoil and find the physical parameter p that best matches the i th dimension ci of the LC.
(5)Evaluate the correlation between ci and p and draw a conclusion.

LC-based ASO
The essence of the ASO process is the solution of the equation * = ( ) where the variable x represents an aerodynamic airfoil design (in the experiments conducted in this study, x is either the LC c of the BézierGAN or a principal components analysis (PCA) [24] or the parameter of the Then, c* is used to generate an optimum aerodynamic shape x*=G(c*, z).
Bayesian optimization [25] is performed to search for c*. It has two components, namely, a priori model and an acquisition function. In this study, efficient global optimization (EGO) [26] is employed to implement Bayesian optimization In EGO, Gaussian process regression (GPR) and expected improvement (EI) are used as the priori model and acquisition function, respectively.
In the equation above, hmin is the optimal value of the current function. In each step t of EGO, the c (t) that best optimizes the current optimal solution is sought: The EGO procedure is described below.
(1) Estimate the function h using the GPR.
(2) Calculate the EI using Equation (7) and the learned GPR model.
(4) Evaluate h at c (t) and add a new (c (t) ，h(c (t) )) pair to the dataset to learn the GPR.

Experimental dataset
Experiments were performed on the airfoil dataset Here, the NACA 0012 airfoil is used as an example.

Dimensionality reduction experiments
In this experiment, PCA -the most commonly used DDR method in the machine learning and statistical fields -was used as a reference to measure and evaluate the performance of the GAN-based technique in reducing the dimensionality of aerodynamic shape data.

Data evaluation metrics
(1) Mean log-likelihood (MLL). This metric is commonly used to evaluate generative models. A high MILL indicates a high similarity between generated and real data in terms of the distribution.
(2) Smoothness. The relative variance of differences (RVOD) was used to measure the relative smoothness between the generated discrete coordinate points and the coordinate points in the dataset.
(3) Latent space consistency (LSC). This metric is a measure of the regularity of the latent space. A high LSC indicates that the shape varies consistently along any direction in the latent space.

PCA-based dimensionality reduction
The statistical metrics in Tables 1 and 2 and the graphs in Figures 4 and 5 show that the PCA-based method also reduced the dimensionality of the aerodynamic shape data but was outperformed by the BézierGAN-based method in terms of the metrics.   Figure 5 shows the airfoils generated by the BézierGAN model after 20,000 times of training. Thus, these airfoils meet the requirements.  (2) Generated airfoil graphs  The R 2 values between c1, c2, and c3 and each physical characteristic were extracted and plotted on a single graph for analysis, which is shown in Figure 7.  Figure 7(b) shows that the linear correlation between Ht and each LC was unstable with a large variance. As a result, the LC that was correlated with Ht could not be determined. Figure 7(c) shows that

BézierGAN-based dimensionality reduction
Hmax was also most significantly linearly correlated with c1. As both Rl and Hmax exhibited similarly strong linear correlations with c1, it can be inferred that the two characteristics were not independent and affected each other. Figure 7(d) shows that Cmax was most significantly linearly correlated with LC in the vertical direction, c2. As in Figure 7(b), no correlation was found between Ht and any LC dimension.

ASO comparative analysis
The PCA-and BézierGAN-based methods for reducing the dimensionality of aerodynamic shape data and the NURBS-based airfoil parameterization method [27] were experimentally compared in terms of the iterative optimization process in the EGO algorithm.
The main constraints used in the optimization experiments were a Reynolds number of 1,800,000, a Mach number of 0.01 and an angle of attack of 0°. Figure 8 shows the optimization process, that is, the variation in the target CL/CD ratio with the number of optimization iterations. Table 3

Conclusion
The GAN-based dimensionality reduction method for aerodynamic shape data presented in this study accelerates the ASO process and alleviates the problem of large computational loads associated with the optimization process to some extent. However, some issues remain that require improvement or in-depth investigation. The GAN-based reduction in the dimensionality of aerodynamic shape data is only a subprocess of ASO. In addition, the training of a neural network is a global search optimization process. Hence, it is possible to use deep learning theories to implement the entire ASO process. For example, aerodynamic target constraints (e.g., the CL/CD ratio) can be used as labels for training neural networks. There is no one-toone correspondence between LCs and the physical characteristics of airfoils. LCs with higher interpretability could be generated by modifying the model structure and training parameters.

Declarations
(1) Availability of data and materials: The airfoil dataset used in our experiments is UIUC Airfoil Coordinates Database. All data generated or analysed during the current study are available from the corresponding author on reasonable request.