# Research on Distributed Fault Diagnosis Model of Elevator Based on PCA-LSTM
## 3 Distributed Elevator Fault Diagnosis System
### Distributed Algorithms
The line graph in Figure 7 delineates the relationship between the number of elevator units incorporated into a distributed diagnostic system and the corresponding accuracy of fault detection. The graph reveals a trend of increasing diagnostic accuracy as a function of the system's expansion, with the y-axis denoting the percentage of diagnostic accuracy, and the x-axis represents the cumulative number of elevator units integrated into the system. A dashed red horizontal line marks the 90% accuracy threshold, which serves as a standard for evaluating the efficacy of the diagnostic algorithm. The dashed green vertical line intersects this accuracy threshold at the point where the system includes 10 elevator units, denoted with the annotation \"81.84% at 10 Units\". This specific juncture signifies a notable improvement in diagnostic precision, which can be attributed to the enhanced collective intelligence and data pooling afforded by the distributed approach. The degree gradient descent idea is followed. First, the local agents utilize their LSTM model and the parameters \(x_{i}\). To derive the prediction model, each agent gradient can be obtained as \(g(x_{i})=\
abla f^{i}(x^{i})\), and the parameters of each agent \(x_{i}\) can be updated as follows: \(x^{i}=x^{i}-\eta\ g(x^{i})\), where \(\eta\) is  
Figure 7: Diagnostic accuracy of distributed elevator fault detection systems. the learning rate. The next key part of collaborative learning requires parameter passing: \(x^{i}=\sum\limits_{j\subset N(i)}\pi_{ij}x^{i}\). The \(\pi_{ij}\) denotes the weight matrix \(\Pi\in R^{N\times N}\) in the elements of row \(i\) and column \(j\). Throughout this paper, we assume that \(p\) is symmetric and random. If elevators \(j\) and \(i\) are not adjacent, weights \(P_{ij}\) can be set to 0. Distributed learning schemes train models by exchanging their parameters, with the parameters passed from elevator \(i\) to elevator j occurring after elevator \(i\) is updated. This is a sequential update strategy in which the communication layer used for synchronization is responsible for collecting parameters from all neighbors and then triggering the next step. Using this structure, all agents are able to synchronize the update of their parameters in the same step. Algorithm 1 presents the decentralized distributed machine learning algorithm (D-PSGD). ```
The // algorithm is run on each individual worker node, here denoted as node k Initialize: Local model parameters on node \(\mathrm{k}w_{0}^{k}\), the weight matrix, \(W\), of network communication between individual nodes, i.e., the neighbor relationship, as well as the weights of the neighbors For\(t=1,2,\ldots,\mathrm{T}\)do  Local construction of random samples (or small batches of random samples), \(D_{t}^{k}\)  Based on the \(D_{t}^{k}\), compute the local stochastic gradient \(\
abla f_{i}\left(w_{t}^{k};D_{t}^{k}\right)\)  Get each other's parameters from neighboring nodes, and calculate the neighboring node parameter combinations \(w_{t+\frac{1}{2}}^{k}=\sum_{j=1}^{n}W_{k_{j}}w_{t}^{j}\)  Update the local parameters with a combination of the local gradient and the parameters of the neighbors together: \(w_{t+1}^{k}\gets w_{t+\frac{1}{2}}^{k}-\eta\
abla f_{k}\left(w_{t}^{k};D_{ t}^{k}\right)\) endfor Output: \(\frac{1}{n}\sum_{k=1}^{n}w_{T}^{k}\)
```  
**Algorithm 1**Decentralized distributed machine learning algorithm (D-PSGD)