Power efficiency is one of the big issues in the energy sector today. It becomes much more critical with the advent of sophisticated and complex systems, whose output is highly dependent on the efficiency of the power supply. Electronic systems are extremely vulnerable to disturbances, so industrial loads are less tolerant to power quality issues like voltage dips, voltage sags, voltage flickers, harmonics, and load unbalance, among others. For custom power applications, a variety of highly modular controllers that take advantage of newly available power electronics components are currently on the market. This paper introduces the concept of a unified power quality conditioner based on the VSC theorem, which is used to increase power quality. Capacitor banks, a series-active filter, and a shunt active filter make up the model. Negative-sequence current and harmonics are primarily compensated by series-active and shunt-active filters, while capacitor banks are used to compensate the reactive power of power frequency. This paper also includes using a weighted feedback algorithm to manage the PCC parameters as well as the UPQC performance. The proposed architecture has been put through its paces with a variety of distributed systems and fault scenarios. The entire framework was designed and analyzed with the help of MATLAB simulink and code.