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: Aliasing in slow roll off filters (Read 13364 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Aliasing in slow roll off filters

Hello. I'm new to this forum. I was wondering weather some one could help me out with my question.

Slow roll off filters used in dac side (playback) improve impulse response ( this I understand ), what I don't understand is why would aliasing occur
if the low pass filter cut off frequency is lower than the mirror image frequency since the image frequency is pushed higher when oversampling is used?
I read this information about aliasing in slow roll off filters in Ayre acoustics white paper.

Sorry if this topic has been discussed before, I could not find specific information about this.

Thank you.


Aliasing in slow roll off filters

Reply #1
Slow roll off filters used in dac side (playback) improve impulse response ( this I understand ),


They make the replay impulse response look better.

That is really not the same as making the full record/replay impulse response be better.


Quote
if the low pass filter cut off frequency is lower than the mirror image frequency since the image frequency is pushed higher when oversampling is used?


Oversampling on its own does not move the images up. It is the low-pass filtering associated with the oversampling that does this.

Quote
I read this information about aliasing in slow roll off filters in Ayre acoustics white paper.


Like just about everything published by audio manufacturers on this topic this one, too, is at the least incomplete with the truth.


Somewhat related: I recently did a semi-controlled listening test with a 96kHz source, and then two copies that were downsampled to 44.1k and then up again to 96k, one with a minimum phase filter (all post-ringing), one with maximum phase (all pre-ringing). A panel of 8 listeners found it very hard to discern any differences, and even when they thought they were hearing something their preferences were split evenly over the source files.

Aliasing in slow roll off filters

Reply #2
Here's an illustration showing the frequency response of a filter with a gentle roll-off. Its cutoff (which is defined as a –6 or –3 dB point) is exactly at Fs/2 (which is 22050 Hz), but its transition band extends above Fs/2. This leads to spectral images (a.k.a. aliasing) above Fs/2 not being fully attenuated.


Aliasing in slow roll off filters

Reply #3
This leads to spectral images (a.k.a. aliasing)...
I've often misused the term myself, but strictly speaking they're definitely images, and definitely not aliases. Aliasing happens when you don't filter properly during A>D and subsequently there's nothing you can do about it. Images remain if you don't filter properly during D>A, but you could filter later - or listen to the audio through something that filters anyway (i.e. a human ear!).

The problem is that if you leave the ultrasonic image frequencies in, they could cause intermodulation distortion in equipment down-stream, and then become audible, and objectionable. The other "problem" is that without an anti-image/reconstruction filter, the waveform looks awful on a scope and people start to think that digital audio ruins the signal - whereas the part within the range of human hearing (ignoring intermodulation distortion during playback) is fine even without a reconstruction filter.

Cheers,
David.

Aliasing in slow roll off filters

Reply #4
Yes, strictly speaking, aliasing happens when spectral images overlap. This is not the case during upsampling.

(and we are not starting a talk on a definition of upsampling here  )

Aliasing in slow roll off filters

Reply #5
Ok so its intermodulation distortion. Never thought of that. Thanks for your reply. Werner0 I tried minimum phase with all pre ringing and it did sound a little brighter,
and a successful abx proved there was a difference, but my digital playback filter is linear phase so I can't say whether its the same on all playback systems.  It's the combination of src and playback filter I guess. Linear phase src (sample rate conversion) did sound better on my system. Anyway thanks for your reply.

Aliasing in slow roll off filters

Reply #6
The problem is that if you leave the ultrasonic image frequencies in, they could cause intermodulation distortion in equipment down-stream, and then become audible, and objectionable. The other "problem" is that without an anti-image/reconstruction filter, the waveform looks awful on a scope and people start to think that digital audio ruins the signal - whereas the part within the range of human hearing (ignoring intermodulation distortion during playback) is fine even without a reconstruction filter.

Are audio DACs constrained in the peak output voltage? If so, would not "spending" voltage on recreating a pulse train where most of the bandwidth is of no use, also result in worse (in-band) SNR, compared to lowpass filtering the signal (depending on whether this filtering is carried out digitally or in the analog domain).

-k

 

Aliasing in slow roll off filters

Reply #7
Are audio DACs constrained in the peak output voltage?
Given the "problems" of inter-sample peaks, that would be an argument against filtering, not for it. Not a practical one though I don't think, given that handling ultrasonics properly is typically more of a problem than allowing for a slightly higher amplitude, and neither is a big deal compared with the issue of pushing ultrasonics through tweeters (which distort - always - transcoders almost always being the weakest link).

Note: I'm not claiming an audible difference for normal music, though it's easy enough to measure a difference, and hear a difference with certain signals.

Cheers,
David.

Aliasing in slow roll off filters

Reply #8
Quote
Are audio DACs constrained in the peak output voltage?
I don't know enough about how real-world audio DACs are made, but I would assume the analog-output is not hard-limited.    ...I assume good audio DACs can properly reconstruct inter-sample overs.

For example, an analog reconstruction filter for a 1V full-scale DAC could easily have 10V of headroom for any conceivable inter-sample overs.      A digital filter at the output of a DAC could also have headroom.    Digital electronics often run from 5V power supplies, and +/- 12V or +/-15V is common for op-amps/preamps or other line-level analog audio circuits. 

It's the digital (input) side of the DAC that's hard limited...  For example, when the binary input on a 16-bit DAC hits 1111111111111111* you simply cannot go any higher.  If you "try" to go higher your driver will clip the digital data.   

We use (non-audio) DACs (and ADCs) where I work, but they are used for DC (or relatively-slow changing "signals") and there is no filtering. 




* The most significant bit is actually used for the -sign, but the concept holds...  When you run out of bits, you cannot "count" any higher.


Aliasing in slow roll off filters

Reply #10
Quote
Are audio DACs constrained in the peak output voltage?
I don't know enough about how real-world audio DACs are made, but I would assume the analog-output is not hard-limited.    ...I assume good audio DACs can properly reconstruct inter-sample overs.

Say that a certain design can do at most 1V peak output, and has an inherent noise-floor of e.g. -100dB ref 1V.

If the designers choose to output a pulse train of 1% duty cycle (narrow pulses/impulse train), assuming that the filtering will be carried out by subsequent components, then the signal power will be effectively less than if a 100% duty cycle was used (smoothly filtered), while the noise floor would be (I assume) unchanged. Thus less SNR?

I guess what I am getting at is that if you are peak amplitude limited, then your SNR will benefit from doing any bandwidth limiting as early as possible.

-k

Aliasing in slow roll off filters

Reply #11
I think the answer to the OP question  - Why doesn't the use of oversampling  move the image away from the transition band of the low pass filter  -

maybe -  as the  oversampling is done by the oversampling  interpolating filter and because the oversampling interpolating filter and the low pass filter are one and the same thing , -  you can't have a  slow roll off and a large shift of the image  at the same time. -

Walt Kester    - Oversampling Interpolating DACS  ,  - Analog.com

"The high oversampling rate moves the image frequencies higher, thereby allowing a less complex lower cost filter with a wider transition band."

seems to contradict

Ayre MP white paper,  - Ayre.com

"By reducing the “sharpness” of the “knee” in the filter’s frequency response, the filter’s transient response is vastly improved.
Now there is only about one cycle of pre- and post-ringing
The penalty (remember, there is no such thing as a free lunch—only intelligent tradeoffs) is that there is more
“leakage” (aliasing) of high frequencies above 22,050 Hz back in to the audio band. Still, this only affects very high
frequencies and the levels are low enough not to cause audible problems."

has anyone got a definitve answer.



Aliasing in slow roll off filters

Reply #12
The first quote concerns with D/A, the second one — A/D.
The first quote concerns with an analog filter, the second one — with a digital one.

Aliasing in slow roll off filters

Reply #13
Both quotes are on the topic of D to A , but I agree the Walt Kester quote reference to  a lower compexity lower cost filter is  an  analog filter .

Aliasing in slow roll off filters

Reply #14
has anyone got a definitve answer.

If your pre-filtering and post-filtering "adhere to Nyquist" by completely attenuating everything >=fs/2 (or lets draw the line at 80 or 100dB), then the sound that will come out of your DAC is going to be the sound of those two filters - for good and bad.

If they do not adhere to Nyquist, then you will also have some degree of aliasing/images, i.e. nonlinear signal-dependent artifacts.

The same is true for (images) in cameras and displays, but there the selection of pre/post-filters is a lot worse, the bandwidth is low-ish compared to our senses, and our perception of filtering artifacts is somewhat different. Makes for an interesting comparision.

-k

Aliasing in slow roll off filters

Reply #15
What's the question again KMD?

I'm happy to give a definitive answer to anything  but I'm not sure the questions, quotes or assumptions in post 12 make sense.

Cheers,
David.

Aliasing in slow roll off filters

Reply #16
The question posed by the  OP  is why images wold occur  in the transition band of a slow roll off filter in a  DAC system that uses oversampling.

Aliasing in slow roll off filters

Reply #17
The question posed by the  OP  is why images wold occur  in the transition band of a slow roll off filter in a  DAC system that uses oversampling.


The impulse response is determined by the frequency response of all the filters in the system, both analog and digital, not just the analog.  More oversampling  means more of the work is shifted to the digital filter.  The same tradeoffs between impulse and frequency still apply no matter how the filter is implemented though, they are fundamental.

Aliasing in slow roll off filters

Reply #18
The OP is asking why the image is not shifted  away from the transition band  by the oversampling process.
My suggestion is that,  the oversampling process involves an interpolation algorithm, and  as , in this case , the roll off  the low pass function of the  interpolation algorithm is slow ,  it therefore  follows that the shift is correspondingly small.

Aliasing in slow roll off filters

Reply #19
The OP is asking why the image is not shifted  away from the transition band  by the oversampling process.


The image from the new oversampled rate is shifted, but if the roll off in the digital filter is slow enough, the original sampling rates images are not entirely removed.  With a slow roll off instead of moving the image, you clone it, leaving an attenuated one at the original location and adding a new one at the oversampled nyquist rate.

Aliasing in slow roll off filters

Reply #20
The question posed by the  OP  is why images wold occur  in the transition band of a slow roll off filter in a  DAC system that uses oversampling.

I believe that an "oversampling" DAC is most easily analyzed as a two-step DAC process. We know from sampling theory that if the digital samples contain significant energy in the range of [DC,20000] Hz for a 44100Hz sampling system (where fs/2 is 22050Hz), then an ideal DAC would have a flatt passband to 20kHz, then transition from 20kHz to 22.05kHz, then attenuate higher frequencies.

An oversampling DAC cannot really circumvent this. What it can do is move filter complexity from the analog domain to the digital domain. The means to do this is to increase the sample rate to e.g. 2x or 64x the source rate (insert zeros in-between samples), thereby repeating images of the original spectrum within the new (higher) sample rate. These images are filtered out (using a sharp, digital lowpass/interpolation filter) until you have the original spectrum occupying a small fraction of the available bandwidth. Then you can convert to analog output and apply a (simple) analog lowpassfilter with a large relative transition band.

-k

Aliasing in slow roll off filters

Reply #21
The question posed by the  OP  is why images wold occur  in the transition band of a slow roll off filter in a  DAC system that uses oversampling.


Forget what you think you know about sampling. In engineering, "sampling" means taking amplitude measurements at instantaneous moments of time, and that's all it means. It doesn't imply anything else. In an analogue to digital converter (ADC), the anti-alias filter comes before this sampling, the quantisation comes after this sampling. All three stages are found in an ADC. The three stages are not necessarily electrically separate. However, it's important to think of them separately to answer the question, because it defines what a "sample" is.


This means a normal sampled signal is a series of instantaneous amplitude measurements. It's not the amplitude "between" one sample and the next - in the engineering definition, "sampling" doesn't include averaging or filtering - it's the amplitude at the very instant of the sample. You have no information about the amplitude of the original signal outside of those sample instants*, and in the sampled signal the amplitude outside of those sample instants is zero. You don't have that data*. You have amplitude data for infinitely short moments in time (the sample points), and nothing (zero) every other time.



If it's an audio signal sampled at 48kHz, the spectrum of the sampled version includes the original spectrum 0-24kHz, then a mirrored copy of that spectrum from 24-48kHz, then a regular copy of the 0-24kHz spectrum at 48-72kHz, then a mirrored copy of that spectrum at 72-96kHz, and so on, stretching out to infinity.


A conceptually simple 4x oversampling process consists of two stages:

1. Insert three new samples after each original sample. The value of every new sample = zero.
You now have 4x as many samples. The sample rate is 4x higher = 192kHz. This has a Nyquist frequency of 96kHz.

The spectrum of the signal hasn't changed at all yet. Why not? Because you still have those same original instantaneous sample values. You've added some zeros, but the amplitude outside the original instantaneous sample values was already zero anyway. You haven't actually changed the coded signal at all.


2. Low pass filter the oversampled signal at the original Nyquist frequency.
NOW you've changed the signal, both temporally and spectrally. The zeros you inserted aren't zeros any more. The infinitely repeating spectrum still repeats to infinity, but you've wiped out the spectrum between 24kHz and 168kHz.
Why those values? Well, you've removed all the spectral repeats between the Nyquist frequency of the original signal (24kHz), up to the Nyquist frequency of the 4x oversampled signal (96kHz). Above that, what you have are spectral repeats of the oversampled signal itself, which starts with a mirror of what's between 0-96kHz. Most of that is empty, but the original signal still sat at 0-24kHz now has its first mirror at 168kHz-192kHz.



The confusion in the original question comes about because "oversampling" is a two stage process. You haven't improved the signal at all just by doing stage 1.


Why are there images left if the filter in stage 2 has a slow roll off? Well, why wouldn't there be? You haven't removed them before that filter. They don't disappear by themselves. Adding extra zero samples doesn't do anything by itself.

Cheers,
David.

* - correct anti-alias filtering in the ADC before the sampling allows you to know exactly what happens between sample points. This is the basis of Nyquist/Shannon sampling theory. However, you do not need to store any data about the signal between the sampling points because it is constrained and could only be one specific waveform. Oversampling (with an ideal filter) merely attempts to re-create this correct waveform.

Aliasing in slow roll off filters

Reply #22
You can also think of oversampling (the whole two part process) as interpolation. You insert the new samples at the right time instants and values - which is generally tricky for ratios other than integers - and then run an algorithm to fill the data inbetween.

By using a typical low order polynomial filter, medium order Lagrange filter (multilinear) or spline filter, you get an equivalent of slow rolloff lowpass. You can get a sharper one using Chebyshev or Legendre polynomials. The typically used interpolator is a sinc interpolator (Whittaker-Shannon), perfect for infinitely long impulse responses, but it has to be truncated and/or windowed to work in the real world. The other pick is an IIR lowpass filter, typically a model of Bessel or Butterworth. Sinc interpolators, much like Chebyshev (= nonuniform Fourier) and Legendre, have an arbitrarily low approximation error. Unlike the former, they are not bound to preserve the original data points, so the usual result is a slight lowpass filter; in the other two, the error is > Nyquist, but still very low and likely acceptable either as aliasing or imaging - can even be made lower than the noise floor.
Sinc interpolation is generally slow to evaluate even with a fast method. Fourier interpolation has very comparable results and is much faster.

In case you want some math: http://www-personal.umich.edu/~jpboyd/xop7...terpolation.pdf
Pretty good dissertation. This is on nonuniform-grid interpolation, a case which does not happen in audio, but this is generally just as applicable.
Might be more useful for, say, equalizers - you can make an arbitrary grid for a parametric equalizer with cosine band shape with those methods - and tweak the coefficients directly.
ruxvilti'a