Help - Search - Members - Calendar
Full Version: Simulation of ADC clock jitter
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific Discussion
cabbagerat
As part of my research I have been developing a couple of models for predicting the effects of ADC sample clock jitter on the digitized signal. I thought I would share a code snippet and some measurements with the HA crowd. I would appreciate any of the DSP gurus on the board telling me whether they think the method is legit or not.

First, a MATLAB function:
CODE
function y = fersjitter(x, fs, rms)
    l = size(x, 2);  
    for ii = 1:l        
        t = ii/fs+rms*randn();
        n = 1:l;
        y(ii) = sum(x(n).*sinc((t-n/fs)*fs));        
    end;


The function (which runs in O(n^2) time), simulates the effects of gaussian pdf jitter with with the specified RMS on the sample clock of x, with sample rate fs. If you want another type of jitter, replace the t=i/fs+rms*randn(); line with one of your choosing.

It works using the standard bandlimited interpolation formula, replacing t with t+some jitter factor. I am pretty convinced the method is valid, and has been used before in a number of papers, but haven't gotten around to showing it with any amount of rigor. I'm going to do that sometime soon though.
Axon
About the only issue I can see with this approach is that the resulting signal will no longer be bandlimited. You might want to upsample the signal before processing it. (I'm not quite sure how far though.)
Woodinville
QUOTE(Axon @ Oct 25 2006, 07:33) *

About the only issue I can see with this approach is that the resulting signal will no longer be bandlimited. You might want to upsample the signal before processing it. (I'm not quite sure how far though.)



Something I might point out is that much jitter is not broadband. Actual mechanisms in hardware tend to create jitter spectra that are not white.

It is enlightening to try white jitter and jitter at .555555 Hz at about 1/1000th of the sampling rate in RMS value. smile.gif
mikenet
It would be cool to simulate SPDIF style jitter(or, if that gets too hairy, record the recovered SPDIF clock from some device playing a test file). Then we could mess around with it, do some ABX tests, etc.
Axon
QUOTE(Woodinville @ Oct 26 2006, 13:24) *
Something I might point out is that much jitter is not broadband. Actual mechanisms in hardware tend to create jitter spectra that are not white.

It is enlightening to try white jitter and jitter at .555555 Hz at about 1/1000th of the sampling rate in RMS value. smile.gif

Heh. Yeah, 33rpm record wow doesn't exactly create ultrasonic components. I think I misremembered something - I've read that FM of a carrier with a modulating signal does not create a signal that is bandlimited, but that about 5% of the energy is spread across the entire frequency spectrum.

I was under the impression that similar processes were at work for time-modulating a signal. But when I ran some simulations with sinusoidal inputs and sinusoidal time modulations, any "reasonable" time modulation yielded extremely small modulated components. Things higher than the 2nd harmonic were well below the 16 bit noise floor unless I used absolutely absurd modulation amplitudes. Still, for a time modulation of amplitude 0.001 of the sampling rate, I think (IIRC) I got a 2nd harmonic component about -80db down. Of course, an ABX test that ain't.

cabbagerat
QUOTE(Woodinville @ Oct 26 2006, 10:24) *

Something I might point out is that much jitter is not broadband. Actual mechanisms in hardware tend to create jitter spectra that are not white.

It is enlightening to try white jitter and jitter at .555555 Hz at about 1/1000th of the sampling rate in RMS value. smile.gif
Of course, some jitter spectra a very narrow in bandwith or have a strong bimodal structure, etc. I'm away at the moment, but will run some tests when I get back to see how well the method works with deterministic and narrowband jitter.
Woodinville
QUOTE(Axon @ Oct 26 2006, 21:09) *

QUOTE(Woodinville @ Oct 26 2006, 13:24) *
Something I might point out is that much jitter is not broadband. Actual mechanisms in hardware tend to create jitter spectra that are not white.

It is enlightening to try white jitter and jitter at .555555 Hz at about 1/1000th of the sampling rate in RMS value. smile.gif

Heh. Yeah, 33rpm record wow doesn't exactly create ultrasonic components. I think I misremembered something - I've read that FM of a carrier with a modulating signal does not create a signal that is bandlimited, but that about 5% of the energy is spread across the entire frequency spectrum.

I was under the impression that similar processes were at work for time-modulating a signal. But when I ran some simulations with sinusoidal inputs and sinusoidal time modulations, any "reasonable" time modulation yielded extremely small modulated components. Things higher than the 2nd harmonic were well below the 16 bit noise floor unless I used absolutely absurd modulation amplitudes. Still, for a time modulation of amplitude 0.001 of the sampling rate, I think (IIRC) I got a 2nd harmonic component about -80db down. Of course, an ABX test that ain't.



Multiplication (say of a carrier by (.5 + .5*(f(x)) ) will only create one set of sidebands. Consider, multiply in the time domain, convolve in the frequency domain. The only time that things get out of hand is if the modulation index goes over 1, i.e. if f(x) exceeds the range of -1 to 1 as stated above. This, then, is the same as clipping, and has the same sort of spectrum.

Phase/fm modulation will create multiple sets of sidebands, but the strength of the sidebands depends enormously on the degree of modulation. Small FM modulation amounts result in something called "narrowband FM" which is very, very close to AM, except that one of the sidebands is inverted in amplitude.

Strictly speaking, a variety of Bessel functions describe the FM spectrum.

That is, of course, one of the points in suggesting modulation with a high derivitive and a low derivitive. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.