Modeling, Simulation, and Analysis of Lithium-Ion Batteries for Grid-Scale Applications