Measurement of residual DC voltage