This document discusses power quality enhancement through a Dynamic Voltage Restorer (DVR) using Synchronous Reference Frame (SRF) theory, focusing on addressing voltage sag problems affecting sensitive loads. It details a generalized control algorithm for the DVR, capable of managing both linear and nonlinear loads, highlighting its ability to maintain voltage levels under various quality issues on the power supply side. The research utilizes MATLAB Simulink for modeling and analysis, presenting comprehensive results to evaluate the effectiveness of the DVR as a custom power solution.