Text this: Power Quality Management of Inverter Based on Gradient Descent Optimization