Simulating, Controlling, and Understanding Lithium-ion Battery Models