Calculation of capacitor rated capacity