# Research on Distributed Fault Diagnosis Model of Elevator Based on PCA-LSTM
## 2 PCA-LSTM Based Fault Prediction Model  
### Introduction to Principal Component Analysis (PCA)  
Principal Component Analysis (PCA) is a widely used unsupervised learning technique that transforms observed data containing linearly correlated variables into a smaller number of linearly independent variables, known as principal components. Since the number of principal components is typically fewer than the original variables, PCA serves as an effective dimensionality reduction method. It not only reveals the fundamental structure of the data, that is, the intrinsic relationships among variables but is also commonly used as a preprocessing step for other machine learning methods. In the context of elevator operations, each fault data point may be caused by multiple fault characteristics. However, there may be redundancy among some of these characteristics, and using all these features directly for fault diagnosis could increase the training time of machine learning models and affect their accuracy. Therefore, dimensionality reduction to retain the most critical fault characteristics is particularly important and does not compromise the overall diagnostic effectiveness. In this study, we applied PCA to elevator fault data for dimensionality reduction, and we input the processed data into an LSTM model for further analysis. In selecting the principal components within PCA, we first assessed the characteristics of the dataset, including the volume of data, the feature distribution, and the relationship between features and common types of faults. Depending on the specifics of the dataset, we chose those principal components that contributed the most to the variance, which are typically able to capture the key variations in the fault data. Additionally, we considered the interpretability of the data, choosing principal components that can intuitively explain the fault phenomena, thus facilitating an understanding of the model's output and effective fault diagnosis. In this way, PCA not only helps us simplify the data structure but also ensures that critical information necessary for fault diagnosis is not lost during the dimensionality reduction process. When applying PCA to elevator fault diagnosis, we usually follow the steps applied in the current research. In this study, we first applied Principal Component Analysis (PCA) to the multi-dimensional sensor data collected during elevator operations, such as speed, vibration, and temperature data. The elevator fault data are characterized by high dimensionality, containing a substantial amount of redundancy and noise. By implementing PCA, we were able to effectively identify and retain the most influential features for fault type determination while eliminating irrelevant noise. Operationally, we chose principal componentsthat accounted for over 85% of the variance in the original dataset. This threshold was determined based on an analysis of the characteristics of elevator fault data, with the aim of preserving the maximum amount of information critical to diagnosing elevator faults. For instance, if preliminary analysis indicated that vibration and temperature indicators were particularly important for predicting certain types of faults, the principal components associated with these indicators would be prioritized during the PCA process. The initial step in preprocessing the elevator dataset, which consists of \(n\) samples each with \(m\) features forming an \(n\times m\) dimensional matrix, \(X\_nm\), is to organize the data points to facilitate further analysis. \[ \begin{bmatrix}x_{11}&x_{12}&\cdots&x_{1m}\\ x_{21}&x_{22}&\cdots&x_{2m}\\ \vdots&\vdots&\ddots&\vdots\\ x_{n1}&x_{n2}&\cdots&x_{nm}\end{bmatrix}  \tag{1}\]  
Step 1. Data normalization. Normalize the data \(X_{nm}\) for each feature normalized to a mean of 0 and a root mean square of 1.