AN INTELLIGENT BATTERY MANAGEMENT SYSTEM