Page 1 of 2
HPF overshooting - surprising artifact
Posted: Thu Jul 09, 2020 8:28 am
by Rocko
Hi all,
I'm playing around with a digital cross-over design when I noticed that the HPF adds unwanted energy to the signal, making it go over 0dbFS.
I've designed a very simple LPF and HPF pair of filters to cut the frequency zones into two parts: LF and HF.
I've tested the HPF by injecting a stimulus of 1KHz square wave at 0dbFS (limited between +/- 1.000 ).
To my surprise, the output of the HPF was much higher than 0dB, as can be seen in the attached graph.
Even though the input is limited to maximum(absolute(X)) <= 1.0 the output reached 1.5 !
In this case, how can I design a digital cross-over? Do I need to simply attenuate the signal to create more headroom (and lose output power)? I do not want to add a lookahead - limiter after the cross-over for keeping it simple. Will a clipper be good enough or will that introduce high distortion?
Why is this phenomena happening in the first place? Any ideas are welcomed
Re: HPF overshooting - surprising artifact
Posted: Thu Jul 09, 2020 9:51 am
by juha_tp
Maybe it's your implementation ... schematic would be helpful.
Re: HPF overshooting - surprising artifact
Posted: Thu Jul 09, 2020 11:06 am
by Rocko
This is a generic phenomena which will occur on any implementation, not related to schematic or specific flowstone implementation.
However I have added a simple example of a 12dB (2nd order) HPF with known Biquads (tested) set for:
Cutoff = 1KHz
Q = 0.5
Sample_Rate = 48000
and a frequency response curve
Just add ASIO or DS output to get the signal.
Re: HPF overshooting - surprising artifact
Posted: Fri Jul 10, 2020 6:54 am
by MichaelBenjamin
.
Re: HPF overshooting - surprising artifact
Posted: Sun Jul 12, 2020 7:30 am
by Rocko
Hi,
For getting a LR4 (Linkwitz-Riley order 4) cross-over, one needs to use a Q factor of 0.5.
LR4 is the most common cross-over design, to the best of my knowledge. It is implemented in a zillion hifi-speakers, in analog (cross over of home speakers).
so, my surprise is that it is not straight-forward to implement it in digital, without this strange artifact...
Re: HPF overshooting - surprising artifact
Posted: Sun Jul 12, 2020 4:22 pm
by juha_tp
Replicated this issue in Audacity (with similar square wave) and find out that 24dB/oct HPF (fc=100Hz, fs=44100) had to be normalized to -3dB to keep the output inside the range of [-1,1].
Asked this on another DSP related
forum.
NOTE: The commonly used (and sos Butterworth based) LR4 implementation suffers from distortion (maybe just numerical issue) when fc/fs is small enough. Attached few plots (Octave) which demonstrates this issue with parameters fc@200Hz for fs=44100Hz and fs=352800Hz and for fs=192kHz with fc=700Hz.
Re: HPF overshooting - surprising artifact
Posted: Sun Jul 12, 2020 4:24 pm
by MichaelBenjamin
.
Re: HPF overshooting - surprising artifact
Posted: Tue Jul 14, 2020 1:02 pm
by Rocko
According to the answers brought to us by Juha_tp (on other forum) - this phenomena is expected and is easily seen with square waves.
Let's assume this is true - so what is the remedy ? I mean if I use a digital domain cross-over with an HPF for the "tweeters" - do I need to add a limiter or clipper against such possible inputs?
Re: HPF overshooting - surprising artifact
Posted: Wed Jul 15, 2020 8:25 pm
by martinvicanek
Rocko,
the overshoot may be unexpected, however it is not an artifact, nor a distortion. And it is not a digital phenomenon either - the same happens with an analog filter response. The highpass filter will respond to sudden changes immediately, whereas the lowpass filter will follow long term average trends. Therefore, even if the signal power is diminished after filtering, it may have a higher amplitude at some instant (= overshoot). When you recombine the LP and HP filtered branches, the overshoot will likely go away (unless you mess with the phases in between).
No need to worry, FS will handle signal amplitudes within the single precision range (-10^38 to 10^38 or so) allright. Only when you pass it to the soundcard, make sure it does not exceed +-1 (use a clipper). I usually throw in a volume knob and a clipping indicator at the end of the processing chain.
Re: HPF overshooting - surprising artifact
Posted: Thu Jul 16, 2020 6:40 am
by Rocko
Martin hi - thanks for the clear explanation. It is much appreciated.
For "inside FS" - yes I saw that recombining the LF and HF parts had eliminated the phenomena.
I also understand that for FS this is not an issue due to increased dynamic range for processing ("can go over 1.000").
But this phenomena simply brought me to think - how is this issue overcome inside a digital cross-over network?
For instance, many of our studio monitors run a digital cross-over network for dividing the signal into LF (woofer) and HF (tweeter) and each element (woofer and tweeter) receive a dedicate amplifier.
In such a design - how do manufacturers use an HPF (for the tweeter) and avoid this phenomena? They can not recombine the signal and I think adding a clipper will distort the signal in some cases (not only this phenomena)?
Do they HAVE to add a look-ahead limiter? That will introduce some latency...
Or maybe the amplifier that comes after the cross-over has a much higher dynamic range than the cross-over network ?