**4. Conclusions**

In this work, a study of the state of the art of predictive maintenance techniques, focused on industrial environments, has been carried out. The variables to be monitored, the most relevant indicators and the most common treatment techniques have been analyzed to generate a basis on which to build the fault detection system to be carried out.

A monitoring methodology applicable to complex machines has been presented, in which work is carried out at different levels with the aim of extracting the most significant features from each piece of data. This methodology has been tested on a prototype cash counting machine, which meets the description of a complex machine.

By analyzing the results obtained in each of the levels in which we have worked, we have identified the most relevant data. In this way, it has been possible to significantly reduce the amount of data to be used, being able to continue identifying the corresponding failure in each case. All this allows a considerable reduction in the computational demand of the system.

As future work, the use of a cloud computing environment is proposed. Communication via IP with the cloud of numerous machines would allow the generation of a global neural model that reaches a higher degree of abstraction than can be achieved locally on the machine.

In short, a fault dectection system capable of identifying the failure that is occurring from the data extracted from a complex machine has been developed. This makes it posible to warn the operator who can correct the defect or it also can be used as a manufacturing quality control system.

**Author Contributions:** Conceptualization, R.C. and A.G.; methodology, R.C., A.G., D.B. and Á.M.; hardware, R.C. and A.G.; software, A.G. and Á.M.; validation, D.B. and Á.M.; formal analysis, R.C., A.G., D.B. and Á.M.; investigation, R.C. and A.G.; data curation, A.G.; writing, R.C., A.G., D.B. and Á.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work has been partially supported by the Aragon Regional Government thought the program for R&D group (T59\_20R) and by Sallén Tech SL. The work of Alvaro Marco has been partially supported by the Spanish Government, program Torres Quevedo (PTQ2017-09481).

**Acknowledgments:** We acknowledge the grea<sup>t</sup> work of Luis Lax, Jorge Lax, Carles Coll and Eduardo Salamero, who took part in the whole project and especially in the data collection.

**Conflicts of Interest:** The authors declare no conflict of interest.
