Structural Optimization of the Aircraft NACA Inlet Based on BP Neural Networks and Genetic Algorithms

With the development of the increasing demand for cooling air in cabin and electronic components on aircraft, it urges to present an energy-efficient optimum method for the ram air inlet system. A ram air performance evaluation method is proposed, and the main structural parameters can be extended to a certain type of aircraft. The influence of structural parameters on the ram air performance is studied, and a database for the performance is generated. A new method of integrating the BP neural networks and genetic algorithm is used for structure optimization and is proven effective. Moreover, the optimum result of the structure of the NACA ram air inlet system is deduced. Results show that (1) the optimization algorithm is efficient with less prediction error of the mass flow rate and fuel penalty. The average relative error of the mass flow rate is 1.37%, and the average relative error of the fuel penalty is 1.41% in the full samples. (2) Predicted deviation analysis shows very little difference between optimized and unoptimized design. The relative error of the mass flow rate is 0.080% while that of the fuel penalty is 0.083%. The accuracy of the proposed optimization method is proven. (3) The mass flow rate after optimization is increased to 2.506 kg/s, and the fuel penalty is decreased by 74.595 Et kg. The BP neural networks and genetic algorithms are studied to optimize the design of the ram air inlet system. It is proven to be a novel approach, and the efficiency can be highly improved.


Introduction
The ram air inlet of the aircraft environmental control system ("ECS") is a key component of the air source introduction and plays a very key role in the system performance. A NACA (National Advisory Committee for Aeronautics) air inlet is one of the typical forms, designed by Davis et al. [1] in 1945. Its unique shape controls the involvement of the attached surface layer to a certain extent and increases the flow of mainstream air into the inlet using the side coiling effect, which has a unique advantage in high backpressure and high flow rate conditions. Besides, compared with other air inlets, its air pressure loss is smaller, so it is widely used. The inlet intake shape of different NACA air intakes is the same. However, the inlet position and structural parameters are different. Currently, most design of NACA air inlets follows the instruction of ESDU 86002 document [2], in which a two-dimensional surface design instruction is presented. It cannot be extended to all of the NACA shape design especially to three-dimensional shape of different aircraft. And there are no uniform standard and specification for its optimization method. Therefore, it is of practical significance to find a method for NACA air inlet optimization for the actual airplane surface. The following advances have been made in the design of an air inlet for airborne and onboard engines.
The CFD simulation technique was adopted by Surve, Wang et al., and Xiaolong et al. [3][4][5]. The inlet drag, total pressure recovery coefficient, and torque loss of the onboard engine were designed and calculated, and the performance of the onboard engine was improved. The optimization algorithm was introduced into the calculation by Jiang et al. and Li et al. [6,7], and the algorithm was proven by experiments. The structural optimization design method combining the BP neural network and genetic algorithm was proposed by Guo and Lu [8], and the value of this method in the design of parts of an aeroengine was proven by CFD simulation.
As mentioned above, the design and optimization of the inlets mainly focus on the airborne and vehicle engines, but there are few researches on the aircraft ram air inlet, and the performance evaluation criteria of the ram air inlets are different from those of the above-mentioned engines. Generally, the criterion of an air inlet of engines is the mass flow rate, while the criteria of ram air inlet performance are complicated, including total pressure recovery coefficient, mass flow rate, and aerodynamic resistance, and fuel usage is also needed to be involved. Therefore, the existing theory and method are limited for the full study of a ram air inlet.
There are many prediction methods for parameters, such as linear regression analysis, polynomial analysis based on linear regression expansion, artificial neural networks, time series analysis, least squares support vector machines, and other prediction methods. The methods of parameter optimization mainly include sample experiment optimization, simulated annealing algorithm optimization, genetic algorithm optimization, and other optimization methods. In fact, each of these methods has its own characteristics.
The combination of BP neural networks and genetic algorithms has advantages for the above problem solving. The BP neural network has an excellent nonlinear mapping ability. After sample training, the relationship between different input parameters and different output parameters can be obtained, which can solve the mapping problem of multiple structural parameters and multiple evaluation indicators. Meanwhile, the genetic algorithm overcomes the drawbacks of narrow applicability and slow convergence of traditional optimization algorithms, which can cope with discontinuous, high-dimensional, multipolar values in real processes. Accordingly, the genetic algorithm has a strong global optimization capability and can use mapping relationships to evaluate the fitness of individuals, which is applicable to the global optimization solution of structural parameters.
In this paper, an air inlet performance evaluation method for multiple performance indicators is proposed and a database of multiple structural parameters and multiple performance indicators is established. On this basis, the influence of the structural parameters of the NACA air inlet on its performance is investigated. Also, in conjunction with the artificial intelligence algorithm, the structural parameters of the air inlet are optimized and determined. Finally, the reliability of this optimization algorithm is proven by numerical calculation.

