This paper deals with a method for the parameter and order identification of a fractional model. In contrast to existing approaches that can either handle noisy observations of the output signal or systems that are not at rest, the proposed method does not have to compromise between these two characteristics. To handle systems that are not at rest, the parameter, as well as the order identification, are based on the modulating function method. The novelty of the proposed method is that an optimization-based approach is used for the order identification. Thus, even if only noisy observations of the output signal are available, an approximate identification can be performed. The proposed identification method is, then, applied to identify the parameters and orders of a lithium-ion battery model. The experimental results illustrate the practical usefulness and verify the validity of our approach.