A Systems Approach to Lithium-ion Battery Management