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

Disadvantages to linear phase low-pass filters?

Reply #25
I've read the article and understand it some extent.

"Without oversampling, it is very difficult to implement filters with the sharp cutoff necessary to maximize use of the available bandwidth without exceeding the Nyquist limit."

My understanding had always been that using oversampling allowed for gradual low-pass filters to be used. And that if there was no oversampling, a steep filter would have to be used. That *seems* to be what the article is saying, but in confusing language, unless I'm misunderstanding it.

Disadvantages to linear phase low-pass filters?

Reply #26
I've read the article and understand it some extent.

"Without oversampling, it is very difficult to implement filters with the sharp cutoff necessary to maximize use of the available bandwidth without exceeding the Nyquist limit."

My understanding had always been that using oversampling allowed for gradual low-pass filters to be used. And that if there was no oversampling, a steep filter would have to be used. That *seems* to be what the article is saying, but in confusing language, unless I'm misunderstanding it.


I think what you're misunderstanding is that this is in reference to an anti-aliasing filter on an ADC, whereas what you are talking about in this thread is a resampler.

Disadvantages to linear phase low-pass filters?

Reply #27
I've read the article and understand it some extent.

"Without oversampling, it is very difficult to implement filters with the sharp cutoff necessary to maximize use of the available bandwidth without exceeding the Nyquist limit."

My understanding had always been that using oversampling allowed for gradual low-pass filters to be used. And that if there was no oversampling, a steep filter would have to be used. That *seems* to be what the article is saying, but in confusing language, unless I'm misunderstanding it.


I think what you're misunderstanding is that this is in reference to an anti-aliasing filter on an ADC, whereas what you are talking about in this thread is a resampler.


Well, I'm always eager to learn.

Disadvantages to linear phase low-pass filters?

Reply #28
This should be clear if you understand sampling, aliasing, imaging..

When recording (A/D conversion by an ADC) you need to bandlimit the input signal, else you will get aliasing. Now 44.1 kHz sampling rate requires you to filter steeply. That's not easy to do with an analog filter.
So we filter with a simpler analog filter, but then have to sample at a much higher rate. Then we can apply a steep digital low pass filter and output the desired 44.1 kHz rate.

D/A conversion is reversed and now we would get images above 22.05 kHz. So we "oversample" e.g. by some high factor with a steep digital low pass filter. Then we do the D/A. Finally, we get rid of the remaining (but now much higher in frequency) images with a simple analog filter. See the image I posted above.



Resampling is just that. You take samples (re-sample) at a different period T than the input signal has. Here you can get both imaging and aliasing, depending on the input and output sampling rates.

For example, if you resample from 88.2 kHz to 44.1 kHz you cannot just throw away every other sample. That would cause aliasing. So the resampler filters to <22.05 kHz first, before throwing away redundant samples.
If you resample to a higher rate you'd get images without filtering.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #29
This should be clear if you understand sampling, aliasing, imaging..


I do...

When recording (A/D conversion by an ADC) you need to bandlimit the input signal, else you will get aliasing.


Yes

Now 44.1 kHz sampling rate requires you to filter steeply. That's not easy to do with an analog filter.


Yes

So we filter with a simpler analog filter, but then have to sample at a much higher rate.


Simpler - more gradual? So while the sound is still in the analog domain, an analog low pass filter is applied to remove information that would be above the nyquist limit in order to prevent it from aliasing.(?)

Then we can apply a steep digital low pass filter and output the desired 44.1 kHz rate.

What I'm not understanding is why it's necessary to oversample in order to use a steep filter? Or is the oversampling to allow us to use a more gentle analog low-pass filter?

Disadvantages to linear phase low-pass filters?

Reply #30
This should be clear if you understand sampling, aliasing, imaging..


I do...


I disagree.

Then we can apply a steep digital low pass filter and output the desired 44.1 kHz rate.

