Calculation of equivalent impedance of capacitor