The paper discusses the development of an improved double fuzzy PI controller for regulating the DC bus voltage of a shunt active power filter (SAPF) and compares two reference detection algorithms: synchronous reference frame (SRF) and positive sequence of fundamental (PSF). It demonstrates that the PSF algorithm, when combined with the double fuzzy PI controller, offers superior performance in power quality and voltage regulation. Simulation results validate the effectiveness of the proposed method using MATLAB/Simulink.