State of Charge Estimator for NiMH Batteries