Spectral analysis for the diagnosis of defects on industrial machines