Electrical angular position error estimation for a permanent-magnet synchronous motor via extended Kalman filter