What I'm not understanding is why it's necessary to oversample in order to use a steep filter? Or is the oversampling to allow us to use a more gentle analog low-pass filter?


You need to oversample in order to use a digital filter at all. 

Disadvantages to linear phase low-pass filters?

Reply #31
I disagree. You need to oversample in order to use a digital filter at all.


So, several times I've specifically asked why this was the case, and received nothing but passive aggression and no answers. Clearly I went to the wrong forum.

Disadvantages to linear phase low-pass filters?

Reply #32
I disagree. You need to oversample in order to use a digital filter at all.


So, several times I've specifically asked why this was the case, and received nothing but passive aggression and no answers. Clearly I went to the wrong forum.


Because of the sampling theorem.  Any frequencies above the Nyquist rate are aliased, so if you want to use a digital filter, you must oversample enough that your digital filter has some room to work in.  If you are critically sampled, there is nothing to digitally filter.

Disadvantages to linear phase low-pass filters?

Reply #33
I disagree. You need to oversample in order to use a digital filter at all.


So, several times I've specifically asked why this was the case, and received nothing but passive aggression and no answers. Clearly I went to the wrong forum.


Because of the sampling theorem.  Any frequencies above the Nyquist rate are aliased, so if you want to use a digital filter, you must oversample enough that your digital filter has some room to work in.


"if you want to use a digital filter, you must oversample enough that your digital filter has some room to work in."

Why does it need room to work if it's a steep filter? What you're stating is what my original understanding had always been, that oversampling gave more room for the filter and allowed it to use a more gradual slope (extending into frequencies above the nyquist limit so it wouldn't induce phase issues below the nyquist limit.) But then my recent test showed that a steep linear-phase filter can still sound "perfect" which leads me to wonder why the oversampling is necessary. If the digital filter is steep, what is the "room to work"?

Disadvantages to linear phase low-pass filters?

Reply #34
I disagree. You need to oversample in order to use a digital filter at all.


So, several times I've specifically asked why this was the case, and received nothing but passive aggression and no answers. Clearly I went to the wrong forum.


Because of the sampling theorem.  Any frequencies above the Nyquist rate are aliased, so if you want to use a digital filter, you must oversample enough that your digital filter has some room to work in.


"if you want to use a digital filter, you must oversample enough that your digital filter has some room to work in."

Why does it need room to work if it's a steep filter?


What is it you think an antialiasing filter does?

What you're stating is what my original assumption had always been, that oversampling gave more room for the the filter and allowed it to use a more gradual slope. So it wouldn't require a steep filter. But then my recent test showed that a steep filter can still sound "perfect" which leads me to wonder why the oversampling is necessary. If the digital filter is steep what is the "room to work"?


What does resampling have to do with anything you just asked me?

Disadvantages to linear phase low-pass filters?

Reply #35
What is it you think an antialiasing filter does?


Removes frequencies above nyquist before sampling so they don't fold down back into the signal when sampling.

Disadvantages to linear phase low-pass filters?

Reply #36
What is it you think an antialiasing filter does?


Removes frequencies above nyquist before sampling so they don't fold down back into the signal when sampling.


Good.  The key part is that it removes frequencies before sampling, but a digital filter can only be run after sampling.  So you asked why you need to be oversampled to remove aliasing with a digital filter (and so after sampling).  The answer is:  you need the extra bandwidth provided by oversampling to put all those aliased frequencies so that they don't land on top of your signal when sampling (and before filtering).


Disadvantages to linear phase low-pass filters?

Reply #37
What is it you think an antialiasing filter does?


Removes frequencies above nyquist before sampling so they don't fold down back into the signal when sampling.


Good.  The key part is that it removes frequencies before sampling, but a digital filter can only be run after sampling.  So you asked why you need to be oversampled to remove aliasing with a digital filter (and so after sampling).  The answer is:  you need the extra bandwidth provided by oversampling to put all those aliased frequencies so that they don't land on top of your signal when sampling (and before filtering).


I think most of this thread is just confusion. What you wrote is what my understanding was before making this thread. The question then (which relates to the original post) is how does the steep filter not cause pre-ringing in the audible range?

Here is what my original (flawed) understanding was:

Analog signal -> Oversampled -> Gentle slow linear-phase filter to remove aliasing -> sampled at intended frequency

Obviously this doesn't work, as the gentle slope would allow high frequencies to remain which would get folded down in the final sampling.

So a steep filter is being used. But I had thought the steep filter would cause pre-ringing. Though it seems it doesn't based on the test I did earlier (with the sample rate conversion)

Disadvantages to linear phase low-pass filters?

Reply #38
So we filter with a simpler analog filter, but then have to sample at a much higher rate.


Simpler - more gradual? So while the sound is still in the analog domain, an analog low pass filter is applied to remove information that would be above the nyquist limit in order to prevent it from aliasing.(?)

Simpler as in less steep, lower order, fewer parts, cheaper.
For example, a 1st order (one pole) low pass has a slope of 6 dB/octave. A 4th order butterworth has 24/dB octave.

So if you design a one pole filter with cutoff frequency of 30 kHz, then at 30 kHz we're 3 dB down, at 300 kHz we're only 20 dB down.


Yes, this low pass filter is there to prevent aliasing in the actual A/D conversion.


Then we can apply a steep digital low pass filter and output the desired 44.1 kHz rate.

What I'm not understanding is why it's necessary to oversample in order to use a steep filter? Or is the oversampling to allow us to use a more gentle analog low-pass filter?

It's not. You can always use a steep filter. But as you've understood above, our digital signal directly after the actual A/D conversion (still inside the ADC) has a much higher rate than what we want. This is also where we get into delta-sigma territory.
Again, in the simplest case the delta-sigma modulator will output a bitstream and digital filters will turn this into 24 bit PCM samples that are low pass filtered to <Nyquist of the ADCs output sampling rate (e.g. 96 kHz).


(All of this happens automatically inside the ADC, if that wasn't clear.)
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #39
The question then (which relates to the original post) is how does the steep filter not cause pre-ringing in the audible range?

Explained here already.


Here is what my original (flawed) understanding was:

Analog signal -> Oversampled -> Gentle slow linear-phase filter to remove aliasing -> sampled at intended frequency

Obviously this doesn't work, as the gentle slope would allow high frequencies to remain which would get folded down in the final sampling.

So a steep filter is being used. But I had thought the steep filter would cause pre-ringing. Though it seems it doesn't based on the test I did earlier (with the sample rate conversion)

Again, see my linked post.

It does cause pre-ringing, but this ringing is at the cutoff frequency of the steep linear phase filter.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #40
So a steep filter is being used. But I had thought the steep filter would cause pre-ringing. Though it seems it doesn't based on the test I did earlier (with the sample rate conversion)


Maybe I wasn't clear before, but I don't think the test you did before has anything to do with pre-ringing.  You probably did have some of it, but how do you expect to see that just by changing sampling rates back and forth? 

Disadvantages to linear phase low-pass filters?

Reply #41
Ok, so there is pre-ringing, but since I can't hear past 17khz it was inaudible to me (and it was way down below the noise floor anyway)

Maybe I wasn't clear before, but I don't think the test you did before has anything to do with pre-ringing.  You probably did have some of it, but how do you expect to see that just by changing sampling rates back and forth?


Well the thing is, there wasn't even really anything in the analyzer either. It was like 160 db down. So I guess the answer is that it's there, but it's really a theoretical thing, as it's not audible.

Disadvantages to linear phase low-pass filters?

Reply #42
Ok, so there is pre-ringing, but since I can't hear past 17khz it was inaudible to me (and it was way down below the noise floor anyway)

Maybe I wasn't clear before, but I don't think the test you did before has anything to do with pre-ringing.  You probably did have some of it, but how do you expect to see that just by changing sampling rates back and forth?


Well the thing is, there wasn't even really anything in the analyzer either. It was like 160 db down. So I guess the answer is that it's there, but it's really a theoretical thing, as it's not audible.


Ok maybe I was really unclear:  I think that test is useless and tells you nothing.  Downsampling and upsampling is just lowpass filtering twice.  If you lowpass an impulse function you'll see ringing.  If you just lowpass regular audio at some ultrasonic frequency you won't see shit most likely. 

If you want to look at ringing, just compute the impulse response of a filter.

Disadvantages to linear phase low-pass filters?

Reply #43
musichascolors, as I said, the flat part of a linear phase filter does nothing to the signal. It neither changes magnitude nor phase, it just adds a simple delay.


I will give you one more example, maybe it helps..
Imagine an impulse at 96 kHz. An impulse is just a single sample at max amplitude, the remaining samples are zero. This impulse needs to be bandlimited to <= 48 kHz, right? Yes, and it is! There is actually infinite ringing at 48 kHz, such that each sample other than the main impulse matches exactly each zero-crossing of the ringing.




Now if we ideally filtered and bandlimited this to <=24 kHz then every other sample would be zero. (You can imagine adding another sample exactly in the middle between each existing sample in the image above, and then stretching this 2x to match the original sample positions.)
Given this bandlimiting, you can then throw away every other example, and now your sampling rate is 48 kHz.

edit: Here is an image of that:




Now practical filters are not infinite but maybe a few hundreds or thousands of sample long. This will result in samples not perfectly hitting the zero-crossings.
"I hear it when I see it."

Disadvantages to linear phase low-pass filters?

Reply #44
Thanks!

Disadvantages to linear phase low-pass filters?

Reply #45
You need to oversample in order to use a digital filter at all.


Oversampling may facilitate the process and improve the outcome, but it is not absolutely necessary.

Disadvantages to linear phase low-pass filters?

Reply #46
You need to oversample in order to use a digital filter at all.


Oversampling may facilitate the process and improve the outcome, but it is not absolutely necessary.


In this thread's context the digital filter is for anti-aliasing or anti-imaging at Nyquist. In this application, oversampling is mandatory.

Putting it in another way: given a 44.1kHz-sampled signal, how would you go about making a digital anti-imaging filter without oversampling?


Disadvantages to linear phase low-pass filters?

Reply #47
You need to oversample in order to use a digital filter at all.


Oversampling may facilitate the process and improve the outcome, but it is not absolutely necessary.


In this thread's context the digital filter is for anti-aliasing or anti-imaging at Nyquist. In this application, oversampling is mandatory.

Putting it in another way: given a 44.1kHz-sampled signal, how would you go about making a digital anti-imaging filter without oversampling?


One approach would be to design the filter to have appreciable but still inaudible losses below 22.05 KHz.  But even that might not be necessary.

The Philips DACs that introduced oversampling justified their use of oversampling with its dynamic range/SNR benefits. not any improvements in bandpass. 

In fact if you don't oversample, you don't need to worry about the anti-imaging since the images are not possible without oversampling or some other nonlinear processing.

Let's look at digital 101. The ADC has anti-imaging filters so that the 44.1 KHz digital data stream has no images. If you turn around and convert that data stream back into analog without further processing in the digital domain, where did the images come from?

One other point - imaging isn't the only problem with an unfiltered digital signal - there is also the problem of its modulation due to it being sampled.

Disadvantages to linear phase low-pass filters?

Reply #48
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.


In my relatively layman understanding, supposedly so, given it itself rings at the cutoff frequency.
However, how comes that I get 18kHz ringing after filtering sharp transition from 150 hz signal to 550 hz one with a filter with 23.5 kHz cutoff? I understand that the transition shows itself as a HF spike in frequency domain, even despite it's at zero-crossing and both signal way below cutoff, but why do I get ringing below cutoff?