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 31429 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disadvantages to linear phase low-pass filters?

Reply #75
I will not engage further in your red herrings.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #76
It's sad to see how carefully demonstrated and build up reputation can be so utterly be destroyed by just a few silly statements.


Er? I've known Arny-the-internet-persona for more than twenty years. If anything, this thread confirms his reputation: an arrogant, ignorant clown.



Disadvantages to linear phase low-pass filters?

Reply #77
I don't know what your filter looks like, but if it is flat up to ~23.5 kHz and linear phase then it really should not ring at 18 kHz.


Indeed, looks I've made a mistake counting cycles, re-counted them and really it's surely above 22.5 kHz (just too few cycles to count perfectly). 18 kHz in spectrum analysis should be an artifact, as it's too dependent on particular samples selected.

Now I'm interested in how good is the performance of filters used in modern DAC chips, Sabre ESS's, for example? The best I've found is a datasheet for PCM1789, describing filter as having 0.0018 dB ripple in passband, -75 dB stopband attenuation, 0.454Fs passband and 0.546Fs stopband. As I understand, that means it's within 0.002 dB till 20.021 kHz and -75 db from 24.078kHz. As I understand, that would mean that there are some aliasing artifacts above 20 kHz due to incomplete attenuation at Fs/2, and even by the audio band they'd be only -75 dB down. Supposedly that's relatively alright, as there's little signal at such level and human hearing there is not sensitive enough? Also, is the folded image of frequencies above Fs/2 attenuated compared to the original frequency?

By the way, if anyone can point me to a some tutorial describing how to use LTFAT package in Octave and output corresponding plots, I'd appreciate that very much. Just an example m file would entirely do.

Disadvantages to linear phase low-pass filters?

Reply #78
Yes, you will get some imaging above Fs/2 with such filters.

PCM1794a sharp filter has similar specs but 130dB stopband attenuation.
WM8742 has several different filters to choose from, some reach stopband at 0.5 Fs.

