A System-on-Chip Sensorless Control for a Permanent Magnet Synchronous Motor