Text this: An Algorithm of Voltage Threshold Dynamic Adjustment for Regenerative Energy Inverter with Minimum Line Power Loss