###### Abstract  
Optimizing energy consumption is an important aspect of industrial competitiveness, as it directly impacts operational efficiency, cost reduction, and sustainability goals. In this context, anomaly detection (AD) becomes a valuable methodology, as it supports maintenance activities in the manufacturing sector, allowing for early intervention to prevent energy waste and maintain optimal performance. Here, an AD-based method is proposed and studied to support energy-saving predictive maintenance of production lines using time series acquired directly from the field. This paper proposes a deep echo state network (DeepESN)-based method for anomaly detection by analyzing energy consumption data sets from production lines. Compared with traditional prediction methods, such as recurrent neural networks with long short-term memory (LSTM), although both models show similar time series trends, the DeepESN-based method studied here appears to have some advantages, such as timelier error detection and higher prediction accuracy. In addition, the DeepESN-based method has been shown to be more accurate in predicting the occurrence of failure. The proposed solution has been extensively tested in a real-world pilot case consisting of an automated metal filter production line equipped with industrial smart meters to acquire energy data during production phases; the time series, composed of 88 variables associated with energy parameters, was then processed using the techniques introduced earlier. The results show that our method enables earlier error detection and achieves higher prediction accuracy when running on an edge device. energy consumption; artificial intelligence; anomaly detection; echo state network; predictive maintenance; edge computing; industrial internet of things +
Footnote †: journal:  
of production performance both in terms of efficiency and in terms of consumption has increasingly attracted attention [2; 3]. Energy saving can be achieved in different ways, for example, through the application of energy-efficient technologies in production areas, operational planning improvement, and effective maintenance of all actors located in the factory. Indeed, in order to ensure the energy optimization of machinery and processes, both scheduled and predictive maintenance become essential. To ensure that a plant achieves the desired performance, it is important to design a monitoring system to gather information about the performance on maintenance operations and maintenance results. Usually, in a production plant, not only do normal wear and deterioration occur--which can often be detected by diagnostic techniques based on models, signals, or data, such as those reported in [4; 5; 6]--but other anomalies may also result from less easily diagnosed or measurable phenomena, especially if caused by manual operating errors, incorrect settings, or when the systems are pushed beyond their design limits. As a result, problems with production inefficiency, energy losses, increased costs, equipment downtime, plant unavailability, and excessive environmental pollution can eventually arise [7]. The effects of correct process design and operational maintenance on energy consumption have been addressed, for example, in energy-intensive sectors such as the steel industry [8] as well as in the study of the selection and diagnosis of cutting tools [9; 10], optimizing the performance of machine parameters [11; 12], and even preservation strategies for air pressure systems [13]. Further approaches used to account for inefficiencies are based on performance indicators, e.g., [PERSON] et al. [14] introduced overall environmental equipment effectiveness (OEEE), which allows one to take into account energy efficiency and sustainability when evaluating the effectiveness of the production processes, while in [15], a new performance indicator is proposed that also takes labor's effectiveness into account.