With your numbers a full-scale 20 kHz sine (an artificial signal that you won't find in music) would appear as image at 24.1 kHz at <-75 dBFS.
"I hear it when I see it."


Disadvantages to linear phase low-pass filters?

Reply #80
Now I'm interested in how good is the performance of filters used in modern DAC chips, Sabre ESS's, for example?


They provide the complete filter response functions in the device datasheets:

https://myl8test.files.wordpress.com/2013/0...asheet-here.pdf

See page 32.

Thanks!
So apparently, all 'integrated' filters have transition band centered around Nyquist, rather than having Nyquist in stop-band.

Yes, you will get some imaging above Fs/2 with such filters.


How high would be the level of images without attenuation by filters? Sorry for such a newbie question.

Disadvantages to linear phase low-pass filters?

Reply #81
How high would be the level of images without attenuation by filters? Sorry for such a newbie question.


See my previous post for graphs.

If you just upsample without any filtering then the spectrum will mirror perfectly. The images would all be identical in level.
(The graphs only show up to 3*Fs, but theoretically this goes to infinity.)
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #82
Good grief, what a thread.

It might be worth pointing out that you can't hear images (of the kind that would come out of a DAC which lacked filtering). You could allow images of the baseband 0-22.05kHz of audio to extend out into the MHz region, and no human ear would mind. Most human ears make more than good enough anti-imaging filters all by themselves. Unfortunately speakers (in the kHz region) and amplifiers (sometimes in the MHz region) are non-linear, and if you let bucket loads of ultrasonics into them it can create audible problems. That's the practical reason for anti-imaging filters in 44.1kHz sampled audio.

It also means you can look at the waveform coming out of a DAC, and is looks like what you expect. People like that.

Cheers,
David.

Disadvantages to linear phase low-pass filters?

Reply #83
So apparently, all 'integrated' filters have transition band centered around Nyquist, rather than having Nyquist in stop-band.


Typically yes, it wouldn't make sense to do it any other way.  If you moved the filter into the pass band, you'd degrade the frequency response.  If you moved it above Nyquist, you would needlessly pass more image frequencies. 

How high would be the level of images without attenuation by filters? Sorry for such a newbie question.


In an ideal DAC, each image has as much energy as the original spectrum.  Of course ideal parts cannot be made, so real devices have a finite bandwidth dictated by their internal roll off.  On devices that support high oversampling ratios and high sampling rates, the device's internal roll off can often be very gradual with frequency, allowing a lot of energy in the image frequencies.  This is of course bad, it heats up your speakers and introduces distortion, so they are removed with a filter, at least down to some safe level.

Disadvantages to linear phase low-pass filters?

Reply #84
How high would be the level of images without attenuation by filters? Sorry for such a newbie question.


See my previous post for graphs.

If you just upsample without any filtering then the spectrum will mirror perfectly. The images would all be identical in level.
(The graphs only show up to 3*Fs, but theoretically this goes to infinity.)


Thanks! Sonething made me think that images should have lower level, but I can't recall what was that.

Good grief, what a thread.

It might be worth pointing out that you can't hear images (of the kind that would come out of a DAC which lacked filtering). You could allow images of the baseband 0-22.05kHz of audio to extend out into the MHz region, and no human ear would mind. Most human ears make more than good enough anti-imaging filters all by themselves. Unfortunately speakers (in the kHz region) and amplifiers (sometimes in the MHz region) are non-linear, and if you let bucket loads of ultrasonics into them it can create audible problems. That's the practical reason for anti-imaging filters in 44.1kHz sampled audio.

It also means you can look at the waveform coming out of a DAC, and is looks like what you expect. People like that.

Cheers,
David.

Besides creating IM, it possibly could create transient SPL peaks, which can supposedly be damaging to hearing mechanism.

So apparently, all 'integrated' filters have transition band centered around Nyquist, rather than having Nyquist in stop-band.


Typically yes, it wouldn't make sense to do it any other way.  If you moved the filter into the pass band, you'd degrade the frequency response.  If you moved it above Nyquist, you would needlessly pass more image frequencies. 



Given we typically have some slack between Fs/2 and our hearing range, that could be avoided by a sharper filter, processing power isn't too expensive these days. I too don't see reason for doing so, though. I recall some controversy about the acoustic energy in 20-22 kHz region though, but haven't found the conclusive outcome.

Disadvantages to linear phase low-pass filters?

Reply #85
Thanks! Sonething made me think that images should have lower level, but I can't recall what was that.


You were probably thinking of zero-order hold, which is typically the minimum interpolation that you will find.

Look at the spectrum of a rectangular window to get an idea.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #86
Given we typically have some slack between Fs/2 and our hearing range, that could be avoided by a sharper filter, processing power isn't too expensive these days. I too don't see reason for doing so, though. I recall some controversy about the acoustic energy in 20-22 kHz region though, but haven't found the conclusive outcome.

Filters cutting in below nyquist do exist even on integrated chips, and have done so for some time - see wolfson 8741 filters 4 and 5 which have 110 db of attenuation at nyquist. To all intents and purposes images are completely removed. In order to remove aliasing caused by inadequate adc filtering one might arguably want them to reach stopband even lower, but they will presumably cut out most of it sicne the filter kicks in around 20Khz (which makes sense). NB passband ripple is tiny too
https://www.cirrus.com/en/pubs/proDatasheet/WM8741_v4.3.pdf

Disadvantages to linear phase low-pass filters?

Reply #87
Choosing a cutoff frequency at a fraction of the sampling rate (e.g. 1/4th for a 2x oversampled signal, see "halfband filter") does have a computational advantage since some coefficients will be zero and we therefore we do not need to multiply/sum with those coefficients.
Of course that will result in some aliasing/imaging, the amount depends on the steepness of the filter. But even with 44.1 kHz sampling rate this will be above 21 kHz most of the time, maybe even above 21.5 kHz.

I think when producing such content it makes sense to choose a steep filter to preserve high frequency content close to nyquist. This results in ringing.. but so what? On playback you can attenuate any pre- and post-ringing strongly just by filtering again with lower cutoff, optionally minimum phase such that no significant pre-ringing will occur on the final output.
You either let the anti-imaging filter of your DAC do that or you resample to a higher sampling rate with your filter of choice.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #88
Given we typically have some slack between Fs/2 and our hearing range, that could be avoided by a sharper filter, processing power isn't too expensive these days. I too don't see reason for doing so, though. I recall some controversy about the acoustic energy in 20-22 kHz region though, but haven't found the conclusive outcome.


Filters cutting in below nyquist do exist even on integrated chips, and have done so for some time - see wolfson 8741 filters 4 and 5 which have 110 db of attenuation at nyquist. To all intents and purposes images are completely removed. In order to remove aliasing caused by inadequate adc filtering one might arguably want them to reach stopband even lower, but they will presumably cut out most of it sicne the filter kicks in around 20Khz (which makes sense).


Aliasing in ADCs is a different question than imaging in DACs.  ADCs typically have more aggressive rejection of alias frequencies than DACs have of image frequencies (since the former is much worse). 

 

Disadvantages to linear phase low-pass filters?

Reply #89
Thanks! Sonething made me think that images should have lower level, but I can't recall what was that.


You were probably thinking of zero-order hold, which is typically the minimum interpolation that you will find.

Look at the spectrum of a rectangular window to get an idea.


Thanks!
Though that's not what made me think so. IIRC, that was some strange (non-scientific) paper claiming that low-level ultrasonic images improved the sound of DACs with minimal-phase filters by essentially dithering the signal. That paper looked audiophile-suspicious at best.

Quote
I think when producing such content it makes sense to choose a steep filter to preserve high frequency content close to nyquist. This results in ringing.. but so what? On playback you can attenuate any pre- and post-ringing strongly just by filtering again with lower cutoff, optionally minimum phase such that no significant pre-ringing will occur on the final output.
You either let the anti-imaging filter of your DAC do that or you resample to a higher sampling rate with your filter of choice.


Does it matter at all when ringing is anyways out of hearing range? Use of minimum phase is understandable when one has to filter within audio band, and hence filtering artifacts would be noticeable.