Real-time Adaptive State of Energy Estimation of Lithium-ion Batteries Applied in Electric Vehicles