NACA Air Inlet Structure Parameters and
Evaluation Indicators 2.1. NACA Air Inlet Structure Parameters. Before the structural optimization design, the structural parameters of the air inlet need to be decomposed to obtain the main structural parameters. A NACA ram air inlet is a common part of an air inlet for aircraft environmental control systems [9], and its structure is shown in Figure 1. Due to the influence of the opening form, when the airflow enters the inlet, a symmetrical swirling vortex is generated at the throat, which improves airflow and increases the inlet mass flow rate. The main structural parameters that affect inlet performance are slope inclination (α), throat aspect ratio (A wdt ), and opening length (L 1 ).

NACA Air Inlet Performance Evaluation Index.
The existing experience proposes that the total pressure recovery coefficient, ram recovery rate, mass flow rate, and resistance can be used as inlet performance evaluation indicators, which are mainly single indicators for the aerodynamic performance of a ram air inlet. For civil aircraft, the system weight, engine power, and system resistance should also be taken into account for a comprehensive evaluation of the system. Therefore, the fuel penalty can be regarded as an economic performance indicator for evaluating the ram inlet of the environmental control system, which should be taken into account in the design of the air inlet. Moreover, the mass flow rate is taken as the basic design requirement for the air inlet. Therefore, the following two requirements should be involved in the optimized design: (1) guaranteed minimum fuel penalty ΔW and (2) the inlet mass flow rate M higher than the minimum mass flow rate M d . In this paper, M d = 2:506 kg/s.
The fuel penalty of the ram air inlet of the environmental control system consists of two aspects: the fuel penalty W fD caused by the fixed system unit weight and the fuel penalty W fx caused by the ram air resistance.
The fuel weight W fD consumed by the fixed system unit weight W D on the aircraft can be expressed as [10] where C e is the fuel consumption ratio (kg/N/h), τ 0 is the flight time (h), g is the gravitational acceleration (m/s 2 ), and K is the aerodynamic mass of the aircraft. Figure 1: Diagram of a NACA ram air inlet. 2 International Journal of Aerospace Engineering Due to differences in fuel consumption ratios, flight time, and speed of different aircraft, the fuel penalty caused by the fixed system unit weight is defined as W fD /W D = exp ðC e τ 0 g/KÞ − 1, expressed as E t . At this point, formula (1) can be written as The fuel penalty W fx caused by aerodynamic resistance can be described as [10] where X is the aerodynamic resistance of the ram air inlet, which is related to the mass flow rate M and the flight speed v, described as Then, formula (3) can be expressed as Therefore, the total fuel penalty ΔW caused by the air inlet can be expressed as 3. NACA Air Inlet Optimization Design Method Based on an Artificial Intelligence Algorithm

Air Inlet Optimization Design Process.
Considering that there is no clear functional relationship between the inlet structure parameters and the performance evaluation indicators, one possible solution is that a data-driven prediction model can be used to establish a functional relationship and an intelligent optimization algorithm model can be used to optimize the structural parameters of the air inlet. This process involves the determination of optimization structural parameters and performance evaluation indicators, the acquisition of data samples, the establishment of prediction models, the establishment of optimization models, and the comparison and verification of optimization results.

