An Equivalent Circuit Model With Variable Effective Capacity for LiFePO4 Batteries