Capacitor series resistance measurement