The Establishment of the Air Inlet Performance Database.
Data samples were acquired from numerical simulations of aircraft ram air inlet models. The data sample collection includes the design of structural parameters, the generation of parametric model and parametric grid, the batch simulation calculations, and the export of results.
In this paper, the throat aspect ratio, slope inclination, and opening length were selected by the instruction in ESDU 86002 document, which are the key structural parameters affecting the air intake performance. For sample expansion, three structural parameters were divided into six sample test values. The total sample is 6 3 = 216, as shown in Table 1.
In this paper, the internal and external flow fields of the whole aircraft with ram inlets were calculated for 216 sets of working conditions with different aspect ratios, slope inclinations, and opening lengths and a database of aircraft air intake performance is obtained.
In order to obtain a database of inlet performance with different structural parameters, the reliability of the calculation method was verified first. The simulation was carried out by ANSYS CFX. The validation uses the DLR-F6 model, which is proven by the wind tunnel experiment conducted by the AIAA Resistance Prediction Workshop (DPW) [11,12]. The simulation results are shown in Table 2.
It can be seen from Table 2 that when the grid number reaches 19745870, the resistance coefficient does not fluctuate much and the calculation error is less than 1%. Therefore, the k-ε turbulence model is selected in this paper. The grid type is a structured grid, and the grid number is 19745870. The velocity flow diagram of the air inlet is shown in Figure 2.
As shown in Figure 2, the ram air flow field before the entrance of the NACA inlet is uniform; after the entrance, due to the expansion angle, the flow is separated, the flow velocity in the middle is large, and the flow velocity on both sides is small; there is a vortex flow on the left and the right side of the outlet surface, and the distribution is relatively symmetrical. The vortex flow results in the strong entrainainment of the NACA inlet, which facilitates the introduction of more ram air.
The flow separation occurs at the downstream of the air inlet throat. At the same time, due to the joint influence of wing fairing and outer wing, the peripheral flow field of the air inlet has a certain side slip angle in the flow direction, which is not consistent with the axis direction of the air inlet. In addition, flow separation may also be caused by the dilated segment behind the throat. Both of these two factors affect the air inlet performance.
Further, the 216 conditions listed above were calculated to obtain the database of aircraft inlet performance with different structural parameters, and general laws of the database were analyzed, as shown in Figures 3 and 4.
In Figures 3-6, it can be seen that the fuel penalty and mass flow rate of the aircraft tend to increase monotonously with the change of the aspect ratio, slope angle, and opening length and the curvature is not fixed.
When the slope angle is large, the mass flow rate changes smoothly after the aspect ratio becomes larger than 3.5.   Meanwhile, it can be seen that the mass flow rate at the air inlet is relatively small in many conditions. However, these conditions do not meet the design requirements and need to be screened in the later optimization.

BP Neural Network.
The BP (back propagation) neural network algorithm is a typical algorithm of artificial neural networks, which estimates the errors of each layer in the form of error back propagation [13,14]. The BP neural network has strong nonlinear generalization capability, which can obtain the global mapping between arbitrary input variables and output variables and accurately simulate the distribution of the mass flow rate and fuel penalty. Therefore, based on the BP neural network, the data-driven prediction model was established. The mapping relationship S net between the      5 International Journal of Aerospace Engineering output performance indicator aggregate S and the input structure parameters was established, and the abstract function is The topology of the BP neural network prediction model is shown in Figure 7.
The BP neural network algorithm is also known as the error back propagation algorithm for multilayer perceptron. As shown in Figure 7, the output error is gradually propagated through the implicit layer to the input layer in some form, and the error is distributed to all the units in each layer to obtain the error signal. In this process, the output error is used to estimate the error of the previous layer adjacent to the output layer, and then, the error of the previous layer is estimated by this error. The error is propagated layer by layer; in this way, the error of all other layers can be obtained.
Based on MATLAB, the BP neural network toolbox was called [15] to establish the network topology of the prediction model.
The network topology was established based on the newff function. Sample training was carried out based on the train function. Simulation was performed based on the sim function. The specific parameters of the network are shown in Table 3.

Genetic Algorithm Optimization
Model. The genetic algorithm, one of the representative algorithms in the field of artificial intelligence, carries out "survival of the fittest" for individuals [16]. The genetic algorithm has a strong ability of global optimization and can use mapping relationship to evaluate the fitness of individuals, which is suitable for the global optimization of structural parameters without specific expressions.
In order to optimize the structural parameters, an optimization model was built and a range of structural parameters was given.
1460 ≤ L ≤ 1933 mm: The code of the genetic algorithm was compiled based on MATLAB, and the key parameters of the general genetic algorithm are set as shown in Table 4. In addition, if the mass flow rate of an individual is lower than the minimum mass flow rate, the fuel penalty will increase a penalty value.

