# Fault Diagnosis Method for Aircraft EHA Based on FCNN and MSPSO Hyperparameter Optimization
## 5 Typical Fault Simulation and Fault Data Acquisition of EHA
### GADF-Based Image Processing of Fault Sample Sets  
GADF is a feature transformation method that can encode a one-dimensional signal sequence into a two-dimensional map, which is generally used in image classification problems. The essence of GADF is dimensionality enhancement, which can fully exploit the topological feature information in the sample to ensure topological recognition. Therefore, we consider the GADF method for feature transformation. The one-dimensional EHA fault sample data is encoded as an image, and a deep learning model performs topological classification. GADF not only preserves the regularity of each feature in the fault data, but also provides other topological feature information, such as multiple relative relationships between nodes, which plays a vital role in the subsequent work of stable extraction of topological features [36; 37; 38]. The steps of feature transformation by GADF method are as follows [37]:  
Step 1: Numerical normalization. Each fault sample set in 5.3 is composed of six one-dimensional signals \(X=(x_{1},x_{2},\cdots x_{576})\), and each one-dimensional signal consists of \(n\) timestamps \(t\) and their corresponding values \(x\). To prevent the inner product from being biased towards the maximum, the data \(x(t)\) associated with each moment in the failure sample set is normalized. \[\widetilde{x}(t)=\frac{x(t)-x_{\min}}{x_{\max}-x_{\min}} \tag{19}\]  
\(\widetilde{x}(t)\) is the normalized result of the parameter at time \(t\), \(x_{\min}\) and \(x_{\max}\) are the maximum and minimum values of the parameter in the corresponding data set, respectively. Step 2: Polar coordinate transformation. The normalized fault data can be converted to the polar coordinate system by converting the scaled values to the angle \(\varphi\) and the timestamp \(t\) to the radius \(r\). \[\left\{ \begin{aligned} \varphi_{t}&=\arccos[ \widetilde{x}(t)]\\ r&=\frac{t}{N}\end{aligned} \right. \tag{20}\] \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Num**} & **Displacement** & **Velocity** & **Pressure Difference** & **Flow of** & **Rotation Speed** & **Outlet Pressure** \\  & **of Actuator** & **of Actuator** & **of Pump** & **Plunger Pump** & **of Motor** & **of Accumulator** \\ \hline
1 & 0.2008 & \(-0.0008\) & \(-2.6600\) & \(20.3202\) & \(2423.4024\) & \(-5.1040\) \\
2 & 0.2008 & \(-0.0008\) & \(-2.6600\) & \(20.31987\) & \(2423.3584\) & \(-5.1040\) \\ \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) \\
206 & \(-0.2139\) & 2.6553 & \(-0.1578\) & \(81.1545\) & \(9727.8676\) & \(-2.2610\) \\
207 & \(-0.1836\) & 3.3891 & \(-0.4929\) & \(71.17593\) & \(8900.0614\) & \(-2.8220\) \\ \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) & \(\cdots\) \\
576 & \(-0.1506\) & 0.0006 & 1.9900 & \(-17.57166\) & \(-2010.5476\) & \(-3.2170\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Data of a fault sample set. where \(t\) is the timestamp, \(t_{i}=(1,2,\cdots N)\), and \(N=576\) in this paper. Step 3: Trigonometric transformation. After transforming the 1D fault data into the polar coordinates, we can easily exploit the angular perspective by considering the trigonometric difference between each point to identify the temporal correlation within different time intervals. The GADF are defined as follows:  
\[GADF= \begin{bmatrix}\sin(\varphi_{1}-\varphi_{1})&\cdots&\sin(\varphi_{1}- \varphi_{n})\\ \sin(\varphi_{2}-\varphi_{1})&\cdots&\sin(\varphi_{2}-\varphi_{n})\\ \sin(\varphi_{n}-\varphi_{1})&\cdots&\sin(\varphi_{n}-\varphi_{n})\end{bmatrix}  \tag{21}\]  
The matrix elements are corresponded to grayscale to generate grayscale images, and the different grayscale values are corresponded to different colors to get the desired feature profiles.