Physical Based Modeling and Simulation of LiFePO₄ Secondary Batteries