Servo Motor Predictive Maintenance by Kafka Streams and Deep Learning Based on Acoustic Data †
Abstract
1. Introduction
2. Related Work
3. Materials and Methods
3.1. System Architecture
3.2. Functional Workflow
3.3. Data Acquisition
3.4. Data Streaming and Processing
- Mel-spectrograms: 128 mel filters, 2048-point FFT, 512 hop length, Hann window
- Welch’s method: 1024-point FFT, 50% overlap, Hamming window
- Sampling rate: 16 kHz with 16-bit resolution
- Frame duration: 64 ms with 32 ms overlap
- Feature fusion: Mel-spectrograms and Welch features processed separately then concatenated.
3.5. Anomaly Detection
3.6. Anomaly Detection vs. Fault Classification
- -
- Anomaly detection: binary classification identifying deviations from normal acoustic patterns (MSE > 0.05):
- -
- Detects “something is different” without specifying the exact nature of the problem;
- -
- Unsupervised approach requiring only normal operation data for training;
- -
- Output: normal vs. anomalous (binary decision).
- -
- Fault classification (not performed in this system): multi-class categorization of specific failure types:
- -
- Would require labeled datasets for each fault type (bearing wear, misalignment, etc.);
- -
- Supervised learning approach with known fault categories;
- -
- Output: specific fault type identification.
- -
- System Limitations: The current approach cannot distinguish between the following:
- -
- Different types of mechanical faults;
- -
- Severity levels of the same fault type;
- -
- Root causes of acoustic deviations;
- -
- Harmless acoustic variations vs. critical failures.
3.7. Forecasting and Scheduling
3.8. Experimental Setup
4. Results
4.1. Anomaly Detection
4.2. SPC Fault Detection
4.3. Forecasting Accuracy
4.4. System Performance
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Peres, R.S.; Jia, X.; Lee, J.; Sun, K.; Colombo, A.W.; Barata, J. Industrial Artificial Intelligence in Industry 4.0—Systematic Review, Challenges and Outlook. IEEE Access 2020, 8, 220121–220139. [Google Scholar] [CrossRef]
- Achouch, M.; Dimitrova, M.; Ziane, K.; Sattarpanah Karganroudi, S.; Dhouib, R.; Ibrahim, H.; Adda, M. On Predictive Maintenance in Industry 4.0: Overview, Models, and Challenges. Appl. Sci. 2022, 12, 8081. [Google Scholar] [CrossRef]
- Hector, I.; Panjanathan, R. Predictive maintenance in Industry 4.0: A survey of planning models and machine learning techniques. PeerJ Comput. Sci. 2024, 10, e2016. [Google Scholar] [CrossRef] [PubMed]
- Lo Scudo, F.; Ritacco, E.; Caroprese, L.; Manco, G.A. Audio-based anomaly detection on edge devices via self-supervision and spectral analysis. J. Intell. Inf. Syst. 2023, 61, 765–793. [Google Scholar] [CrossRef]
- Global Trade Insights. Automotive Predictive Maintenance Market Analysis Report 2023–2032. Available online: https://market.us/report/automotive-predictive-maintenance-market/ (accessed on 19 May 2025).
- Di Fiore, E.; Ferraro, A.; Galli, A.; Moscato, V.; Sperlì, G. An anomalous sound detection methodology for predictive maintenance. Expert Syst. Appl. 2022, 209, 118324. [Google Scholar] [CrossRef]
- Koizumi, Y.; Saito, S.; Uematsu, H.; Kawachi, Y.; Harada, N. Unsupervised detection of anomalous sound based on deep learning and the Neyman-Pearson lemma. IEEE/ACM Trans. Audio Speech Lang. Process. 2018, 27, 212–224. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Taylor, S.J.; Letham, B. Forecasting at scale. Am. Stat. 2018, 72, 37–45. [Google Scholar] [CrossRef]
- Kreps, J.; Narkhede, N.; Rao, J. Kafka: A Distributed Messaging System for Log Processing. Available online: http://notes.stephenholiday.com/Kafka.pdf (accessed on 19 May 2025).
- Hinton, G.E.; Salakhutdinov, R.R. Reducing the dimensionality of data with neural networks. Science 2006, 313, 504–507. [Google Scholar] [CrossRef] [PubMed]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
- Espressif Systems. ESP32-LyraT Hardware Reference. Available online: https://www.espressif.com/en/support/documents/technical-documents (accessed on 19 May 2025).
- Welch, P.D. The use of fast Fourier transform for the estimation of power spectra: Method based on time averaging over short, modified periodograms. IEEE Trans. Audio Electroacoust. 1967, 15, 70–73. [Google Scholar] [CrossRef]




| Sound Type | Accuracy (%) | Precision (%) | Recall (%) | F1-Score |
|---|---|---|---|---|
| Anomalous | 90.8 | 91.2 | 90.5 | 0.908 |
| Model | 12 Hours | 24 Hours | 48 Hours | Scheduling (%) |
|---|---|---|---|---|
| ARIMA | 0.0105 | 0.0118 | 0.0135 | 90 |
| LSTM | 0.0075 | 0.0078 | 0.0095 | 95 |
| Prophet | 0.0088 | 0.0092 | 0.0112 | 93 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Aradi, A.; Varga, A.K. Servo Motor Predictive Maintenance by Kafka Streams and Deep Learning Based on Acoustic Data. Eng. Proc. 2025, 113, 1. https://doi.org/10.3390/engproc2025113001
Aradi A, Varga AK. Servo Motor Predictive Maintenance by Kafka Streams and Deep Learning Based on Acoustic Data. Engineering Proceedings. 2025; 113(1):1. https://doi.org/10.3390/engproc2025113001
Chicago/Turabian StyleAradi, Attila, and Attila Károly Varga. 2025. "Servo Motor Predictive Maintenance by Kafka Streams and Deep Learning Based on Acoustic Data" Engineering Proceedings 113, no. 1: 1. https://doi.org/10.3390/engproc2025113001
APA StyleAradi, A., & Varga, A. K. (2025). Servo Motor Predictive Maintenance by Kafka Streams and Deep Learning Based on Acoustic Data. Engineering Proceedings, 113(1), 1. https://doi.org/10.3390/engproc2025113001

