CHANGSTAR: Audiophile Headphone Reviews and Early 90s Style BBS

  • December 31, 2015, 11:18:39 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: "Ringing" in digital filters/DACs  (Read 979 times)

0 Members and 1 Guest are viewing this topic.

SoupRKnowva

  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +6/-0
  • Offline Offline
  • Posts: 154
"Ringing" in digital filters/DACs
« on: March 26, 2015, 10:39:35 AM »

I've been wondering for several months now, and thought I would start a thread to discuss the topic.

Why do people consider a normal linear phase filter to have "ringing"? I know that when you present one of these filters with a square shaped signal like the typical impulse response used to show the "ringing" that the wave form oscillates before and after where the impulse was.

but weren't those filters designed to only be used on bandwidth limited signals? of which the square shaped impulse is not.

Is there any evidence that such "ringing" occurs with normal bandwidth limited signals that are always presented to the filter? what does a bandwidth limited impulse response look like? does it have "ringing" as well?

And as an aside, what are the minimum phase filters doing different that causes them not to "ring" before the impulse?
Logged

Solderdude

  • Grab the dScope Kowalski!
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +206/-4
  • Offline Offline
  • Posts: 907
  • No can do skipper, the dScope was terminated
    • DIY-Audio-Heaven
Re: "Ringing" in digital filters/DACs
« Reply #1 on: March 26, 2015, 04:17:01 PM »

I've been wondering for several months now, and thought I would start a thread to discuss the topic.

Me too.
I hope some more knowledgeable people will chime in.
Below is my simple view on this.

Why do people consider a normal linear phase filter to have "ringing"? I know that when you present one of these filters with a square shaped signal like the typical impulse response used to show the "ringing" that the wave form oscillates before and after where the impulse was.

Reconstruction and interpolation filters only 'ring' when a frequency in the music signal comes close to the filter cut-off frequency is present.
The further away the stimulus frequency is from the filter frequency the smaller the effect.
Do note that the plots you often see are linear and our hearing is closer to logarithmic this means that when a signal appears to have been decayed to '0' it is still there but many dB's down and rings on quite a bit longer when you were looking at it in a log type scale.

Note that the ringing occurs outside the audible band, at least considered to be inaudible by most objectivists.

For digital EQ the rules differ as pre- and or post-ringing are within the audible band.
Also analog EQ filters post-ring but cannot pre-ring.

Most of the effects that are audible in various types of filters is not caused by by the lack/absence or amplitude or decay of ringing but by the 'apparent' roll-off IN the audible band.

Of course this is my opinion.
Will be happy to see other and better founded explanations though.

but weren't those filters designed to only be used on bandwidth limited signals? of which the square shaped impulse is not.

Yes, when considering reconstruction and interpolation filters but the output signal of ladder DAC's do contain 'sharp' edges but never in large amplitudes.

Is there any evidence that such "ringing" occurs with normal bandwidth limited signals that are always presented to the filter? what does a bandwidth limited impulse response look like? does it have "ringing" as well?

I have 'looked' at many waveforms that have very fast 'transients' and impulses of real music and suggest you do the same.
This just to see how much risetime/slewrate is needed for certain amplitudes/loads.
Plenty of freeware programs around that let you analyse and zoom in on waveforms at sample level.
NEVER have I found a fast transient in music (that sounded extremely loud/sharp and fast) that didn't take several samples to 'rise'.

As you already stated the INPUT signal of an ADC is also brickwalled (in frequency, not as in compression) so fast transients will c reate ringing already before it is converted (sampled) so the converter itself will always have a bandwitdh limited signal and can never 'do' real squarewaves.
It is bandwidth limited by definition and needs to be.

Squarewaves as used in test signals do not exist in real life nor in music.

Then there is the fact that nothing in nature starts and stops instantly.
There is always overshoot, undershoot and post ringing and also pre-ringing occuring in natural instruments but unlike reconstruction filters is occuring in a relation with the fundamental or harmonics it produced (in the audible range) where as reconstruction filters only ring around the filter frequency (above the audible range)




Logged
Use your ears to enjoy music, not as an analyser.

Clemmaster

  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +10/-1
  • Offline Offline
  • Posts: 239
Re: "Ringing" in digital filters/DACs
« Reply #2 on: March 26, 2015, 04:46:08 PM »

You can run the signal through your filter twice. If the ringing gets worse the second time, then your filter creates it. If not, it is just due to band limiting (Gibbs effect).
Logged

ultrabike

  • Burritous Supremus (and Mexican Ewok)
  • Master
  • Pirate
  • *****
  • Brownie Points: +4226/-2
  • Offline Offline
  • Posts: 2384
  • I consider myself "normal"
Re: "Ringing" in digital filters/DACs
« Reply #3 on: March 27, 2015, 07:52:52 AM »

Yes. "Ringing" in my mind is an manifestation of the Gibbs phenomenon. This is my perhaps wrong way of seeing things:

Signal BW < Linear FIR Filter BW case:

Passing a signal twice through a linear phase filter results in close to the same signal, but with twice as much transient crap and delay relative to passing it only once.

Signal BW > Linear FIR Filter BW case (filter BW fully contains audio range):

Signal might gets ultrasonics removed but signal in the audio range remains close to intact (+ the corresponding transient crap and delay). Steady state ringing (if any) corresponds to original audible signal after ultrasonics get removed (i.e. in theory the ear should hear the same thing filter or no filter).

Issues:

Optimal linear phase filter is not realizable since it requires infinite number of taps. Therefore results (specially in the stop band rejection among other stuff) depend on windowing applied if using a sinc. Other filter possibilities exist that trade of this for that.

