Modeling, Estimation, And Optimal Control Of Lithium-Ion Battery At Cell And System Level