# Fault Diagnosis of Railway Point Machines Using the Locally Connected Autoencoder
## 3 Methodology
### The Proposed Locally Connected Autoencoder  
Figure 2 shows the overall structure of the proposed fault diagnosis system. First, the current signals are generated from the point machine and are captured by the current sensors. The signals are then transmitted by an LTE communication device to the cloud platform where the signals are stored. The proposed fault diagnosis algorithm is deployed on the cloud platform. The network structure of a typical autoencoder consists of an input layer, a hidden layer, and an output layer [25]. As a small  
Figure 1: Operating phases of the point machine. See the text for additional detail. alteration of the typical neural network, the output target of the autoencoder is set to be the input data, that is, the output should be as close to identical as possible to reconstruct the input data. Therefore, the autoencoder can be regarded as an unsupervised learning process since it does not require labeled data. The input layer and the hidden layer constitute the encoder part. The hidden layer generally has fewer neurons, where the high-dimensional raw signals are mapped onto the low-dimensional feature space. Thereby, a kind of the high-order feature representation is seized. Conversely, the decoder part consists of a hidden layer and an output layer, which reconstructs the input signal from the extracted features. Let \(\mathbb{S}=\{\mathbf{s}_{1},\mathbf{s}_{2},\cdots,\mathbf{s}_{N}\}\) denote the set of current signals of the point machines. For a certain signal \(\mathbf{s}_{i}\), we define  
\[\mathbf{h}_{i}=f(\mathbf{s}_{i};\Theta),\]  
where \(f(\cdot)\) represents the encoding function. \(\mathbf{h}_{i}\) is the encoder vector that represents the feature of the input signals and \(\Theta\) is the set of the encoder parameters. Similarly, for the decoder part, we define  
\[\mathbf{y}_{i}=g(\mathbf{h}_{i};\Theta^{\prime}),\]  
where \(\Theta^{\prime}\) is defined as the set of the decoder parameters. \(\mathbf{y}_{i}\) is the network output and \(\mathbb{Y}=\{\mathbf{y}_{1},\mathbf{y}_{2},\cdots,\mathbf{y}_{N}\}\) denotes the output set. \(g(\cdot)\) represents the reconstruction function. Generally, an affine function is employed in \(f(\cdot)\) and \(g(\cdot)\), that is,  
\[f(\mathbf{s}_{i};\Theta)=\sigma_{f}(\mathbf{W}\mathbf{s}_{i}+\mathbf{b}),\]  
\[g(\mathbf{h}_{i};\Theta^{\prime})=\sigma_{g}(\mathbf{W}^{\prime}\mathbf{h}_{i} +\mathbf{b}^{\prime}),\]  
where \(\Theta=\{\mathbf{W},\mathbf{b}\}\) and \(\Theta^{\prime}=\{\mathbf{W}^{\prime},\mathbf{b}^{\prime}\}\) and \(\mathbf{W}\) and \(\mathbf{b}\) are, respectively, the weight matrix and the bias vector of the encoder part, and \(\mathbf{W}^{\prime}\) and \(\mathbf{b}^{\prime}\) are, respectively, the weight matrix and the bias vector of the decoder part. Further, \(\sigma_{f}(\cdot)\) and \(\sigma_{g}(\cdot)\) represent the activation functions used to seize nonlinear relationships. Figure 2: The flow chart of the proposed fault diagnosis scheme of the point machine. To describe the average differences (also termed as the reconstruction errors) between the outputs of the decoder part and the actual values, a loss function is defined and calculated as  
\[\min_{\mathbf{W},\mathbf{W},\mathbf{b},\mathbf{b}^{\prime}}\frac{1}{N}\sum_{i=1}^{N}L(\mathbf{s}_{i},\sigma_{g}(\sigma_{f}(\mathbf{s}_{i}))), \tag{1}\]  
where  
\[L(\mathbf{x},\mathbf{x}^{\prime})=\|\mathbf{x}-\mathbf{x}^{\prime}\|_{2}^{2}.\]  
Note that in the above-mentioned autoencoder, each training sample is directly fed to the input layer. Thus, the extracted features are global descriptions that may lack the representation of local properties. To enhance the local properties of the fault signals, we divide the raw signals into segments for feature extraction. For each current signal \(\mathbf{s}_{n}\) in dataset \(\mathbb{S}\), \(\mathbf{s}_{n}\in\mathfrak{R}^{|\mathbf{s}_{n}|\times 1}\) denotes the \(n\)th signal with \(|\mathbf{s}_{n}|\) data points.