S/PDIF and PLL

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
JTest is a sine at Fs/4, which you check for jitter using FFT, plus a bit-flipping pattern designed to introduce data-dependent jitter in jitter-challenged SPDIF decoders. You can use any frequency you want for this pattern, to test how PLLs clean things up (or not). I used 35 and 350 Hz for example.

The graphs are not directly comparable (these are old measurements done at different times) but they do give a feel of how things go...
 
JTest is a sine at Fs/4, which you check for jitter using FFT, plus a bit-flipping pattern designed to introduce data-dependent jitter in jitter-challenged SPDIF decoders. You can use any frequency you want for this pattern, to test how PLLs clean things up (or not). I used 35 and 350 Hz for example..

Peufeu, which PC software and soundcard do you use for your jitter measurements?
 

TNT

Member
Joined 2003
Paid Member
Even 100ps of jitter on an AES/SPDIF interface is like throwing paper clips out of WTC1 to delay the collapse!

When you deal with HDSDI streams at 3gbs, then we worry about single digit jitter on the ps range. But AES/SPDIF is much lower in frequency.

Do the math! Consider the length of an audio sample. Now displace that in time by 100ps. You think any human can detect that timing slip?

Jitter manifest itself as distorsion and not as a "timing" error. Reproducing a sample in the wrong time, skews the represented, and intended, waveform.

I think there have been tests that prove human detection of (was it?) 100 ps.

//
 

TNT

Member
Joined 2003
Paid Member
I second that 200%.

See attached files : one is a €2000 HT receiver from a famous japanese brand ; the other is a cheap WM9905+ES9023 I put together. Both play SPDIF over TOSLINK from a €29.99 HYUNDAI CD-DVD-MP3 player. This player is a true piece of junk, the power supply is so wimpy the display dims when it seeks and its output jitter is truly humogous. A perfect source for this test. One graph is full range, the other one centered on the test frequency, sorry about that...

...and the last one is WCLK coming out of WM8805 with a nice implementation mistake on my part :D

Brownie points if you figure which is which without looking at the plot legend.

I don't get this post. What are you points? Cant you hear any differences? What is your message? That different gear measures differently?

//
 
Peufeu, which PC software and soundcard do you use for your jitter measurements?

The soundcard is a E-MU 0202 USB on a Windows PC. It has the following advantages :

- Asynchronous USB Audio Class 2, with 2 local oscillators. Its jitter is reasonably low.
- THD is low enough for basic measurements, and it has balanced IO.
- ASIO/Kernel Streaming ensure Windows doesn't mess with the data
- Headphone output has enough drive current to test regulators impedance etc
- Got it used for €50

It has drawbacks, though :

- The onboard opamps +/-15V rails are powered by switching converters from USB +5V, and the filtering is crap, so the headphone out has a healthy amount of HF noise spikes on it.
- It sounds like crap.

So it's not perfect, but for 50€ it's a real bargain, and it makes useful measurements. What's not to like ?

I use python and numpy/matplotlib for plotting...

TNT said:
Jitter manifest itself as distorsion and not as a "timing" error.

Also it will fold back HF quantization noise from your sigma delta modulator back into the audio band, among other nasties...

TNT said:
don't get this post. What are you points? Cant you hear any differences? What is your message? That different gear measures differently?

Point 1) Topic is "PLLs and Jitter", so I show you how PLLs process jitter with examples :

- Graph 1: CS8416, as usual with this chip, result is catastrophic, no jitter rejection at all.
- Graphs 2 and 3: WM8805, comparing a good and a bad implementation to show the chip is not a magic bullet but works very well when properly used.

Point 2) Some people gets all mystical and blow lots of hot air about jitter ; there's nothing mystical about it, granted very low amounts of it are expensive to measure, but even a cheap soundcard allows many useful measurements, as I attempted to show. Just play Julian Dunn's JTEST signal and use your favorite software for a FFT.

Point 3) When the DAC clock recovery circuit cleans up jitter properly, then interface, transport, and link jitter are not really relevant. If the clock recovery circuit does not do its job and you hear differences between transports, get another DAC :D

The funny thing is, it's not that hard to do : wolfson receiver and/or ESS DAC and you're already 99% there. The other 1% would be esoteric and expensive stuff like FIFOs and VCXOs and the like. There really is no reason to use compromised gear which will sound worse if you use the optical input, or the wrong digital source, that kind of thing...
 
