a device that convert electrical energy to mechanical energy