Permanent Magnet Synchronous Machine Matlab