Introduction to battery-management systems