Field Oriented Control of Permanent Magnet Motors