Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Disadvantages to linear phase low-pass filters? (Read 31946 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disadvantages to linear phase low-pass filters?

My understanding is that steep linear phase filters induce pre-ringing. But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)

Shouldn't there have been a difference in the high end?

Disadvantages to linear phase low-pass filters?

Reply #1
Quote
and it still nulled with the original (after I upsampled it back to 96)
I wouldn't be surprised if it nulled audibly, but I'd be surprised if it nulled digitally.   

And even if it doesn't null audibly, that doesn't mean there's an audible difference.  (The difference in the sound isn't the same thing as the sound of the difference.)

I'm not a filter expert, but filter design is always a compromise and there are no perfect filters in hardware or software.    And, there are plenty of different compromises/approaches that will make an adequate anti-aliasing or reconstruction audio filter.   

Disadvantages to linear phase low-pass filters?

Reply #2
It essentially nulls digitally, down to below the 24 bit noise floor. There's a bit of stuff sloping down to 16 khz or so but it's about 165 db down.

Disadvantages to linear phase low-pass filters?

Reply #3
OK I'm surprised, but I guess the filter is plenty good enough!

Disadvantages to linear phase low-pass filters?

Reply #4
My understanding is that steep linear phase filters induce pre-ringing. But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)

Shouldn't there have been a difference in the high end?

No, the pre-ringing occurs only at the filter's cut-off frequency, which with 44.1k sampling, is ultra-sonic. Furthermore, pre-ringing will occur only if the original has (significant) frequency content at the cut-off frequency—given the nulling, I guess that it didn't in this case.

Disadvantages to linear phase low-pass filters?

Reply #5
It essentially nulls digitally, down to below the 24 bit noise floor. There's a bit of stuff sloping down to 16 khz or so but it's about 165 db down.
I have done a lot of similar testing and can confirm your null test results. The DAC remains a variable though, so testing in the digital domain only has its limitations.
These near perfect null results make it very hard for me to accept audible differences between original hi-res and properly downsampled audio (assuming a perfect DAC).

Disadvantages to linear phase low-pass filters?

Reply #6
But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)


What kind of signal did you use? I have created a 384kHz project in Audacity, with an 0.1s 550hz wave followed by 0.1s 150hz wave, crossed over at zero(I might have missed a sample, but there shouldn't be much of effect from that anyway.
I created a brickwall linear phase filter in rePhase, 23500hz passband, optimized to -120 db bandstop, 8192 samples.
Then I downsampled  the two-tone file in matlab, upsampled (i.e. decimation and then zero insertion), convolved with filter IR file.

After nulling I've got about -40 db peak difference at the middle of the file. Opened it in Audacity and saw about 330us transition region with roughly 18 kHz ringing. Audacity's spectrum analysis shown -56 db peak at 18 kHz and -58 db peak at 28 kHz when selecting that particular region at FFT window of 128 samples.

When I play diff file with +30 db gain, an obvious clicking sound is heard. I do not hear difference between filtered and unfiltered file, but it's not surprising given both pass through soundcard's DAC filters anyway and the resulting difference is probably negligible (I have performed the filtering second time on the result of first run, using 47kHz passband, and although there is again some ringing around the transition point, it's now over 26kHz and shouldn't be heard, supposedly. However, some click is still heard anyway when playing second diff, so, supposedly, soundcard just produces too many artifacts. ).

That arises the question, could that transient filtering error be heard? Apparently it shouldn't be masked by the 150 and 550 Hz tones, and at high FS SPL it could be perceptible by amplitude. It shouldn't be subject to temporal masking either, as it's essentially pre-echo. However, combining all the factors: -56db 18 kHz tone 160 us long ( I'm not counting after-transition as hearing system will itself be in a transient state then) - could it be heard at all? I've read somewhere that inner ear filterbank has narrow bands and slow roll-offs, so it's setting time is short, but I don't know how short exactly.

Furthermore, I suppose, one can make an non-noise signal that would 'break' a filter, producing surely audible distortion.

Disadvantages to linear phase low-pass filters?

Reply #7
But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)


What kind of signal did you use?


It was a portastudio recording of acoustic guitar/vocals. There was supersonic transient information from the acoustic guitar.

It essentially nulls digitally, down to below the 24 bit noise floor. There's a bit of stuff sloping down to 16 khz or so but it's about 165 db down.
I have done a lot of similar testing and can confirm your null test results. The DAC remains a variable though, so testing in the digital domain only has its limitations.


So what is the reason for converters using oversampling in that case? Why go all the way up to 5.5 MHz or so if it's possible to just use a simple filter and have it be perfect. Is it just kind of "why not"? Since the technology has become inexpensive?

Disadvantages to linear phase low-pass filters?

Reply #8
If you don't oversample you're stuck using an analog filter for everything. Analog filters are not very good compared to digital.

Disadvantages to linear phase low-pass filters?

Reply #9
If you don't oversample you're stuck using an analog filter for everything. Analog filters are not very good compared to digital.


Thanks! Why is that though? Was Izotope RX oversampling during its processing?

Disadvantages to linear phase low-pass filters?

Reply #10
My understanding is that steep linear phase filters induce pre-ringing. But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)

Shouldn't there have been a difference in the high end?