Combination of the BP Neural Network and Genetic
Algorithm Optimization Model. The BP neural network uses sample point data for sample training to obtain data mapping relationships. Depending on the data mapping relationship, the optimal data can be found in the global parameter range. A schematic diagram of BP neural networks and genetic algorithms is shown in Figure 8.
As shown in Figure 8, the input data of the BP neural network contains the throat aspect ratio, slope angle, opening length, fuel penalty, and mass flow rate. The output data mapping relationships are the throat aspect ratio, slope inclination, and opening length versus fuel substitution loss and mass flow. The output data mapping relationship is the relationship between the throat aspect ratio, slope angle, and opening length and fuel penalty and mass flow.    The global parameters solved by the genetic algorithm are the throat aspect ratio, slope angle, and opening length in a certain range. The objective is to find the combination of structural parameters whose mass flow rate is higher than the minimum value and whose fuel penalty is the lowest at the same time.
Therefore, the method of combining the BP neural network and genetic algorithm was proposed to optimize the structure of a NACA air inlet; the specific flow is shown in Figure 9.
As shown in Figure 9, a BP neural network was established based on the collected database, the network topology was determined, and data samples were input for training.
The network was expressed in terms of network weights and thresholds, which was invoked in the course of the genetic algorithm adaptation calculation. Draw support from genetic algorithms, and the optimal structural parameters of the NACA air inlet were obtained through the selection, replication, crossover, variation, and replacement of the population.

Optimization Results and Discussion
The database of different structural and performance parameters of the NACA air inlet is obtained by CFD simulation. The data are put into the optimization method of the BP neural network and genetic algorithm to train and optimize the samples. The data were trained and optimized by the optimization method combining the BP neural network and genetic algorithm.
Finally, the optimized NACA inlet structure parameters and the mass flow rate and fuel penalty predicted based on the BP neural network and genetic algorithm were obtained. The performance indicators calculated by ESDU and the optimized algorithm are shown in Table 5.
As shown in Table 5, the NACA inlets before and after optimization all meet the mass flow rate requirements. The fuel penalty after optimization is much lower than the one before optimization.
The comparison between the full-sample predicted value of the BP neural network and the calculated value of CFX is shown in Figures 10 and 11.
As shown in Figures 10 and 11, the penalty and mass flow rate error between predicted and calculated values by CFX are small.
The error is represented by the absolute value of mean relative error [17], in order to comprehensively describe the relative error of the test sample. In this case, the absolute values of mean relative error of the mass flow rate and fuel penalty are 1.37% and 1.41%, respectively. It can be seen that the calculation error of the optimization method adopted in this paper is reasonable.
Since the mass flow rate and fuel penalty of the NACA inlet after optimization are predicted by the BP neural network, they cannot fully represent the real performance value with the optimized structural parameters. Therefore, further CFX simulation was conducted to obtain the mass flow rate and fuel penalty at the optimized slope angle (6.813), throat aspect ratio (2.507), and opening length (1781.840). The specific results are shown in Table 6.
As can be seen from Table 6, after optimization, on the premise that the actual mass flow rate meets the design requirements, the fuel penalty is reduced by 74.595 Et kg compared with that before optimization. The error between the optimized prediction value and CFX simulation result is small, the relative error of the mass flow rate is 0.080%, and the relative error of the fuel penalty is 0.083%. Therefore, it is proven that the BP neural network and genetic algorithm optimization model adopted in this paper is reliable.

Conclusion
The existing design specifications cannot fully satisfy the need of aircraft NACA inlet design because of the light weight requirements and higher inlet flow demands. Therefore, by combining the BP neural network and genetic algorithm, a set of optimization design methods which is proven to be suitable for an aircraft NACA air inlet was proposed in this paper. Besides, this method was used to optimize the air inlet of a certain type of aircraft. It can be summarized as follows: (1) The fuel penalty and the lower limit of the inlet mass flow rate can be regarded as the two objectives in the optimization process so that not only the fuel economy has to consider the intake demand (2) A method combining the BP neural network and genetic algorithm was proposed, and the prediction error of the mass flow rate and fuel penalty is small.
The absolute values of mean relative error of the total sample mass flow rate and total sample fuel penalty are 1.37% and 1.41%, respectively     inlet. Therefore, it is promising to be extended to a practical aircraft design process.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
We declare that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted.