Analysis of Hardware Induced Receiver Synchronization Error , Caused by Differences in Manufacturer Specific Transmission Hardware Algorithms

With wireless sensor networks having become a tool of choice for a wide range of measurement and monitoring purposes, precise time synchronization is consequentially gaining prominence. Various protocols and synchronization methods are used to achieve the “sweet spot” amongst the accuracy, synchronization speed, and energy consumption of the network. In this paper, we have evaluated the device and modulation specific packet transmission uncertainty, eliminating all possible protocol related uncertainty sources. We have determined that the transceiver hardware dependent time, taken to transmit and receive the packet, not only depends on the transceiver model, but also highly dependent on the modulation. Moreover, sometimes transmission time distribution does not behave per the standard distribution model and seems to be additionally dependent on the internal processing logic of the device. DOI: http://dx.doi.org/10.5755/j01.eie.23.6.13849


I. INTRODUCTION
Wireless sensor networks (WSN) emerged a decade ago, along with increasing efficiency and popularity of the low power processing units and the low power transmitters.These networks are comprised of individual data gathering devices (nodes) which are spread out in the measurement field and data acquisition devices which are used to collect the data and control the nodes.Each device has its hardware, energy source, and is running on its own time source.Since these devices are usually designed to be as small and as cheap as physically possible, their energy source has an equally small capacity, which can sometimes be extended by energy harvesting [1]- [3].
Limited energy resources and computational capabilities put a hard limit on devices abilities to keep its own time synchronized with other devices.
Metrologically sensitive measurement results need to be traceable and have an accurate timestamp.Since each of these devices uses their timescale, synchronization between the devices needs to be performed to achieve a common timescale.
Synchronization is defined as a process of comparing individual clock of the device with clocks of neighbouring devices or with a device that is designated as a "time server" [4].With the huge growth of popularity of these networks in recent years, researchers have proposed many synchronization protocols such as NTP, PTP, RBS, TDP [5]- [7] to synchronize the devices within the network.The protocols have warring degrees of synchronization accuracy, energy efficiency, and error factors.Some of these factors are determinate, while others, sender induced delay [8] in particular, are random.While this error can be eliminated by using receiver-receiver type synchronization protocols [8], [9], in sender-receiver [8] protocols this error cannot be avoided.
All the protocols are software defined -the packet timing analysis that is presented in the literature is being bound to a specific transceiver on which the protocol was being tested or, sometimes, only mathematical simulations, if the authors do not provide the implementation.The papers fail to mention, that in real life this notion is not always correct.The transceivers themselves act as error sources and their influence on the uncertainty of the timing parameters is different.This input depends not only on the hardware of the transceiver but also on its parameters -in our case, it was the signal modulation.
In this paper, we provide proof that the attempt to determine the nature of the sender induced error and show that they can be evaluated by determining the physical parameters of the transmitter and modulation.
The rest of this paper is organized as follows.The second chapter contains an overview of works of other authors, which are related to this field.In the third chapter, we provide a brief description of the experiment.The fourth chapter presents the experiment results and their analysis.The paper is concluded with the fifth chapter.

II. RELATED WORK
Analysing Wireless Sensor Networks consisting of nodes, using identical hardware, and running similar software stack, synchronization accuracy largely depends on the data protocol.However, additional protocol independent parameters exist that contribute to the overall delay in the wireless data transmission process.
Error source of the transmission of the packet delay is not a singular construct.Its decomposition has been suggested and described Kopetz and Ochsenreitere [10] and later extended in [9] and [11] and [8], and is shown in Fig. 1.Fig. 1.Wireless transmission link delay components according to [8].
Following this approach, the time delay can be separated into three distinct components that are dependent on the hardware of the transceiver the quality of the protocol, the computational power of the controller, etc.
The importance of each component of packet delay varies depending on the synchronization protocol.When several receiving nodes are being synchronized with a single message from the sender, which is known as receiverreceiver synchronization (i.e.Reference Broadcast Protocol [7], time diffusion protocol [5]), it can be assumed that only propagation and receiver uncertainty components are contributing to synchronization delay.According to the study by B Sundararaman et al. [9], except RBS protocol, such (receiver-receiver) synchronization method does not provide exceptional accuracy, above sender-receiver type synchronization algorithms.
In the Flooding Time Synchronization Protocol [6] by M. Maroti et al. estimates magnitude and nature of each construct of packet delay.According to his study, if we know the actual time that network access is started, all further delay parameters are deterministic except for interrupt handling, which can be omitted by recording the precise time "packet received" interrupt signal is given by the transmitter.
F. Ferrari et al, address a different type of uncertainty source -network interference in their paper [12].This uncertainty source is related to the network congestion and is relevant when a lot of nodes simultaneously attempts to transmit their data packets within the same timeslot.
Maggs et al. proposed a consensus clock synchronization protocol which is a subtype of receiver-receiver type of the protocol.In his work, each of the nodes of the network inputs their own correction parameters to the network-time during the synchronization.This allows reaching up to 1 µs synchronization accuracy [13].
In all the above-mentioned works authors compared packet transfer time as a uniform research object, by separating hardware related delay sources from software synchronization and data transfer algorithms and focusing solely on the software part of the said algorithms.Some of these protocols (most prominently [5] and [12]- [14]) use mathematical algorithms on the network scale (networkwide synchronization) to achieve common time within the network without directly using an outside source as a reference.This allows for a partial negation of the hardware induced packet transfer delay uncertainty multiplicative nature between multiple hops, however, the uncertainty source itself remains relevant within a single hop (transceiver-to-transceiver communication).Such protocols can achieve a higher accuracy of synchronization, [13] reporting accuracy as high as 1 µs.
In this paper we present detailed hardware induced delay uncertainty analysis, allowing a qualitative comparison between different transceivers and their data transfer related parameters.According to our knowledge, similar results, directly addressing packet transfer delay because of the hardware properties of the individual transceiver, have not been published at the time of writing of this paper.

III. EXPERIMENT METHOD
Firstly, we declared a hypothesis that synchronization error from the sender has a normal distribution.To check this hypothesis, we set up a network of several devices placed at a similar distance from the sender and without any obstacles that could affect the propagation time.For the purpose of the experiment, and since all the devices were running on the similar hardware, we considered the microcontroller induced error to be constant [8].
To provide a general overview of this error, we performed our tests on two different transmitters using a choice of different signal modulations, provided by the hardware.
The variance of time between the actual transmission of the data packet, and earliest possible notification from the receiver about the arrival of the packet was measured in this experiment.Experiment's outline is provided in Fig. 2. For the transmission delay to include only the required delay sources -transmission delay, reception delay, and propagation delay (Fig. 1), specific hardware triggers were selected for the time measurement.Transmission and reception delays are caused by respectively the sender and the receiver when processing and transmitting or receiving the data packet.Propagation delay is the time span that it takes for the information to traverse the distance between the transceivers.Considering that the experiment was carried out over short distances (sub 20 cm), this delay was considered a constant measure and that did not affect the dispersion of the time delay.Total transmission delay in this model can be expressed as follows , where ts is the sender induced delay and tr is the receiver induced delay.
The experiment was performed under following assumptions:  The hardware triggers were chosen to represent the required time interval as closely as allowed by the hardware.Triggers can vary based on the tested hardware as this choice was dependent on the latest possible confirmation on successful packet transmission and earliest possible confirmation on successful packet arrival (without checking the data packet contents as that can be done later while removing packet length related packet processing variance). The effect of transceiver modulation on the packet transfer time uncertainty might affect the transmission and therefore must be evaluated.
 The packet size is to remain constant throughout the experiment.
 Time is to be measured between the two hardware triggers while recording transmission duration.Other parameters (mean time, standard deviation, skewness, kurtosis) are to be calculated for the measured time sample.
 The propagation time (from Fig. 1) is part of the measured transmission time in the experiment, but due to the short distance between the sender and the receiver, its effect on the uncertainty is considered negligible.Structure of experiment (shown in Fig. 2) is:  The transmitter prepares the data packet and transmits it.Respectively the transmitter sends a notification about the transmission at the latest possible time before transmitting the packet.The notification type depends on the hardware of the device as well as the software flags that were to be tracked.Following software flags that were tracked by the transmitters during the experiment were:  TxReady -the application layer has finished creating the data packet and passed it to the lower layers for the transmission;  TxDone -the lowest network stack layer (PHY layer) has completed the transmission of the data packet.
 The receiver accepts the data packet and generates a signal to the controller.Following software flags were tracked during the experiment: 1. SyncAddress -the address matching (confirming that the packet was intended to be received by the receiver) has been successful; SyncAddr is the possible measurable point for packet arrival in the Semtech transceiver; 2. FIFOFull -the receive buffer of the transceiver is full; 3. TrXDone -the data procedure, including data validation, is complete. The aggregator receives both values and sends them to the data processing software. The transmission time is calculated.Following the assumption that the propagation time is constant, as the device position remains constant throughout the experiment, the transmission time error is related to the hardware peculiarities of the transceivers.Rigol DS2072A digital oscilloscope controlled by a Matlab was used for data processing.
Two different transceivers with no less than 2 modulations each were tested: SM1231 multi-band transceiver and AT86RF212 Zigbee 868/915 MHz transceiver.All the measurements were performed with transceivers set at 868 MHz.
Kurtosis [15] (2), skewness (3), and dispersion were used to evaluate the probability distribution of the data packet arrival time uncertainty.
Kurtosis is a dimensionless coefficient denoting whether the distribution is peaked or flat compared to the normal distribution.That is, data sets with high kurtosis tend to have a distinct peak near the mean, decline rather rapidly, and have heavy tails.Data sets with low kurtosis tend to have a flat top near the mean rather than a sharp peak.A uniform distribution would be the extreme case.[16] 4 4 , where 4  is the fourth moment about the mean and  is the standard deviation.
It is well known that, amongst others, the standard distribution has a beta value of 3 0,

   
This means that a curve with negative kurtosis has a steeper slope than the standard distribution, which peaks at Kurtosis value of 1.2, representing the uniform distribution.
Skewness (2), on the other hand, is a dimensionless parameter denoting the presence or lack of symmetry in the distribution.A perfectly symmetrical distribution has skewness value of 0 while negative skewness indicates a shift to the left, while positive -a shift to the right where 3  is the third moment about the mean and  is the standard deviation.We assume, that by limiting experiment to parameters as close as possible to each other in the transmission process, we can limit the uncertainty sources to two -ADC and DAC that are used to transmit and receive the data packets.It was decided that due to the nature of wireless data transmission these two sources can be treated as a single uncertainty source -hardware induced data packet transfer time combined standard uncertainty is evaluated using (4) provided in the GUM Guide for evaluation of measurement data [17] , where n is the number of the transferred data packets (sample size).Consequently, hardware induced data packet transfer time expanded uncertainty is evaluated using (5) , where u is the standard uncertainty and kp is the coverage factor, selected by the distribution shape and confidence level.
For our result analysis, we chose to use 95 % confidence level, with k = 2 for standard and complex distributions and k = 1.71 for rectangular distribution.

