Impedance Modeling of Li Batteries for Determination of State of Charge and State of Health