Modeling and low-level control of range extended electric vehicle dynamics