Predicting turbofan engine failures with LSTM
A predictive-maintenance project using LSTM networks and simulated turbofan data to explore early failure detection.
A learning project shared by the community. The article documents its team, methods and results; it does not establish that the prototype is ready for real-world use.

Members:
- Alanoca Huaycho, Alvaro (https://www.linkedin.com/in/alvaro-alanoca-huaycho-b582b6139/)
- Martínez Alegría, Albert (https://www.linkedin.com/in/albert-martinez-alegria/ )
INTRODUCTION
Corrective maintenance can be costly: a breakdown can stop production as well as require repairs. Preventive maintenance schedules work at defined intervals, even when some parts may still be usable. The challenge is to complement these approaches with information about the equipment’s actual condition.
Advances in technology make it possible to explore ways of anticipating failures. This approach is known as predictive maintenance (PdM). Sensors provide vibration, temperature and other measurements, while oil or grease analysis offers further information about equipment condition.
Fig. 1. Difference in production profit between traditional preventive maintenance and predictive maintenance, where only production is stopped based on conditions.
PROBLEM DESCRIPTION
We want to reduce the time and resources needed to respond to failures and explore whether preventive interventions can better reflect equipment condition. Both affect machine availability and production continuity.
DATASET
We used NASA C-MAPSS simulated turbofan degradation data. Its records represent operating cycles, not calendar days. Similar approaches could be explored for other rotating machines, such as motors or hydraulic pumps, but would require equipment-specific data and validation.

Fig. 2. Image of the turbofan simulated by C-MAPSS.

Table 1. Detail of the columns of the test and training datasets.
PROPOSED SOLUTION
The project explores failure detection within an operating horizon, aiming to support earlier planning of maintenance stops and spare-part purchases.
MODEL SELECTION
RNN
Recurrent neural networks (RNNs) process sequences while maintaining a state that incorporates information from earlier steps. This allows them to model temporal relationships, although conventional RNNs can struggle with long-range dependencies.

Fig. 3. Architecture of a Recurrent Neural Network (RNN)

Fig. 4. Architecture of a Long Short-Term Memory (LSTM)
LSTM
RNN training can be affected by vanishing or exploding gradients. LSTM networks are a variant designed to handle longer dependencies. Their memory cells and gates regulate which information to retain, update or pass on; they are not automatically the best model for every task.

Fig. 5. RNN programming with LSTM
The network has two LSTM layers with 100 and 50 units respectively. Each is followed by dropout to reduce overfitting. A final dense layer with sigmoid activation produces a score between 0 and 1; interpreting it as a reliable probability requires calibration assessment.
PCA
Principal component analysis (PCA) is an unsupervised technique for reducing dimensionality and preparing data for the model.

Fig. 6. PCA applied to three dimensions to be able to graph it.

Fig. 7. Full dataset: 21 sensors and 3 operating settings.

Fig. 7. Data reduced to eight principal components using PCA.
METRICS
The recorded tests report 95.11% accuracy and several F1 measures, with the macro average being the lowest. A separate comparison with test data reports 97%. These results should not be combined into a single performance figure without identifying the data splits and evaluation conditions.

Fig. 8. Calculated metrics: Accuracy Score, F1-Score Macro, F1-Score Micro, F1-Score Weighted.
ANALYSIS OF RESULTS
The displayed confusion matrix corresponds to 92.77% accuracy. The ROC curve illustrates the trade-off between true and false positives across thresholds; it does not by itself establish a safe operating threshold.

Fig. 9. Confusion Matrix

Fig. 10. ROC CURVE
RESULT
The prototype produces a failure estimate over a 30-cycle horizon. The original interface labels this “30 days”, but C-MAPSS measures operating cycles. Selecting an engine identifier gives, in this example, a score for engine 16 of 1.8%. This output does not establish that the engine is safe or replace inspections and maintenance criteria.
In a potential application, repeating the analysis periodically could help maintenance teams prioritise inspections. Operational decisions would require validation and technical oversight.

Fig. 11. Prototype output. The original “30 days” label needs qualification: the data are expressed in operating cycles.
CONCLUSION
The application demonstrates how equipment data can be analysed to explore early failure detection. With further validation, this approach could support maintenance planning and spare-part purchases; the experiment does not establish the exact time of a failure.
The result of around 95% comes from one evaluation on simulated data. Before industrial use, the model would need validation on real equipment, assessment of missed failures and calibration of its outputs. IoT-connected sensors could supply data for that work.
Maintenance that better reflects equipment condition could reduce unnecessary replacements and make better use of oils and greases. Any reduction in industrial waste would need to be measured in a real deployment.
CODE
BIBLIOGRAPHY
[1] D. Bruneo and F. De Vita, “On the use of LSTM networks for predictive maintenance in smart industries,” in Proceedings — 2019 IEEE International Conference on Smart Computing, SMARTCOMP 2019, 2019, pp. 241–248, doi: 10.1109/SMARTCOMP.2019.00059.
[2] S. Guldamlasioglu and O. Aydın, “Using LSTM networks to predict engine condition on large scale data processing framework”, 2017, doi: 10.1109/ICEEE2.2017.7935834.
[3] L. Swanson, “Linking maintenance strategies to performance,” Int. J. Prod. Econ., vol. 70, no. 3, pp. 237–244, Apr. 2001, doi: 10.1016/S0925–5273(00)00067–0
[4] A. Martínez, “Recurrent Neural Networks with LSTM applied to Predictive Maintenance, Case: Degradation of turbofan engines”, 2020, Universidad Católica Boliviana “San Pablo”.
More artificial intelligence!
Saturdays.AI makes AI more accessible through shared learning and projects with a social purpose. Our motto is AI4ALL IS AI4GOOD.
A story from the Saturdays.AI community. Originally published on Aug 10, 2022.
← More community stories


