https://www.simulinkpaper.com/downloads/simulation-of-a-permanent-magnet-synchronous-motor-using-matlab-simulink/