Embedded Systems in Lithium Batteries