Reducing the uncertainty in real-time impedance measurements