Permanent magnet machine commissioning