smart filtering, with base frequency and harmonics extraction