Disabled Account
Joined 2015
About jitter.
A made a reclocker some time ago. I used a DSP and others to buffer the signal.
In order to get a jitter free oscillator, I made an arrangement with a tuned LC filter.
See my attached picture.

It seems to work very well, but what do you think, guys, about this approach?
 

Attachments

  • jt.png
    jt.png
    7.7 KB · Views: 210
Disabled Account
Joined 2015
Well, I'm only showing the part of the whole thing that's of any interest for this jitter issue. The whole circuit is a bit too complex.

The thing is that LC resonator that is tuned to the main clock ( 24.576Mhz ). Does it do any good? I think so, it acts as some kind of pendulum that , in theory, should reduce jitter from the oscillator. I don't have any means to measure jitter though. But it's a nice idea ;). And it seems to work good enogh since it just nusits in my DAC.

If you are interested in that reclocking circuitry I can show the schematics, but it involves some programming.
 
Disabled Account
Joined 2015
Peufeu, I think it would reduce jitter even if the Q isn't very high. Why shouldn't it?

I don't know how to measure jitter. But you seems to be knowing a bit in this subject. How good is a typical oscillator that one can buy at Mouser or Digikey? The "phase jitter" is reported to be below 25ps or something.
 
Interpretation of datasheets jitter figures is a bit subtle. You have to look at how it is specced (RMS or peak-peak, period or cycle to cycle, etc, look up the definitions) and, most important, you need to know the integration interval. For example a 50 MHz oscillator specced for period jitter over 1000 periods will only tell you about jitter above 50 kHz, ie phase noise 50 kHz away from fundamental, which is a completely useless spec for audio :D

The simplest thing is to measure...

You can divide your clock into a frequency that your soundcard can acquire, and FFT it.

Or you can use a poor man's phase noise analyzer. Take 2 clocks of identical frequency. Most likely, one will be a bit off from the other, say a few hundreds Hz. Combine the outputs using a XOR gate and lowpass it. You get a beat tone equal to the difference in frequency between your two clocks. Lowpass this, acquire it with your soundcard, and FFT it.

You get the attached file. Integration time is the length of time you record, and you get an idea of the phase noise plot by reading the dB at a certain distance from the carrier. It is basically a phase noise plot, but centered on the beat frequency instead of zero Hz.

All in all this will cost you less than $10. It won't give you a calibrated measurement, but the difference between various canned oscillators is visible.
 

Attachments

  • simple_fft_range100_txc_50meg_3v4.png
    simple_fft_range100_txc_50meg_3v4.png
    59.1 KB · Views: 213
