1
$\begingroup$

Generated a 1kHz square wave in Audacity and normalized it to 0dB (fs = 44100Hz):

enter image description here

Added a 24dB/oct high pass filter (std Audacity plug-in), cutoff frequency set to 100Hz. Result:

enter image description here

Zoomed version:

enter image description here

Why "clipping" so badly?

EDIT: When normalized to -3dB before filtering there's no "clipping" present.

Filtering same signal with low pass filter does not have this issue.

$\endgroup$
5
  • $\begingroup$ If you reduce the level of the input, does that eliminate the clipping? $\endgroup$ Commented Jul 12, 2020 at 11:30
  • $\begingroup$ Why don't we see those dots that show the actual values in the 'clipped' range? Could it be that the values aren't really clipped but that they are just outside the plot range? It's perfectly possible that the initial value of a high pass filter's step response is greater than $1$. $\endgroup$
    – Matt L.
    Commented Jul 12, 2020 at 12:39
  • $\begingroup$ Here's how it looks in some other implementation: i.postimg.cc/cCyD3yDs/file.png ... so, it's not Audacity issue in question. $\endgroup$
    – Juha P
    Commented Jul 12, 2020 at 12:47
  • $\begingroup$ @MattL, Ok, changed the images... . $\endgroup$
    – Juha P
    Commented Jul 12, 2020 at 16:07
  • $\begingroup$ I don't see any clipping anymore. Of course, the maximum amplitude is increased but that's not so strange. $\endgroup$
    – Matt L.
    Commented Jul 12, 2020 at 16:25

1 Answer 1

1
$\begingroup$

That's perfectly normal and expected. You are removing harmonics and as a result you change the time domain wave form. There is no guarantee or expectations that the maximum amplitude will be maintained.

In fact, a square wave has the lowest possible Crest factor (ratio of peak to RMS) and ANY change will increase the Crest factor. In order to not clip you need to remove a substantial amount of power (which your lowpass probably does).

$\endgroup$
2
  • $\begingroup$ I don’t think this is normal and expected for a linear high pass filter and suggests actual non-linear clipping- may be good to clarify that assuming you agree. Normal and expected for a high pass would be to pass through the leading edge followed by an immediate decay. I think the input signal needs to be reduced or better the scaling within the filter needs to be increased— this may simply be occurring at the filter output in which case it should be scaled there prior to clipping (which would be the optimum choice if that signal is accessible there) $\endgroup$ Commented Jul 12, 2020 at 14:58
  • $\begingroup$ The OP’s updated plots clear that up $\endgroup$ Commented Jul 12, 2020 at 16:43

Your Answer

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

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