Masters Thesis: Model-based Estimation of State of Charge of Lithium Cells