This paper introduces a new three-phase harmonic decomposition technique to extract voltage/current harmonics for use in grid-connected converters, such as for active power filters (APFs). The main function of this technique is to detect a selective order of harmonics for control purposes. This feature is useful when elimination of certain harmonics is of concern. Moreover, the proposed method can successfully detect and track the variations in the frequency of the signal and extract the time-varying harmonics. The theoretical analysis is presented and the performance of the method is experimentally evaluated. The methodology is applicable for a wide range of equipment such as uninterruptible power supplies, regenerative converters, active power filters, etc., as a basis for the detection of the reference signals.