# Prediction of Machine Failure in Industry 4.0: A Hybrid CNN-LSTM Framework
## 5 Hybrid CNN-LSTM Model for PdM
### Dataset  
The data used in this experiment are from Microsoft's case study. The dataset provides information about the failure history, maintenance history, error conditions, and machine features and telemetry, which consists of information such as voltage, pressure, vibration,  
Figure 4: Illustration of proposed hybrid CNN-LSTM model for predictive maintenance.  
Figure 3: Overview of the input data \(x_{t}\) over a time sequence \(t\) with \(n+1\) values and output data \(Y_{t}\) over a time sequence \(t\) with \(m+1\) values.  
\[X^{{}^{\prime}}=\frac{X-X_{\min}}{X_{\max}-X_{\min}} \tag{8}\]  
where \(X\) represents the value of a time series at any time instant, \(X_{\min}\) and \(X_{\max}\) represent the features with minimum and maximum values. According to the above equation, the  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Data Source** & **Description** & \\ \hline \multirow{2}{*}{Telemetry} & Time-series data of voltage, rotation, pressure, and vibration measurements recorded in real time from \\  & 100 machines and averaged across every hour throughout 2015. \\ \hline \multirow{2}{*}{Errors} & Non-breaking errors that machines throw while in operation. \\ \hline \multirow{2}{*}{Maintenance} & Scheduled and unscheduled records corresponding to inspection and failures of different components. \\ \hline \multirow{2}{*}{Machines} & Includes machine summary such as model, age, and years in service. \\ \hline \multirow{2}{*}{Failures} & Records of the replacements due to failures. \\ \hline \hline \end{tabular}
\end{table}
Table 1: A detailed description of different data sources.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Datetime** & **MachineID** & **ErrorID** \\ \hline
2015-01-03 07:00:00 & 1 & error1 \\
2015-01-03 20:00:00 & 1 & error3 \\
2015-01-04 06:00:00 & 1 & error5 \\
2015-01-10 15:00:00 & 1 & error4 \\
2015-01-22 10:00:00 & 1 & error4 \\
2015-01-12 14:00:00 & 2 & error4 \\
2015-05-30 20:00:00 & 2 & error5 \\
2015-11-20 23:00:00 & 3 & error1 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Different errorIDs with the respective machineID and datetime.  
Figure 6: Records of component replacements that have occurred as a result of failures. A date and time stamp, machineID, and failed component type are all included in each entry.  
Figure 7: Frequency of different error conditions along with a set of 100 machines.  
value of \(X\) is scaled in the range [0, 1] when the value of \(X\) lies between the maximum and minimum values. It was also observed that machine breakdowns are usually rare events of the assets as compared to normal operation in predictive maintenance. This generates an imbalance in the label distribution, resulting in poor performance because algorithms prefer to classify majority class examples over minority class examples, as the total misclassification error is greatly reduced when the majority class is correctly classified. Although accuracy can be high, this results in low recall rates, which becomes a bigger issue when the cost of false alarms is considerable. To address this issue, simple strategies such as oversampling minority cases [38], were considered. The data are split: 70% training set, 10% validation set, and 20% test set, as shown in Table 3. Finally the proposed model is evaluated on the test dataset.