Permanent magnet synchronous generator