Maker Pro
Maker Pro

Audio Sampling Question

H

Henry VIII

Jan 1, 1970
0
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse? In other words, if I split the same analog
audio into two of these circuits in parallel, how much could their output
pulses differ in time? Is the answer simply the clock frequency accuracy?

Thanks is advance.
 
R

Richard Henry

Jan 1, 1970
0
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse? In other words, if I split the same analog
audio into two of these circuits in parallel, how much could their output
pulses differ in time? Is the answer simply the clock frequency accuracy?

Thanks is advance.

What method is being used th compare the data to the previously stored
set?
 
J

Jon Slaughter

Jan 1, 1970
0
Henry VIII said:
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC.
The analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the
ADC output data matches the stored data, the microprocessor generates an
output pulse. Some amount of processing time "X" is needed to recognize a
match and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse? In other words, if I split the same
analog audio into two of these circuits in parallel, how much could their
output pulses differ in time? Is the answer simply the clock frequency
accuracy?

Thanks is advance.

I'm not expert but I do know that some ADC's are several clocks behind in
there samples.
 
N

Nico Coesel

Jan 1, 1970
0
Henry VIII said:
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse? In other words, if I split the same analog
audio into two of these circuits in parallel, how much could their output
pulses differ in time? Is the answer simply the clock frequency accuracy?

No, it depends on how well the analog front ends of the ADCs are
matched. If the matching isn't near perfect, you'll have different
phase shifts.
 
G

Guy Macon

Jan 1, 1970
0
Henry said:
I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse? In other words, if I split the same analog
audio into two of these circuits in parallel, how much could their output
pulses differ in time? Is the answer simply the clock frequency accuracy?

There are several possible sources of variation. How bad each one
is depends on your hardware and possibly on the nature of the signal.

Are the analog filters identical? A slight difference in phase
shift will introduce an error. Even if you use the same analog
input and compare measurements at different times there could be
variations due to temperature.

Are the ADCs on a common clock? If they use two different clock
sources there could be an error of up to half the sample rate.

Does the microprocessor have any other tasks that could delay it
getting a sample?

How do you define "matches the data?" No ADC is perfectly
repeatable when the input signal is right on the edge of two
digital output values.

Finally, why the "assuming zero analog noise" simplification?
how about the many other ways such a system is imperfect?
 
W

whit3rd

Jan 1, 1970
0
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse?

The 'compare' operation can do more than just set a bit; you
can measure the time delay (phase shift) due to the sampling
clock being asynchronous to the input signal, and your
microprocessor can know exactly how long to delay its
'recognize' signal output. So the jitter is the microprocessor
time-slice (not necessarily the same as a single clock cycle).

If your operation is a simple comparison, the 44 kHz clock can
be up to +1/2 cycle or down to - 1/2 cycle different from the
reference case, so the jitter would be related to the sample
clock.

And, of course, some signals (like a steady sine wave) would
trigger an output once per cycle, so a single 'match' can
result in thousands of outputs; the uncertainty there is very
large (they are all true matches, but only one is 'right' in
some targeted sense).
 
V

Vladimir Vassilevsky

Jan 1, 1970
0
Henry VIII said:
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.
My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse.

Assuming randomlike signal

dT = q /(sqrt(T * Fs) *Slew)

q - quantization step
T - signal duration
Fs - sample rate
Slew - average slew rate

Vladimir Vassilevsky
DSP and Mixed Signal Consultant
www.abvolt.com
 
E

Eeyore

Jan 1, 1970
0
Henry said:
Hi All,

I'm sampling high-fidelity analog audio at 44.1 kHz with a 16-bit ADC. The
analog audio is noise-free for the purposes of this question.

The ADC data stream goes to a microprocessor that compares the data in
blocks of multiple samples to a previously stored set of data. When the ADC
output data matches the stored data, the microprocessor generates an output
pulse. Some amount of processing time "X" is needed to recognize a match
and generate the pulse.

My question, again assuming zero analog noise, is: what is the time
uncertainty of the output pulse?

That'll depends on the comparison algorithm in your microprocessor.

Graham
 
E

Eeyore

Jan 1, 1970
0
Guy said:
There are several possible sources of variation. How bad each one
is depends on your hardware and possibly on the nature of the signal.

