An optimal selection of parameters of a references generation scheme for the DQ theory is presented in this paper. With this selection, an active filter is theoretically able to perform an adequate compensation of all the most common polluting perturbations of electrical systems, such as unbalances, harmonic distortion, non characteristic harmonics, reactive power and power factor. This approach is only valid at steady state or for slow transient events, because the settling time of the active filter reaches a high value, almost three 60 Hz cycles. However, this is very useful for active filters as it will keep the system free of pollutions permanently