IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Aliasing in slow roll off filters
cool n hot
post Nov 7 2013, 08:06
Post #1





Group: Members
Posts: 11
Joined: 7-November 13
Member No.: 111471



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.

Go to the top of the page
+Quote Post
WernerO
post Nov 7 2013, 08:16
Post #2





Group: Members
Posts: 74
Joined: 21-November 06
Member No.: 37858



QUOTE (cool n hot @ Nov 7 2013, 09:06) *
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.
Go to the top of the page
+Quote Post
Alexey Lukin
post Nov 7 2013, 08:19
Post #3





Group: Members
Posts: 198
Joined: 31-July 08
Member No.: 56508



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.

Go to the top of the page
+Quote Post
2Bdecided
post Nov 7 2013, 14:48
Post #4


ReplayGain developer


Group: Developer
Posts: 5281
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Alexey Lukin @ Nov 7 2013, 08:19) *
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.
Go to the top of the page
+Quote Post
Alexey Lukin
post Nov 7 2013, 14:52
Post #5





Group: Members
Posts: 198
Joined: 31-July 08
Member No.: 56508



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 laugh.gif )
Go to the top of the page
+Quote Post
cool n hot
post Nov 19 2013, 05:04
Post #6





Group: Members
Posts: 11
Joined: 7-November 13
Member No.: 111471



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.
Go to the top of the page
+Quote Post
knutinh
post Nov 19 2013, 12:52
Post #7





Group: Members
Posts: 570
Joined: 1-November 06
Member No.: 37047



QUOTE (2Bdecided @ Nov 7 2013, 14:48) *
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
Go to the top of the page
+Quote Post
2Bdecided
post Nov 19 2013, 14:37
Post #8


ReplayGain developer


Group: Developer
Posts: 5281
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (knutinh @ Nov 19 2013, 11:52) *
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.
Go to the top of the page
+Quote Post
DVDdoug
post Nov 19 2013, 23:38
Post #9





Group: Members
Posts: 2676
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



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.

This post has been edited by DVDdoug: Nov 19 2013, 23:45
Go to the top of the page
+Quote Post
cool n hot
post Nov 20 2013, 01:16
Post #10





Group: Members
Posts: 11
Joined: 7-November 13
Member No.: 111471



QUOTE (cool n hot @ Nov 19 2013, 06:04) *
Werner0 I tried minimum phase with all pre ringing and it did sound a little brighter,


correction > minimum phase with all post ringing.
Go to the top of the page
+Quote Post
knutinh
post Nov 20 2013, 15:16
Post #11





Group: Members
Posts: 570
Joined: 1-November 06
Member No.: 37047



QUOTE (DVDdoug @ Nov 19 2013, 23:38) *
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

This post has been edited by knutinh: Nov 20 2013, 15:19
Go to the top of the page
+Quote Post
KMD
post Dec 13 2013, 12:38
Post #12





Group: Members
Posts: 123
Joined: 21-January 09
From: UK
Member No.: 65825



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.


Go to the top of the page
+Quote Post
Alexey Lukin
post Dec 13 2013, 13:01
Post #13





Group: Members
Posts: 198
Joined: 31-July 08
Member No.: 56508



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.

This post has been edited by Alexey Lukin: Dec 13 2013, 13:02
Go to the top of the page
+Quote Post
KMD
post Dec 13 2013, 13:39
Post #14





Group: Members
Posts: 123
Joined: 21-January 09
From: UK
Member No.: 65825



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 .

This post has been edited by KMD: Dec 13 2013, 13:54
Go to the top of the page
+Quote Post
knutinh
post Dec 13 2013, 15:12
Post #15





Group: Members
Posts: 570
Joined: 1-November 06
Member No.: 37047



QUOTE (KMD @ Dec 13 2013, 12:38) *
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
Go to the top of the page
+Quote Post
2Bdecided
post Dec 13 2013, 15:19
Post #16


ReplayGain developer


Group: Developer
Posts: 5281
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



What's the question again KMD?

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

Cheers,
David.
Go to the top of the page
+Quote Post
KMD
post Dec 13 2013, 22:29
Post #17





Group: Members
Posts: 123
Joined: 21-January 09
From: UK
Member No.: 65825



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.

This post has been edited by KMD: Dec 13 2013, 22:39
Go to the top of the page
+Quote Post
saratoga
post Dec 13 2013, 22:42
Post #18





Group: Members
Posts: 5119
Joined: 2-September 02
Member No.: 3264



QUOTE (KMD @ Dec 13 2013, 16:29) *
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.
Go to the top of the page
+Quote Post
KMD
post Dec 14 2013, 20:43
Post #19





Group: Members
Posts: 123
Joined: 21-January 09
From: UK
Member No.: 65825



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.

This post has been edited by KMD: Dec 14 2013, 21:03
Go to the top of the page
+Quote Post
saratoga
post Dec 14 2013, 21:02
Post #20





Group: Members
Posts: 5119
Joined: 2-September 02
Member No.: 3264



QUOTE (KMD @ Dec 14 2013, 14:43) *
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.
Go to the top of the page
+Quote Post
knutinh
post Dec 16 2013, 06:47
Post #21





Group: Members
Posts: 570
Joined: 1-November 06
Member No.: 37047



QUOTE (KMD @ Dec 13 2013, 22:29) *
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
Go to the top of the page
+Quote Post
2Bdecided
post Dec 16 2013, 11:39
Post #22


ReplayGain developer


Group: Developer
Posts: 5281
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (KMD @ Dec 13 2013, 21:29) *
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.
Go to the top of the page
+Quote Post
AstralStorm
post Feb 12 2014, 06:33
Post #23





Group: Members
Posts: 745
Joined: 22-April 03
From: /dev/null
Member No.: 6130



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.

This post has been edited by AstralStorm: Feb 12 2014, 07:19


--------------------
ruxvilti'a
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th November 2014 - 05:31