One of the main power quality problems, created in power system, is related the current harmonics generated by nonlinear loads and power electronic equipment. To minimize these effects, different types of compensators have been proposed to increase the electric system quality. Active Power Filter is one of those compensators. This paper deals with the configuration, design, control, and algorithm witch modele an efficient method detection of Active Shunt Power Filter called Synchronous Detection Method SDM. The objective of this method, is to maintain unity power factor with extensive compensation of the reactive power and mitigation of current harmonics despite load variations. This method is simulated and compared to the PQ theory in Matlab/Simulink environment and accuracy of this approach is proved.