Minimum phase filter usually requires a much larger window than the equivalent linear phase one to yield similar frequency response magnitude results. So many times it does a little worse but delay and initial transients are minimized (which IMO is mot for audio reproduction).

And as an aside, what are the minimum phase filters doing different that causes them not to "ring" before the impulse?

There are a family of filters with different phase response but same magnitude response. The one filter in that family that has all of its zeros inside the unit circle (minimum phase in all of its individual factors), is minimum phase. Minimum phase means minimum delay, which means main tap happens soonest, which means least "pre-ringing". The analog counterpart has all of its zeros to the left of the s-plane.
« Last Edit: March 27, 2015, 08:25:57 AM by ultrabike »
Logged

Marvey

  • The Man For His Time And Place
  • Master
  • Pirate
  • *****
  • Brownie Points: +555/-33
  • Offline Offline
  • Posts: 6698
  • Captain Plankton and MOT: Eddie Current
Re: "Ringing" in digital filters/DACs
« Reply #4 on: March 27, 2015, 05:49:01 PM »

I'll take linear phase with the pre-ringing (whatever small amount of it in the few milliseconds before). Personally, I think too much fuss is made in the audiophile marketing world about the potential audibility of pre-ringing. Not fucking with the phase is probably more important.

I could be totally wrong though. Would be interesting the measure the Yggy.
Logged

ultrabike

  • Burritous Supremus (and Mexican Ewok)
  • Master
  • Pirate
  • *****
  • Brownie Points: +4226/-2
  • Offline Offline
  • Posts: 2384
  • I consider myself "normal"
Re: "Ringing" in digital filters/DACs
« Reply #5 on: March 28, 2015, 05:41:45 AM »

Yup. BTW here are some plots of a Linear Phase filter (TD and FR Mag/Phase) vs Min Phase filter (TD and FR Mag/Phase).

Linear Phase





Minimum Phase





Linear phase means that the phase response is a line in the pass band. This means all frequencies of an input signal will be delayed by the same amount. A minimum phase filter does not share this property (different frequencies may experience different delays), particularly close to the transition band, but it may approach it.
Logged

Solderdude

  • Grab the dScope Kowalski!
  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +206/-4
  • Offline Offline
  • Posts: 907
  • No can do skipper, the dScope was terminated
    • DIY-Audio-Heaven
Re: "Ringing" in digital filters/DACs
« Reply #6 on: March 28, 2015, 06:31:56 AM »

It is fun to see how headphones/speakers change these signals almost beyond recognition and ring in the audible range, one may see the whole filtering 'issues' in a different light.
Logged
Use your ears to enjoy music, not as an analyser.

SoupRKnowva

  • Able Bodied Sailor
  • Pirate
  • ***
  • Brownie Points: +6/-0
  • Offline Offline
  • Posts: 154
Re: "Ringing" in digital filters/DACs
« Reply #7 on: March 28, 2015, 06:56:46 AM »

Thanks for all responses guys! It's a pretty interesting topic I think.

I hadn't thought of running the output signal through the filter again...that isn't something anyone does, at least not that I have seen.



I have 'looked' at many waveforms that have very fast 'transients' and impulses of real music and suggest you do the same.
This just to see how much risetime/slewrate is needed for certain amplitudes/loads.
Plenty of freeware programs around that let you analyse and zoom in on waveforms at sample level.
NEVER have I found a fast transient in music (that sounded extremely loud/sharp and fast) that didn't take several samples to 'rise'.



I too have looked at waveforms, but no matter how fast your transient is, if its a bandwidth limited signal, it won't have a steeper rise than whatever the cutoff frequency is for your sampling rate...



I am also very interested in seeing how Yggy's filter measures.
Logged

thune

  • Able Bodied Sailor
  • Powder Monkey
  • ***
  • Brownie Points: +20/-0
  • Offline Offline
  • Posts: 60
Re: "Ringing" in digital filters/DACs
« Reply #8 on: March 28, 2015, 07:07:39 AM »

I am also very interested in seeing how Yggy's filter measures.
Yes! I'd love to see a fire1v (Atkinson-style) report on the Yggy.
Logged

ultrabike

  • Burritous Supremus (and Mexican Ewok)
  • Master
  • Pirate
  • *****
  • Brownie Points: +4226/-2
  • Offline Offline
  • Posts: 2384
  • I consider myself "normal"
Re: "Ringing" in digital filters/DACs
« Reply #9 on: March 28, 2015, 07:22:53 AM »

Yes! I'd love to see a fire1v (Atkinson-style) report on the Yggy.

Looking forward for Yggy! :)p1

I hadn't thought of running the output signal through the filter again...that isn't something anyone does, at least not that I have seen.


I too have looked at waveforms, but no matter how fast your transient is, if its a bandwidth limited signal, it won't have a steeper rise than whatever the cutoff frequency is for your sampling rate...

Transient has the exact same meaning as in the analog world. Transient response has much more to do with the filter "turning on", and less to do with rise time or "speed" and such.

Here are some results of a bandlimited signal after being filtered by the linear and minimum phase filters above and after latency and transient removal. Original is blue, red is linear phase filtered and black is minimum phase filtered:



So where is that linear phase filter "time smearing" Charles Hansen keeps talking about?

BTW, the bandlimited signal shows about 400 samples of transient there because I used an 801 tap linear phase filter to bandlimit the signal before it went to the minimum phase filter and the linear phase filter in the plots above.
Logged