# An EWS-LSTM-Based Deep Learning Early Warning System for Industrial Machine Fault Prediction
## 3 Research Design  
The design of this research was informed by both theoretical considerations and practical constraints derived from the industrial context under investigation. The primary objective was to develop an early warning system capable of predicting critical machine faults based on time-series data collected from industrial sensors. The application domain concerned a legacy industrial printing machine, specifically a paper embosser, owned by Sofidel, a leading company in Tuscany (IT) for tissue paper products. This machine is equipped with a wired industrial sensor array installed by the manufacturer. Through its Application Programming Interface (API), access to the floating-point data is guaranteed. This machine lacks a system to alert or advise the operator of potential issues before they occur. Based on the literature and the preliminary data analysis (see Sections 2 and 4), Long Short-Term Memory (LSTM) networks were identified as the most appropriate deep learning architecture. LSTM networks, when combined with attention mechanisms, provide significant advantages in modelling time-series data, particularly when using a sliding-window approach. Time-series data often exhibit irregular patterns, non-stationarity, and long-range dependencies, which require models capable of effectively capturing both short- and long-term relationships [55]. LSTMs are specifically designed to address the limitations of standard recurrent neural networks (RNNs), notably the vanishing gradient problem, by incorporating gating mechanisms that allow information to persist across long sequences. This capability is crucial for time-series data, where dependencies may span across multiple time steps. Furthermore, LSTMs efficiently handle sequences of variable lengths, making them well suited for applications involving sliding window frames. The sliding window approach segments the time series into overlapping sub-sequences, allowing the model to learn meaningful temporal patterns and generalise better to unseen data [56]. The integration of attention mechanisms with LSTM networks enhances their ability to selectively focus on the most informative parts of the input sequence. Attention layers assign different weights to each time step, ensuring that the model prioritises essential information while downplaying less relevant data points. This is particularly beneficial in scenarios where the significance of past observations varies over time. Although CNNs have been successfully applied to time-series analysis, they primarily rely on local receptive fields and weight-sharing mechanisms, which make them more suitable for tasks involving spatial dependencies rather than long-term temporal relationships. CNN-based approaches may struggle to model long-term dependencies effectively without additional mechanisms, such as dilated convolutions or temporal pooling layers. Transformer models, on the other hand, have gained prominence for their ability to capture long-range dependencies without the need for recurrence. However, transformers typically require large amounts of training data to generalise well, and their computational complexity scales quadratically with sequence length due to self-attention operations. Given the constraints of many real-world time-series datasets (where data availability may be limited), LSTM networks with attention provide a more efficient trade-off between performance and computational feasibility [57]. A case study was conducted to describe the activities and results. This method is appropriate for exploring problems and their solutions in real organisational settings [58]. The development of the case study was a collaborative effort between industrial engineers and university researchers, and it was based on the following research phases:  
1. Company selection: The company selected, Sofidel, was deemed a suitable sample [58] due to its involvement in the SCREAM research project, which is funded by the Italian Ministry of Industrial Development. 2.