2
$\begingroup$

In order to downsample a signal sampled at 48KHz, I implemented an anti-aliasing filter. An Elliptic LPF with a cutoff at 16KHz and order of 10. Everything looks OK until the input to this filter is a clipped signal, say a clipped sinewave. In that case, the output of the filter has a larger magnitude than the input (less power, but a higher max). Is there any theory to explain this behavior?

$\endgroup$
3
  • 2
    $\begingroup$ You're filtering a sharp transition and experiencing what is called "Gibbs phenomenon". Read this Wikipedia section to learn more, and come back if you're still wondering! $\endgroup$
    – Jdip
    Aug 2 at 21:16
  • 1
    $\begingroup$ Can you show a plot of the input and output? $\endgroup$
    – learner
    Aug 3 at 17:31
  • $\begingroup$ Expansion of the request by @learner. There's a number of things this could be, with the two most likely in my mind is ringing at the corners (i.e., Gibbs' phenomenon) or some weird bug in your code. Please edit your question to show a plot of your input and output, preferably with the same x scale. Showing your filter definition (preferably as math, but in ten lines of code or less if that's what you can do) would also be helpful. $\endgroup$
    – TimWescott
    Aug 4 at 15:57

1 Answer 1

1
$\begingroup$

Once overshoot the threshold of clipping, the low-pass filter tries to smooth out the sharp changes. But in doing so, it introduces some oscillations (Gibbs phenomenon, as mentioned by Jdip in the comment) or ripples near the transition points. These oscillations cause the filtered signal to have a higher maximum magnitude (peak) than the original input signal, even though the overall power of the signal is reduced due to the low-pass filtering.

$\endgroup$
1
  • $\begingroup$ Remember the "sharp changes" is in the derivative of the waveform, not so sharp a discontinuity in the waveform itself. But LPFing with a sharp-cutoff brickwall filter causes oscillations and Gibbs nonetheless. $\endgroup$ Aug 3 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.