Field oriented control of pmsm ppt