An adaptive state of charge estimator for lithium‐ion batteries