Are the analog filters identical? A slight difference in phase
shift will introduce an error. Even if you use the same analog
input and compare measurements at different times there could be
variations due to temperature.

Most modern audio ADCs don't require a front end filter.

Graham
 

neon

Oct 21, 2006
1,325
Joined
Oct 21, 2006
Messages
1,325
assuming no noise or even quantising noise two system operating in parallel wil be equal to except for the components time difference. I will sugest to yuo that because of the difference thy will never agree on pulse output. you must increase the clock into the mega for any acuracy or close to it.
 
N

Nico Coesel

Jan 1, 1970
0
Eeyore said:
Most modern audio ADCs don't require a front end filter.

Sorry, but that can't be true. There has to be some sort of filtering
somewhere (even if it comes for free because of the bandwidth of the
pre-amplifier).
 
E

Eeyore

Jan 1, 1970
0
Nico said:
Sorry, but that can't be true.

It is true. They have no analog front end filter.

There has to be some sort of filtering somewhere (even if it comes for free
because of the bandwidth of the pre-amplifier).

It's done digitally internally AIUI. And don't be silly about preamp bandwidths.
Most modern audio op-amps have GBPs of 10MHz

Graham
 
N

Nico Coesel

Jan 1, 1970
0
Eeyore said:
It is true. They have no analog front end filter.

If you are sampling, then you'll need to get rid of the frequencies
which are above fs/2 otherwise you will get aliasing problems. Thats a
law of physics like gravity.
 
E

Eeyore

Jan 1, 1970
0
Nico said:
If you are sampling, then you'll need to get rid of the frequencies
which are above fs/2 otherwise you will get aliasing problems. Thats a
law of physics like gravity.

Onboard digital filter.

The ADC oversamples. That's how they avoid aliasing. It digitally filters at the
oversampled rate and then downsamples to 44.1kHz.

No analogue front end filter's required so no issues with filter component tolerances.
The digital filters match perfectly of course.

Graham
 
P

Phil Allison

Jan 1, 1970
0
"Nico Coesel"
"Eeysore PITA Fool"
If you are sampling, then you'll need to get rid of the frequencies
which are above fs/2 otherwise you will get aliasing problems. Thats a
law of physics like gravity.


** The A to D sampling rates used in audio are typically 96 kHz, 192kHz or
even higher when Sigma Delta modulation is used.

Plus all audio signals are band limited to not much over 20 kHz by the use
of microphones and their associated pre-amps.

Makes the use of dedicated, audio band limiting filters redundant in most
cases.



........ Phil
 
G

Guy Macon

Jan 1, 1970
0
Eeyore said:
Onboard digital filter.

The ADC oversamples. That's how they avoid aliasing.
It digitally filters at the oversampled rate and then
downsamples to 44.1kHz.

No analogue front end filter's required so no issues
with filter component tolerances. The digital filters
match perfectly of course.

I hate to be the one to break this to you, but you are
suffering from a fundamental misconception as to how
digital sampling of analog signals actually works.

*No* digital technique can act as an antialiasing filter.
It's impossible. By the time the digital filter gets the
information, a vital piece of information -- whether the
signal is an alias or not -- has been lost.

Oversampling is simply sampling at a higher rate, thus
moving the need for antialiasing higher in frequency.
It also allows an analog filter that interferes with
the highest portion of the signal more, because the
frequencies being affected are still higher than the
signal of interest. The digital filter takes out these
higher-than-the-signal frequencies but cannot perform
the anti-aliasing function. That is and always will
be, an analog function.
 
T

Tom Bruhns

Jan 1, 1970
0
Most modern audio ADCs don't require a front end filter.

Graham

Sorry, Graham, that's not quite true. Because the sampling is at a
high frequency in a delta-sigma converter, typically a couple MHz, the
alias filtering can be very "gentle", but it IS necessary if there's
any chance of high frequencies getting through otherwise. Frequencies
near the sampling frequency will alias quite nicely down to audio.
Things get a little more complicated if you want to use various sample
rates on the ADC; there's a little fifth-order antialias filter in the
HP E1433A four-channel digitizer (which can be programmed over a 5:1
range of sample rates, as I recall). The filter isn't anything
special, just fixed-value parts, but even so, typically the channels
match to within a very few nanoseconds.

