Model Based Optimal Control, Estimation, And Validation Of Lithium-Ion Batteries