Any filter rings and a drastic change causes more ringing.

A min. phase low pass will have minimum phase shift, but non-linear, which will delay different frequencies differently. In the time domain you will see post-ringing.
A linear phase low pass will have a much higher phase shift, but linear, which will delay all frequencies equally. In the time domain you will see pre- and post-ringing.

If you feed both filters a bandlimited impulse, then a brickwall min phase filter will distort it, a linear phase filter will just delay it.
Why? Because the linear phase brickwall filter can only ring at its cutoff frequency and will only ring if you feed it a signal with energy at and above that frequency.



It is impossible for a 90° phase shifted version to null with the original. A 90° phase shift is essentially a bandpass filter, so it cannot null at very low and very high frequencies.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #11
Why oversample?




Btw, DACs operate at such high rates because they use delta-sigma modulators. In the simplest case think of a 1 bit DAC that switches (between +1 or -1) so rapidly that its output will average the desired waveform. Add a low order analog filter and you will get a smooth output waveform.
"I hear it when I see it."


Disadvantages to linear phase low-pass filters?

Reply #13
Here are screenshots I took of what the null looks like.

http://imgur.com/5BuC4XQ,QjB3HMO,c7M6bKY#2

First screenshot is with the slope heavily favoring the low-frequencies, second is with it heavily favoring the high-frequencies, and third is flat

Disadvantages to linear phase low-pass filters?

Reply #14
The options of the spectrum analyzer are not interesting. Leave them flat.

What is the original signal? How do you apply the 90° phase shift, what is the filter?
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #15
I used Izotope RX4 for the sample rate conversion, filter is linear phase, there are lots of options. I could send a screenshot. Are my results that surprising? Someone else said he encountered the same thing.

Disadvantages to linear phase low-pass filters?

Reply #16
Oh, I think there is some confusion here.

In your original post you mentioned 90° phase so I assumed you're doing something fancy... but it seems you're just ordinarily resampling.
So yeah, of course that will null up to a bit below half the lower sampling rate.

A linear phase filter that is flat up to e.g. 21000 Hz does not alter the signal below that. All it does is delay, which the resampler should correct such that original and resampled waveforms align. If the signals null then that is the case.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #17
So my question then is, what is the advantage to using a more gradual slope if it's still possible to get it to null with a steep one?

Disadvantages to linear phase low-pass filters?

Reply #18
My understanding is that steep linear phase filters induce pre-ringing. But as a test I downsampled a 96 khz file (to 44.1 khz) using a 90 degree linear phase filter, and it still nulled with the original (after I upsampled it back to 96)

Shouldn't there have been a difference in the high end?


The size of the difference is highly dependent on the original program material.  If it is regular music, then not so much. If it is a steady stream of the largest and narrowest possible impulses, then the difference will be more.

This makes the point that since very few people are listening to a steady stream of impulses, there is not a lot of difference to hear in most cases.

In short, major angst about linear phase low pass filters for 44 KHz is just yet another audiophile myth that has gotten out of hand for fun and profit.

Disadvantages to linear phase low-pass filters?

Reply #19
So my question then is, what is the advantage to using a more gradual slope if it's still possible to get it to null with a steep one?


I still don't fully understand what you are doing, but if you literally just downsampled and then upsampled back, you would expect to see no difference unless the resampling isn't very good.  This doesn't have much to do with ringing though.

Disadvantages to linear phase low-pass filters?

Reply #20
For example, in the parameters it's possible to adjust the slop of the filter. Why use a more gradual slope if a steep one is already excellent?

I had also thought the reason for oversampling was to use more gradual filters, but it seems that's not the case.

Disadvantages to linear phase low-pass filters?

Reply #21
For example, in the parameters it's possible to adjust the slop of the filter. Why use a more gradual slope if a steep one is already excellent?


A more gradual filter has less ringing but loses some ultrasound, whereas a more steep filter has less ringing but more ultrasound.  It probably doesn't matter too much unless you go completely nuts and pick an extremely steep or extremely smooth filter.

I had also thought the reason for oversampling was to use more gradual filters, but it seems that's not the case.


Oversampling is a way in which you can implement a given digital filter, which might be steep or gradual.

Disadvantages to linear phase low-pass filters?

Reply #22
So I guess there are a lot of things I still don't know then. Why is oversampling necessary to run a steep filter. Why do we oversample via PWM/Delta Sigma? (is it cheaper?)

Disadvantages to linear phase low-pass filters?

Reply #23
The slope your screenshot shows is just a setting of the spectrum analyzer, not of the resampler. It doesn't alter anything, it just displays the spectrum sloped to your liking.

Please show a screenshot of your resampler, then we can explain the settings to you if its manual is not enough (or something is unclear).

--

Oversampling is not necessary to run a steep filter. Please read the previous replies and links regarding oversampling.


edit: Before going into these topics you should read up on the basics of sampling and digital audio. Especially aliasing/imaging.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #24
Why is oversampling necessary to run a steep filter. Why do we oversample via PWM/Delta Sigma? (is it cheaper?)


I don't even know what you're asking.  Is this about resampling, DACs, something else? 

Did you read the wikipedia article I linked before?  It explains what oversampling is used for.