The document presents an improved controller for the unified power quality conditioner (UPQC), enhancing its power quality compensation capabilities, particularly in micro-grid applications. The new controller allows for dual functions: regulating both the load-bus voltage and the grid-side bus voltage, while also providing reactive power support akin to a STATCOM. Experimental results validate the functionality of the improved controller, demonstrating its effectiveness in managing power quality issues arising from power-electronic-driven loads.