FPGA Implementation of the Mix Algorithm for State-of-Charge Estimation of Lithium-Ion Batteries