## 2 Methodology
### Fuzzy Logic Modeling Algorithm  
Modeling procedures start from setting up numerical relations between the input (i.e., flight variables) and output (i.e., flight operations or aircraft response). To obtain continuous variations in predicted results, the present method is based on the internal functions instead of fuzzy sets [25] to generate the output of the model. The fuzzy logic algorithm can take advantage of correlating multiple parameters without assuming explicit functional relations among them [26; 27]. The algorithm employs many internal functions to represent the contributions of fuzzy cells (to be defined later) to the overall prediction. These internal functions are assumed to be linear functions of input parameters as follows [5]:  
\[p^{i}=y_{i}(x_{1},x_{2},\ldots,x_{r},\ldots x_{k})=p_{0}^{i}+p_{1}^{i}x_{1}+ \cdots+p_{r}^{i}x_{r}+\cdots p_{k}^{i}x_{k} \tag{31}\]  
where \(p_{r}^{i}\), \(r=0\), \(1\), \(2\), \(\ldots\), \(k\), are the coefficients of internal functions \(y_{i}\), and \(k\) is number of input variables. In Equation (31), \(y_{i}\) is the estimated aerodynamic coefficient of force or moment, and \(x_{r}\) represents the variables of the input data. The numbers of the internal functions (i.e., cell numbers) are quantified by the membership functions. With the internal function chosen in a linear form, the fuzzy logic model resembles the multiple linear regression method. What makes the fuzzy logic model unique is that it is in the form of a fuzzy cell structure composed of linear equations. In other words, there are different numbers of cells corresponding with each input parameter. The values of each fuzzy variable, such as the angle of attack, are divided into several ranges, each of which represents a membership function [6]. The membership functions allow the membership grades of the internal functions for a given set of input variables to be calculated. The ranges of the input variables are all transformed into the domain of [0, 1]. The membership grading also ranges from 0 to 1.0, with 0 meaning no effect from the corresponding internal function and 1 meaning full effect. Generally, overlapped triangles are the shapes frequently used to represent the grades. A fuzzy cell is formed by taking one membership function from each variable. The output of the fuzzy logic model is the weighted average of all cell outputs. There are two main tasks involved in the fuzzy logic modeling process. One is the determination of coefficients of the linear internal functions. The other is to identify the best structure of fuzzy cells of the model, i.e., to determine the best number of membership functions for each fuzzy variable. The coefficients are calculated with the gradient descent method by minimizing the sum of squared errors (SSE) [6]:  
\[SSE=\sum_{j=1}^{m}{(\hat{y}_{j}-y_{j})^{2}} \tag{32}\]  
On the other hand, the structure of fuzzy cells is optimized by maximizing the multiple correlation coefficient (\(R^{2}\)):  
\[R^{2}=1-\frac{\sum\limits_{j=1}^{m}{(\hat{y}_{j}-y_{j})^{2}}}{\sum\limits_{j=1 }^{m}{(\overline{y}-y_{j})^{2}}} \tag{33}\]  
where \(\hat{y}_{j}\) is the output of the fuzzy logic model, \(y_{j}\) is the measured data, and \(\overline{y}\) is the average value of all extracted data. The aerodynamic model is defined by the values of \(p_{r}{}^{i}\) coefficients. These coefficients are determined by minimizing \(SSE\) (Equation (32)) with respect to these coefficients. Minimization is achieved by the gradient descent method with an iteration formula defined by:  
\[p_{r,t+1}^{i}=p_{r,t}^{i}-\alpha_{r}\frac{\partial(SSE)}{\partial p_{r}^{i}} \tag{34}\]  
where \(\alpha_{r}\) is the convergence factor or step size in the gradient method. Since  
\[\frac{\partial(SSE)}{\partial p_{r}^{i}}=2\sum\limits_{j=1}^{m}{(\widehat{y}_ {j}-y_{j})\frac{\partial\widetilde{y}_{j}(x_{1,j},\ldots,x_{k,j},p_{r}^{1}, \ldots,p_{k}^{n})}{\partial p_{r}^{i}}}, \tag{35}\]  
the computed gradient tends to be small and the convergence is slow.