On the other hand, with respect to the OP's question, how do you know
the samples will be at the correct times, and not off by an arbitrary
fraction of a sample from the reference samples? And how do you know
the clock rate is identical? In other words, just HOW do you compare
one digitization with another? I'm not saying it's impossible, it's
just not trivial. One should NOT expect to get a set of samples that
have nominally the same values as a previous set of samples of the
same passage; they could be entirely different.

Cheers,
Tom
 
B

boB K7IQ

Jan 1, 1970
0
I hate to be the one to break this to you, but you are
suffering from a fundamental misconception as to how
digital sampling of analog signals actually works.

*No* digital technique can act as an antialiasing filter.
It's impossible. By the time the digital filter gets the
information, a vital piece of information -- whether the
signal is an alias or not -- has been lost.

Oversampling is simply sampling at a higher rate, thus
moving the need for antialiasing higher in frequency.
It also allows an analog filter that interferes with
the highest portion of the signal more, because the
frequencies being affected are still higher than the
signal of interest. The digital filter takes out these
higher-than-the-signal frequencies but cannot perform
the anti-aliasing function. That is and always will
be, an analog function.

I'm remembering that a 64X oversampling Delta-Smegma A-D converter
needs a single order R-C LPF with a cut of around 3dB at the sample
frequency. Not ~much~ filtering, but a teeny bit.

boB
 
T

Tom Bruhns

Jan 1, 1970
0
If you are sampling, then you'll need to get rid of the frequencies
which are above fs/2 otherwise you will get aliasing problems. Thats a
law of physics like gravity.

No, not true. It's only a problem if the aliased frequencies fall
within the band of interest. In a delta-sigma converter (used almost
universally for audio these days), the sampling is typically at some
MHz, and a digital filter wipes out everything above 20kHz
(generally). So it's only frequencies within 20kHz of the sampling
rate or its harmonics that alias to frequencies which fall within the
passband of the digital filter.

A specific example: a delta-sigma converter that oversamples at 64
times the output rate, which is 44.1ksamples/sec. 64*44.1kHz =
2.8224MHz. 2.8224MHz - 20kHz = 2.8024MHz. Obviously, normal audio
transducers shouldn't be putting out any significant signals up there,
but if you want to claim alias protection to some level in the event
that users DO put in some high frequencies, you only need to provide a
rolloff that starts somewhere above 20kHz and drops to the desired
point by 2.8MHz--a much easier task than in the "old days" of
converters that sample directly at 44.1kHz. Instead of needing a high-
order (e.g. 11th) elliptical filter that cuts off by 24.1kHz, you can
get about 90dB protection from a third order Butterworth that's only
down 0.1dB at 20kHz.

Cheers,
Tom
 
J

Jon Slaughter

Jan 1, 1970
0
Eeyore said:
Onboard digital filter.

The ADC oversamples. That's how they avoid aliasing. It digitally filters
at the
oversampled rate and then downsamples to 44.1kHz.

No analogue front end filter's required so no issues with filter component
tolerances.
The digital filters match perfectly of course.

Graham

You have no clue what your talking about... what a suprise!!!


The oversampling is to reduce the complexity of the analog filtering. You
get aliasing no matter what unless you can be 100% sure that your signal's
bandwidth is 1/2 the sampling rate. If there is any spurious noise then that
will be reflected back onto the first nyquist zone and degrade the signal.

By oversampling, say, 64 times, then we have 64x as much room to roll off
the highs. Then we can digitally use a FIR low pass that removes all the
noise above the signal itself.

Since the gain of a simple low pass filter is rolls off about 6dB every
octave, every time you double the bandwidth(sampling rate) of the sampler vs
the bandwidth of the signal you get a 6dB roll off of the max frequency
which means you reduce all higher frequencies that normally would be aliased
by k*6dB.

If the bandwidth of the signals you are working with is B and you oversample
it k times, then any aliasing will be below -k*6dB. Of course now your
working with a signal that has a much larger bandwidth than what you
actually need so you downsample to reduce it back down to the original
bandwidth. Thats not before you digitally filter the signal to remove all
the frequencies between B and k*B so they do not get aliased by into the
signal. Its called decimation.

Obviously this is just another example of you talking about your ass. Maybe
one day you'll get a clue and actually learn something or at the very least
clean the bullshit comming from your mouth.

Jon
 
Top