31 July 2015

Using SA to measure and fix sound card digitizer errors

(by Angazu)
All sound cards and A/D converters have some clock error. This is especially true if converters are commercial and cheap ones, like PC sound cards and similar. Professional and expensive converters exhibit a much better clock stability and jitter. To correct this error, one must know nominal parameters of the signal under test. If these parameters are known, it is quite easy to correct digitizing clock error using SA.
 
Information for this doc was obtained from:
Unfortunately, Baudline has no windows version, but the web contents can be useful for the reader.

The SA method of  “Correction of BR” is quite good for this job, but perhaps using resampler as data input is a better procedure.
The correction factor will have to be measured for any digitizing speed and mode. Bear in mind that for cheap cards, the speed can vary due to various factors, so if high precission measurements are required, a new calculus should be carried out. For a good measurement, a quite big signal is needed.
This method is useful for PSK,FSK,MFSK and other modulations. To use it with OFDM, some more operations should be carried out using SA. Ideally, an external signal like GPS 1000 Hz or a signal from a high end signal generator will provide the best results. Also, a radio timing signal should be good enough.
The best way to understand the subject are examples. 

A well known signal as Stanag-4285 (sampled at 8000 sps) will be used to show the method.
We know 4285 has a nominal speed of 2400 sps. Since a frame is 256 symbols, the frame time must be 106,666666 mS. This is the value that should be obtained if using the VMW feature of SA when signal structure is perfectly vertical. As we can see, the measured value is 106,69241


Correction factor = measured value/nominal value = 106.69241/106.66666= 1.000241
Error PPM = (correction factor-1)* 1000000 = (1.000241-1)*1000000=  241 PPM.
Real Digitizing speed = 8000*1.000241 =  8001.931
Real modulation speed (Br) = 2400/1.000241 =  2399.421739
Measured SA Br = 2399.41

Now, lets go to correct the signal using calculated BR in SA.


The signal parameters are almost perfect, so we can save the corrected signal and after this procedure, we can be quite sure the new signal will be demodulated using any comercial demodulator.
Also, we know the correction factor for the used card in that speed.
In this sample, error is quite small and no problem for demodulators, but bear in mind that error can be very  big. I measured errors of more than 100 samples in an 8000 nominal sample rate. That means that demodulators will fail to demodulate the signal and even analysis will be quite complicated and erroneous
.

The MIL-STD 188-110 App.B is a well known OFDM waveform: baudrate 44.44, channel separation 56.25 Hz, 39 tones + I pilot, correlation triangle (k) = 17/64 and modulation "pi/4 DQPSK" in all channels. The analysed sample, although it exibiths the expected 39 +1 tones, is not protocol compliant for what concern baudrate, separation and K (and OFDM parameters too)


The measured clock is 44.48 Hz and according to this article  the signals has a native sample rate of multiple of 3600 Hz.
As said above, go on fixing the baudrate and re-sampling to the correct frequency (7200 Hz in this case)



Although the absolute constellation is not stable, all the mentioned parameters are now correct and the fixed sample can be saved and published.

No comments:

Post a Comment