This work describes a structured solution that integrates digital twin models, machine-learning algorithms, and Industry 4.0 technologies (Internet of Things in particular) with the ultimate aim of detecting the presence of anomalies in the functioni...