Three-phase capacitor impedance calculation