Control method for an electric motor