# Research on Distributed Fault Diagnosis Model of Elevator Based on PCA-LSTM
## 4 Experiments and Analysis
### Description of Data  
The category type data, such as the floor, controller status, and region under different operating conditions of the elevator, were one-hot coded, and the features increased to 50. Subsequently, the median of the missing values was filled in, and the four main feature values of the rated current, starting current, average acceleration, and operation noise were normalized using the \(Z\)-score. The calculation method was as follows:  
\[y_{i}=\frac{x_{i}-\overline{x}}{S}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Current (A)** & **Vibration (Gs)** & **Voltage (V)** & \(\ldots\) & **Fault Type** \\ \hline
1 & 10.8003144 & 0.5892473887 & 202.880298359057 & \(\ldots\) & Motor \\
2 & 13.52810469 & 0.555962679 & 204.670789465698 & \(\ldots\) & None \\
3 & 11.90017683 & 0.5540773585 & 212.292156992934 & \(\ldots\) & Bearing \\ \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) \\
21535 & 7.704778110 & 0.3858098580 & 207.87484255511 & \(\ldots\) & Door \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Elevator part of the experimental data. \begin{table}
\begin{tabular}{c} 500 \\ 500 \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Total sample database. \begin{table}
\begin{tabular}{c c} \hline \hline
**Encodings** & **Failure Mode** & **Number of Samples** \\ \hline S\({}_{1}\) & Safety circuit disconnected & 15 \\ S\({}_{2}\) & Door lock disconnected & 15 \\ S\({}_{3}\) & Drive Overload & 15 \\ S\({}_{4}\) & Change-over stop failure & 15 \\ S\({}_{5}\) & Current Detection Fault & 15 \\ S\({}_{6}\) & Failure of door opening signal & 15 \\ S\({}_{7}\) & Abnormal braking force of holding brake & 15 \\ S\({}_{8}\) & Inadequate car damping system & 15 \\ S\({}_{9}\) & Excessive leveling time & 15 \\ S\({}_{10}\) & Composite faults & 15 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Fault sample database. where \(x_{i}\) denotes the original value of the feature, and \(y_{i}\) denotes the new feature with a transformed mean of 0 and a variance of 1. The 3D scatter plot in Figure 8 illustrates the dimensionality reduction process of fifteen feature variables to three principal components utilized in diagnosing elevator faults with a PCA-LSTM model. Each point on the plot represents an observational sample, with colors indicating the operational state of the elevator: blue for normal and red for faulty conditions. In the PCA process, the original fifteen features were first standardized to eliminate scale effects and centralize the data. Subsequently, PCA extracted new features--principal components--by identifying the directions of maximum variance within the data, which were linear combinations of the original variables. Figure 8 displays the three most significant principal components that captured the majority of the data's variability. This dimensionality reduction technique not only reduced the computational load for the subsequent LSTM model but also enhanced the diagnostic accuracy by mitigating the impact of irrelevant noise and less significant features. Additionally, the three-dimensional space formed by these principal components allowed for visual observation of the separation between normal and faulty states, thereby validating the effectiveness of PCA in feature abstraction and data compression. Figure 9 displays the training results of the model, using elevator speed as the reference metric to demonstrate the effectiveness of the PCA-LSTM model. The solid blue line represents the actual elevator speed data during operation, which remained relatively stable most of the time but exhibited significant changes at the moment of the fault onset. The dashed red line illustrates the predictions made by the PCA-LSTM model based on historical data. The dashed gray line marks the time point when the fault occurred.