Model-based Battery Management System (BMS) for Electric and Hybrid Electric Drive Systems