Development Of A Hardware-In-The-Loop Simulator For Battery Management Systems