IV. EXPERIMENTAL RESULTS AND ANALYSIS
Semtech Sm1231 is a wireless transceiver operating in 868 MHz and 915 MHz bands.It has been chosen for this experiment as a potential transceiver to use in a wide scale ultrasound monitoring system that our wireless sensor network was being developed for.
We have used Semtech Sm1231 development kits with provided software and set them to transmit ten 2 byte size data packets per second.The software had limited us from singling out specific uncertainty source, meaning that both, the transmitter and the receiver, errors were included in the data.
The transceiver was tested on two available modulations: OOK (On-Off Keying) and FAS.
Packet arrival time distribution for OOK modulation for Semtech transceiver is shown in Fig. 3.It is apparent that while the distribution represents the Gaussian distribution, it is slightly skewed.We think that this is due to the two error sources overlapping each other despite having different symmetry axes.The kurtosis and skewness values for Sm1231 are shown in Table I.
The first thing to note is that in Semtech transceiver's case the modulation did not have any effect on the mean arrival time (Table II).The time difference between SyncAddr and FIFOFull timing sources appears because the former sends a signal after performing address processing on the packet header, and the latter after fully receiving the data packet.
As we can see from the data in Table I, kurtosis values are staying within the uniform distribution value range.However, TXReady/Fifo full timing sources are showing relatively stable data kurtosis while SyncAddress timing source kurtosis fluctuates significantly.The fluctuation means that although the FIFOFull timing source has additional uncertainty sources, the transceiver can maintain the accuracy even when performing basic software received packet processing routines.The SyncAddress fluctuations can be explained by the fact that this interrupt flag is raised after performing address matching.The address matching is a procedure to check the sender and receiver addresses in the received packet, and comparing them to the appropriate information in the receiving device.This flag is raised only if the received packet is permitted to be accepted by the device and if the address of the device, that received the packet, matches the address of the device that the packet was sent to.The uncertainty sources are likely to be linked to the described packet processing algorithm that evaluates whether the receiving device is authorized and capable of processing the received packet.It is, however, impossible to accurately pinpoint these sources without in-depth knowledge of the software within the transceiver.Another interesting feature of Table I data is the skewness parameter.Big negative skewness reflects that distribution is heavily shifted towards the negative side of the axis.
One of the more unusual distributions with high skewness value is shown in Fig. 4. It is evident that while the distribution can be said to approach standard distribution, it can also be attributed to a triangle distribution due to the data having more than one highly expressed local maximum.It can be concluded, that using FIFOFull as the timing source on the receiving end, we are dealing with more uncertainty sources from within the internal hardware than when using SyncAddr as the timing source.
The actual algorithm of the transceiver chip is unknown, but judging by the lack of any other distinct maximums this can be attributed to a periodic process possibly originating from but not limited to free channel confirmation or retry of the data transmission.To conclude, in order to accurately measure wireless data transfer uncertainty, device-specific behavior has to be analysed in order to discern the specific variance that is applicable to the hardware level operations of the wireless data link and is dependent on the type of timing source that is used to measure the packet arrival time.
Secondly, AT86RF212 transceiver was tested.This transceiver was part of the wireless sensor network node ZBM-2 that was developed in the Measurement Technologies Laboratory of the Kaunas University of Technology.This transceiver operates on the same central frequency and is similar in other features (that are outside of the scope of this paper) to the Semtech module.
Data packet length and center frequency remained the same as for the Semtech module -2 byte data packets transmitted at a rate of 10 packets per second on the 868 MHz frequency.Since this device uses a different set of modulations, direct performance comparison between similar modulations could not be done, but this question is not necessary for the scope of this paper.
The ZBM-2 (AT86RF212) device uses OQPSK (Sin and RC Phase shift OQPSK modulations were tested) and BPSK modulations.Transceiver's distribution parameters are presented in Table III and packet transmission time estimations in Table IV.Both, Sine, and RC Phase shift OQPSK, modulation time arrival distributions, shown in Fig. 5, exhibited a rectangular shape with similar standard deviation and uncertainty values.It is apparent from the distributions that the modulation algorithm follows a similar set of rules for its subtypes in regards to the transmission accuracy.
The distributions share a standard deviation value of 0.3 microseconds.This is noticeably different from the same parameter for the Semtech transceiver (0.6 microseconds-0.7 microseconds).However, due to the nature of the timing sources of this transceiver, we were only measuring timing between the moment that the data packet transmission was finished at the transmitter and the moment that the packet was received at the receiver (the latter can be loosely compared to the SyncAddress timing source at the Semtech module).Kurtosis and skewness parameters for these distributions did not show any noticeable irregularities.The kurtosis of both distributions were very close to the ideal kurtosis values for the rectangular distribution and the distributions' skewness parameter fluctuations were negligible.We must notice, that the HDTU for the AT86 transceiver Zigbee transceiver were low and equal to 1 % of the single hop packet transmission uncertainty for the widely acclaimed accuracy oriented wireless sensor network synchronization protocols.Lastly, BPSK modulation was tested (Fig. 6).The variance of the data was worse than for the OQPSK modulation and was comparable to the performance of Semtech module.
Moreover, in this case, it seems that the entire process has three distinct distributions.In can be hypothesized that the shape of this distribution is related to the internal logic loops of the transceiver, with deterministic processes controlling the transmission procedure.
This process is likely to be related to the transceiver processes that are performed before sending the data packet, although it is unknown why this is only evident in this modulation.
This shows that even changing a modulation of the device can affect the accuracy of the data packet transfer time, and through it -the synchronization accuracy.The OQPSK modulation on A86RF212 performs much more accurately than the Semtech module.Comparing the timing results with the first module (BPSK modulation), it is not that different from the Semtech module winning only in terms of better skewness of the arrival time distribution.However, the actual shape of the distribution denotes that the internal workings of the transceiver are clearly different from the Semtech counterpart.

