Reliable power filters that lower current and voltage harmonics are crucial to the operation of modern power grids. In this article, we'll go through the steps you need to do to create a PV-UPQC that will enhance the quality of your electricity. Series and shunt APF are combined into a single circuit in PV-UPQC. Shunt Active Power Filters utilize the instantaneous reactive power theory (P-Q Theory) to address current harmonics, whereas series APF makes use of the dq theory to address voltage problems like voltage sag/swell. In order to power the DC-Link, a buck-boost converter is connected to the PV system through a maximum power point tracking (MPPT) algorithm. A proportionalintegral (PI) controller is used to regulate the DC-link voltage. Hysteresis current control may be used to produce the gate pulses that activate the VSI switches. In this paper, we construct a full PV-UPQC in MATLAB/Simulink and test it out with a variety of nonlinear loads. If implemented, the proposed UPQC would ensure that THD remains below acceptable limits, even in the presence of severe defects like LLLG problems. The proposed filter has been shown to be effective in simulations, reducing harmonic distortion to levels much below the IEEE limitations.