In-Direct Impedance Measurement: Phase Extraction Algorithm