Principle of measuring capacitor capacity