V. CONCLUSIONS
The transmission and reception processes significantly contribute to the uncertainty of the packet delay within the synchronization accuracy oriented wireless sensor network protocols.Usually evaluated along with other uncertainty sources, in this paper, the transmission-reception delay was separated and measured apart from the other uncertainty sources.
The data packet transmission time uncertainty that is related to the physical transmission of the data packet was evaluated on two devices.It was shown that this delay is related to the specific modulation and the hardware of the transceiver.
Modulation and hardware were proved to influence the distribution of the data packet transfer time.For the two analysed transceivers, the shape of the packet arrival time distribution ranged from standard to uniform and complex distributions.
The AT86 transceiver, depending on the modulation, was shown to have significantly different timing parameters.
In the tested transceivers, the uncertainty due to the transceiver hardware was calculated to range from 0.0106 µs to 0.0280 µs.
We proposed a hypothesis that two main operands -ADC and DAC -of the transmission system influence the skewness of the curves, while the algorithm that controls the DAC is responsible for forms of the distributions.
The different distributions and uncertainties in just two tested devices clearly show that it is not possible to create a uniform model covering all the transceivers so this parameter should be measured for every distinct transceiver model.
In the future, it might be useful to evaluate the transceiver families, looking for the patterns that would allow a partial generalization of the hardware induced data packet transmission uncertainty.

Fig. 3 .
Fig. 3. Data packet arrival delay distribution for Semtech transceiver using OOK modulation.Time delay measured between TxReady and SyncAddr interrupts.

Fig. 4 .
Fig. 4. Data packet arrival delay distribution for Semtech transceiver using FAS modulation.Time delay measured between TxReady and FIFOFull interrupts.

Fig. 6 .
Fig. 6.Data packet arrival delay distribution for Zigbee transceiver using BPSK modulation.Time delay measured between TrX-Done interrupts.

TABLE I .
MEASUREMENT SAMPLE SIZE AND DISTRIBUTION PARAMETERS FOR DIFFERENT MODULATIONS AND TIMINGSOURCES FOR SEMTECH TRANSCEIVER.

TABLE III .
MEASUREMENT SAMPLE SIZE AND DISTRIBUTION PARAMETERS FOR DIFFERENT MODULATIONS AND TIMINGSOURCES FOR ZBM-2 TRANSCEIVER.

TABLE IV .
PACKET TRANSMISSION TIME UNCERTAINTY FOR DIFFERENT MODULATIONS AND TIMING SOURCES FOR ZBM-2 TRANSCEIVER.