Power quality problems in the distribution system have tremendously escalated due to numerous consumptions of various types of loads especially nonlinear loads. These problems have affected the utility grid and the consumers in the distribution system resulting in equipment breakdown, overheating in utility system equipment, and other problems related to electronics devices that are being used by the utility system and the consumers. The electronics devices are quite sensitive and can be malfunctioned even with small disruptions that occured in the supply power system. The power quality problem involved with nonlinear loads can be mitigated by using Distribution Static Synchronous Compensator (DSTATCOM). This paper proposed a method for power quality improvement by using a Frequency Domain-based Voltage Reference Configuration (VRC) control algorithm for the Distribution Static Synchronous Compensator (DSTATCOM) in a three-phase distribution system. The performance of the proposed control algorithm is simulated in the MATLAB environment using Simulink. It is verified that the proposed control algorithm can reduce the THD of the distorted grid current at the Point of Common Coupling (PCC) below 5% according to the IEEE Standard 519:2014 under nonlinear loads and unbalanced loads conditions.