Capacitor measurement using Q-meter