Fundamentals Of Battery Dynamics