Resolver Emulation for PMSMs Using Low Cost Hall Effect Sensors