A new lithium battery management system design and implementation