Real-Time Thevenin Impedance Computation