Calculation of maximum battery output power