Abstract— We introduce a dynamic battery model that describes the variations of the capacity of a battery under time varying discharge current. This model is input-output equivalent to the Rakhmatov-Vrudhula-Wallach (RVW) model that has been verified by experimental data. Our model allows battery capacity prediction for feedback control laws and online scheduling algorithms that are building blocks for CyberPhysical Systems (CPS) theory. We design optimal and adaptive discharge profile for a square wave impulsive current to achieve maximum battery life. Simulation results are provided to compare battery life for different discharge profiles.