Disabled Account
Joined 2015
" The simplest thing is to measure" ( BTW how do you quote, I haven't learned to do that yet )

I think the simplest way is to ask other people. So my very simple and unscientific question is; Are the oscillators you buy at Mouser, etc.. for some three euro good enough for high quality audio purposes?

I can say so far. For 44.1 khz I have a rather good colpitt resonator and for the 96khz part I have a chip oscillator I mentioned above. I cannot say I can hear any difference.

OK, measure. But if I divide the clock and analyze it on my sound card, then the sound card must be of very high quality? Better than what I'm measuring at least.
And if the jitter is randomly arranged, then FFT analysis will be useless, won't it?
 
> Are the oscillators you buy at Mouser, etc.. for some three euro good enough

Well, I built the ghetto phase noise rig to compare $1..$3 oscillators from Mouser. Gotta be coherent, and besides I don't own $$$$ test equipment. And the spread in performance was huge! Winner for 50MHz was Vectron VCC1 canned oscillator, by the way.

> I cannot say I can hear any difference.

Yup, random jitter can sound good, amazingly. It's the data dependent jitter which sounds bad.

> OK, measure. But if I divide the clock and analyze it on my sound card, then
> the sound card must be of very high quality?

If you FFT the output of your DAC you'll get the RMS average of sound card and DAC jitter, so you won't go much lower than your soundcard jitter floor, but if your soundcard has no data-dependent jitter spurs or other artifacts, at least you'll know your DAC doesn't have them either, which is good to know.

The ghetto phase noise rig has one huge advantage, though.

You see, say you take a 22.579MHz clock and divide it by 512 to get 44100 Hz, and acquire this with your soundcard. After division, the jitter value in ps will be the same, because the edges at the output of the divider are aligned with those at the input. However this process measures jitter relative to period, and since after division period is 512 times larger but jitter is the same, this means a factor 512 (54dB) in SNR was lost.

However, transposing the clock by modulating it with another clock, as a RF detector would do, does not divide the jitter. It simply transposes the spectrum down to a band which is much easier to measure. This method measures jitter relative to the HF clock period. Therefore SNR is much better (54dB in this case).

For example, I take two 50MHz clocks. They have a 50 Hz difference, which gives me a beat tone of F=50 Hz. Let's say it drifts by 1 Hz.

The soundcard's clock is also 50ppm. HOWEVER, when measuring a frequency F with your soundcard, the precision you get is 50ppm of F, not 50ppm of the soundcard's master clock, because of division.

See attached picture, where a bunch of junk parts and a cheap soundcard measure two 50 MHz clocks drifting relative to each other with better resolution than 0.1 Hz, ie, something like 0.002 ppm :D

> And if the jitter is randomly arranged, then FFT analysis will be useless, won't it?

Random jitter widens the "skirt" at the base of the peak. The peak also appears flat because the clock drifted a little during the experiment. If it is 50 000 000 Hz at the beginning and 50 000 001 at the end of the test, then the peak will have a flat top 1 Hz wide.

Amusingly, taping a wad of kleenex tissues or cotton balls on top of the oscillators cuts off air currents, therefore temperature drift is lower, which reduces random frequency drift by a huge lot (about 20dBc gain in phase noise at 1 Hz). Comparison attached, as frequency drift. The $2 oscillator is still 20dB worse than a Crystek, but still a good deal !

I'm sure adding the approved green marker would be even better.

Peufeu, I've long observed you to be an solid engineer with creative, yet practical, solution ideas such as this one. :)

Thank you :D
 

Attachments

  • allan_3.000000.png
    allan_3.000000.png
    138.6 KB · Views: 196
Disabled Account
Joined 2015
Fantastic answer!

The thing you said about data dependent jitter being worse is exactly my thoughts, not only when it comes to DAC's and jitter.
You see, the brain processes complex sounds, and I think when it encounters some pattern that is with some regularity, but complex, then it can't resist trying to figure out what the pattern may be, and our attention will be drawn away from the music or whatever we listen to.

Example: 2:nd order dist in tube amps etc.. doesn't bother our brain since it's such a simple pattern and can easily be dismissed as "uninteresting". On the other hand extremely complex patterns - the one we use to call noise - doesn't bother our brain much either.
But the nasty ones are patterns of high order harmonics that are scrambled together in a heavy feedback loop or noise from a digital supply ( which has some sort of detectable pattern )

Well this was a bit of psycho acoustics. I have a lot of ideas in the subject, but I can't prove any of them. But I think this is why Nelsons amps are popular.

When using your method with mixing two sources, isn't it hard to know which source it is that generates the jitter?

I think I will refrain from such measurements. I tend to make mistakes all the time and I will surely draw false conclusions. I would rather ask someone if he can recommend a particular oscillator that is reputed to be jitter free.

You mention Vectron, where can I find those?

Regards
 
You see, the brain processes complex sounds, and I think when it encounters some pattern that is with some regularity, but complex, then it can't resist trying to figure out what the pattern may be, and our attention will be drawn away from the music or whatever we listen to.

If this kind of stuff fascinates you (it does me) you could do a lot worse than pick up Bregman's book 'Auditory Scene Analysis'. Or for a very much 'lite' version, 'This is your brain on music'.
 
Svitjod said:
In order to get a jitter free oscillator, I made an arrangement with a tuned LC filter.
Is this an attempt at humour? Adding an LC filter to the output of an oscillator will do nothing for jitter unless the oscillator is so incredibly bad that you should not have used it anyway.

The thing is that LC resonator that is tuned to the main clock ( 24.576Mhz ). Does it do any good? I think so, it acts as some kind of pendulum that , in theory, should reduce jitter from the oscillator.
No. In theory (and in practice) it will make no difference.

I don't have any means to measure jitter though.
That may explain why you think this idea reduces jitter - you have no way of checking by experiment that your 'theory' is wrong. You could instead check it by reading a textbook on oscillator noise theory.

But it's a nice idea
No it is not. It merely shows that you don't understand oscillators or jitter. That probably means that your 'reclocker' does no good, and may do harm to the signal.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.