Monday, May 5, 2014

Fun with XBees and Jitter 1 of 4: Theory


I was thinking about taking a closer look at what phase noise is but then we got side tracked on making a really interesting and convoluted way to measure a signal. In case you are wondering who 'we' is. It is me and the frog in my pocket; Jitter is his name. He is a Tylers' Tree Frog   


First let's look at the signal we want to measure. Very generally it is this signal:
\[m(t)=g\left(T(t)+h(t)+\tau (t)\right)+\epsilon (t)\]

but that is a bit to general for this post. So more specifically it is this signal:
\[m(t)=sin\left(2\pi fF_s)\]

Jitter, the frog, reminded me that this is only a model and there are many different types of noise we will be measuring as well. Because of this it is a good idea to expand the model to account for these different types of noise \[m(t)=(V_o(t)+\epsilon (t))*sin\left(2\pi fF_s+\phi (t))\]

I used this reference for the equation above:
J. Rutman and F. L. Walls, "Characterization of Frequency Stability in Precision Frequency Sources," Proceedings of the IEEE, vol. 79, no. 6, pp. 952-960, 1991.

Now we are going to take one of these signals at 10 Hz and send it to 3 ADC inputs on 2 XBee Transceivers.  To do this we need to know a bit about the XBee ADC qualitiesBut here is an overview:


XBee Sample rate

the maximum sample rate that can be achieved while using one A/D is 1 sample/ms or 1KHz. The sample rate can be set with the ATIR command and is set in units of ms, so ATIR=0xA is a sample rate of 10ms or 100Hz.
XBee uses a 10bit A/D converter each sample uses two bytes. 

Here are some graphs of what this looks like in theory, using the maximum sample rate.
Figure 1: Above are 4 plots describing the model of the signal the XBee will transmit to my computer.  The two graphs on the left the ideal input of the signal. The two graphs on the right are more closely matched to what I expect to be the actual plots. The top two plots are the analog input signals and the bottom two plots are the result of the quantization from the 10-bit ADC converter on board the XBee.

The time domain signals are interesting but there is more to be revealed about these signals. This information is contained in the frequency domain.The general equation to transform the signals from time domain to frequency domain is:
\[F\left(k\right)=\ {\mathcal F}\left[m\left(t\right)\right]\left(k\right) =\ \int^{\infty }_{-\infty }{\left(g\left(T\left(t\right)+h\left(t\right)+\tau\left(t\right)\right)+\epsilon\left(t\right)\right)e^{-2\pi kt}dt\]
The specific case is:

\[=\ }\int^{\infty }_{-\infty }{\left({(V}_o\left(t\right)+\epsilon(t)){\sin \left(2\pi fF_s+\phi(t)\right)\ }\right)e^{-2\pi kt}dt\]


These equations can be represented visually as shown below.
Figure 2: Above are 4 plots describing the single sided spectrum model of the signal the XBee will transmit to my computer.  The two graphs on the left show the ideal input for single sided spectrum of the signal. The two graphs on the right are more closely matched to what I expect to be the actual plots of the fourier transform. The top two plots are the analog input signals and the bottom two plots are the result of the quantization from the 10-bit ADC converter on board the XBee.


Figure 3: Above are 4 plots describing the phase model of the signal the XBee will transmit to my computer.  The two graphs on the left the ideal input of the signal phase. The two graphs on the right are more closely matched to what I expect to be the actual plots of the signal phase. The top two plots are the analog input signals and the bottom two plots are the result of the quantization from the 10-bit ADC converter on board the XBee.

No comments:

Post a Comment