an electrical machine that converts electrical energy into mechanical energy