Development of signal processing and machine learning based algorithm for permanent magnet synchronous motor PMSM