Offset and Skew Estimation for Clock Synchronization in Molecular Communication Systems

Nanonetwork is a promising research field. It is composed of a number of nanoscale devices and is envisioned to apply to many potential applications. Clock synchronization is essential to establish a distributed cooperation among the nano-devices. This paper investigates the clock synchronization issue for the molecular communication system in the presence of Gaussian distributed propagation delay. A two-way message exchange mechanism is proposed. The closed-form expressions of maximum likelihood estimators for the clock offset and the clock skew are derived. Simulation results further demonstrate the effectiveness of the proposed estimators. This work lays a foundation for the complex cooperation of nanomachines in the nanonetworks.


INTRODUCTION
Nanonetwork is a promising research field, which attracts the attentions from researchers of nanotechnology, biology and electrical engineering [1].The nanonetwork is composed of many nanoscale devices named nanomachine.These nanomachines exchange information by molecular communication, which is a novel bio-inspired communication technology.The molecular communication and the nanonetworks have a broad range of prospective applications in the fields of biomedical engineering, industrial manufacturing, biology research, etc. [2].For example, molecular communication system can be used for analyzing and designing the drug delivery systems in the human body [3]; the nanonetworks can be included in advanced materials to get new functionalities [4]; macroscale molecular communication can be used as a tool for studying animal behaviors [5].
Similar to other communication systems and networks, these applications of nano communications and nanonetworks require highly precise clock synchronization.For example, the engineered nanomachines need a common clock so that they can release the anti-body molecules at the same time to destroy tumors in the human body.In the data gathering application, clock synchronization is the basis for interpreting the sensed data.However, because the molecular communication is quite different from traditional wired or wireless networks, the traditional clock synchronization methods can not directly applied to the area of nanonetworks.Suitable clock synchronization techniques for nanonetworks are highly demanded.
In most research works it is always assumed that the clocks among the nanomachines are perfectly synchronized.The concept of the clock of the nanomachine has been mentioned in [6].A molecular phase locked loop (PLL) has been proposed in [7] for regulating the clock.In [8] and [9], the authors have used a bacterial quorum sensing mechanism to synchronize clock among nanomachines in the nanonetworks.Molecules, called the inducer, are released by one nanomachine, and trigger another nanomachine to release the same kind molecules.When the concentration of the inducer particles in the environment reaches a certain threshold at a moment, the entire nanonetwork can achieve the clock synchronization.In [10] and [11], the clock synchronization has been realized by the inhibitory molecules.These molecules are released by one nanomachine, and inhibit the release of similar molecules from another nanomachine in the nanonetworks.When the concentration of molecules falls below a certain threshold, those molecules can be released again.The release pulse of the inhibitory molecules is called the clock synchronization pattern among the nanomachines.The abovementioned works try to synchronize the oscillation period rather than align the time.It is crucial and indispensable for the nanomachines to synchronize the clock in various applications over the nanonetworks.The way to synchronize the clock is of great concern.In [12], the authors have proposed a blind algorithm for the synchronization using non-decision directed maximum likelihood.The clock sequence is calculated by the receiver based on the analysis of the molecular channel delay.However, the authors have designed sampling sequences of the receiver without further discussion on how to synchronize the time between the transmitter and the receiver.
In this paper, we deal with the clock synchronization issue from a statistical perspective.A two-way message exchange model is proposed for the clock synchronization.The random propagation delay for message exchange between the nanomachines is assumed to follow a Gaussian distribution.This assumption is different from the previous research work [13][14][15][16], in which the propagation delay of the molecules from the transmitter to the receiver is assumed to follow the inverse Gaussian distribution.It should be noted that the inverse Gaussian distribution is suitable for the molecular channel with a directional flow [5].In this paper we assume that the information molecules propagate in a free diffusive channel.There is no drift in the channel.Therefore, the Gaussian distributed propagation delay is appropriate.Maximum-likelihood estimators of the clock offset and the clock skew between the nanomachines are derived.To the best of our knowledge, this is the first work of jointly estimating the clock offset and clock skew for a diffusion-based molecular communication system and network.The simulation results validate the effectiveness of the proposed estimators.This work paves the way for the future applications of the distributed cooperation of nanomachines.
The rest of the paper is organized as follows.Section 2 introduces the system model.The clock offset and the clock skew are derived by using maximum likelihood estimation in Section 3. Section 4 gives the simulation results.Finally, Section 5 concludes the paper.

SYSTEM MODEL
In the scenario, there are two nanomachines in the medium.They communicate with each other by transmitting and receiving the information molecules.As mentioned in [6], molecular communication can also be developed in a layered architecture.Clock synchronization issue should be at some layer above the molecular physical layer, which means the discussion of the clock synchronization hides the issues such as modulation techniques in the physical layer.But it should be assured that each molecule can carry multiple information bits, such as in the n-ary IMoSK modulation technique proposed in [17].By this way the clock information of each nanomachine can be encoded into the information molecules.The encoded molecules propagate randomly to the receiver nanomachine by the Brownian motion [18].The receiver nanomachine senses and receives the information molecules and decodes them.
The nanomachines adopt similar component design analogue to electrical systems such as molecular phase locked loop (PLL) and molecular oscillators [7], so for each nanomachine, we can define the clock model as in (1).  () is the clock reading at time t.  is named clock skew and β i is named clock offset.
In the ideal situation,   is equal to 1 and   is equal to 0. However, the environmental condition such as temperature may cause the clocks of the nanomachines drift and inconsistent with each other [19].So every individual nanomachine has its own clock.The objective of the clock synchronization is to find the relative clock offset and clock skew between the nanomachines and compensate them to achieve clock synchronization.The relative offset  0 is defined as the difference of the offset values between the two nanomachines as in (2).The relative skew  0 is defined as the ratio of the skew values between the two nanomachines as in (3).
Nanomachines exchange information through molecular communication.Since the information molecules need a period of time to propagate from the transmitter to the receiver, the propagation delay compensation is necessary.A two-way message exchange mechanism is proposed for the clock synchronization solution.Figure 1 where  0 presents the relative clock offset of node B with respect to node A.  0 presents the relative clock skew of node B with respect to node A.   and   are the random propagation delays from node A to node B and from node B to node A, respectively.
The molecular diffusion from one nanomachine to another is a Brownian motion.We model   and   as independent and identical distributed (i.i.d.) Gaussian random variables with mean  and variance  2 [20].The probability density function can be expressed as For the system model in ( 4) and ( 5), { 1, ,  2, ,

MAXIMUM LIKELIHOOD ESTIMATOR
In this section, we propose an approach using maximum likelihood estimation (MLE) to estimate the relative clock offset  0 and the relative clock skew  0 .
In ( 4) and ( 5),   and   are i.i.d.Gaussian random variables with mean  and variance  2 .To derive the MLE, we rewrite ( 4) and (5) as The probability density functions of {  ,   } =1  are denoted as {(  ), (  )} =1  .The expression of (  ) or (  ) is the same as (6).Different from the mostly used likelihood function for { 1, ,  2, ,  3, ,  4, } =1  , which is normally given by ∏ (  )(  )  =1 , a new random variable,   , is constructed by This constructed random variable removes the unknown  , therefore the work of the estimation of  0 and  0 becomes easier.Because   and   are i.i.d.Gaussian random variables with mean  and variance  2 , according to the properties of normal distribution,   is normally distributed, with zero mean and variance   2 = 2 2 .The log-likelihood function of  0 and  0 can be expressed as =1 (10) where (  ) is the probability of the observed outcomes of   .In order to find the maximum likelihood estimate of  0 and  0 , we take the partial derivative of the log-likelihood function with respect of  0 and  0 , respectively as ℒ( 0 , 0 ) Since ( 11) and ( 12) are quite complex, we make the following notations. = ∑ (  (13) Set the partial derivatives in (11) and (12) to zero.We have This is a quadratic equation set with two variables  0 and  0 .The solution of this equation set can be obtained as Using the observed time-stamps by two-way message exchange, we can obtain the estimates of  0 and  0 .

SIMULATION RESULTS AND DISCUSSIONS
In this section, simulations in MATLAB are conducted to evaluate the proposed maximum-likelihood estimator for the clock offset and the clock skew.The performance of the estimators with respect to the number of iterations, the distance between nanomachines, diffusion coefficient, etc. will be presented and discussed.
The variance is chosen from 0.01-10.Assume that at each integral time instant, the transmitter nanomachine sends a timing-request command to the receiver nanomachine.The processing time between the reception of the timing-request command and the time instant of sending reply message is set to 100 to 500 μs.The initial clock offset in the simulation is set to 1 μs to 10 μs.The initial clock skew in the simulation is set to 1.05 to 1.20.Table 1 summarizes the simulation parameters.

Parameters Values
Average delay 5-50 (μs) Variance of random delay 0.01-10 Launch time-stamp (T 1,i ) 1 s, 2 s, 3 s, … Processing time (T 3,i -T 2,i ) 100-500 (μs) Pre-defined clock offset 1-10 (μs) Pre-defined clock skew 1.05-1.20 We do not simulate the physical layer behavior.The simulator starts from randomly generating the random variables of the    Figure 5 shows the relationship between the MSE of the estimated clock skew and the number of rounds for different pre-defined clock skew  0 .As the increase of the number of synchronization rounds, the MSEs of the estimated clock skew decreases.The result illustrates the effectiveness of our proposed estimation algorithm.From the figure, it can also be noted that the bigger the pre-defined clock skew is, the larger the MSE of the estimated clock offset is.The reason is that bigger clock skew leads to larger    clock difference between the nanomachines.Therefore the estimation accuracy will become worse.
Figure 6 shows the relationship of the MSE of the estimated clock skew and the number of iterations for different parameter pairs {, }.The MSE of the estimated clock skew decreases as the increase of the number of rounds of message exchanges for all the different parameters {, } .It proves the effectiveness of our proposed estimator.From the figure it can also be seen that if  is fixed and  varies, the bigger  leads to bigger MSE.While if  is fixed and  varies, the MSE of the estimated clock skew keeps the same.The results demonstrate that the average delay itself does not influence the accuracy of the proposed estimator, while the variance of the propagation delay affects the accuracy.

CONCLUSION
In this paper, we address the issue of clock synchronization between nanomachines.A two-way based synchronization method has been proposed.The joint maximum likelihood estimators for the clock offset and the clock skew between nanomachines have been presented.The simulation results have demonstrated the effectiveness of the proposed scheme.The work presented in this paper is a very important step towards the distributed cooperation among various nanomachines in the nanonetworks.Our future work would focus on the development of the techniques to support the clock synchronization among a number of nanomachines in the nanonetworks.

4 )
illustrates the working principle of the mechanism.By a number of message exchanges, node A estimates the relative clock skew and clock offset and synchronized with node B. Take the i th round of message exchange as an example.Node A sends molecules encoded with a clock synchronization request message.At the same time it records the timing on its own clock as  1, .Node B records its time  2, at the reception of the molecules of the message, and replies node A at  3, .The replied message contains the timestamps  2, and  3, .Then, node A records the reception time of node B's reply as  4, . 1, and  4, are the time stamps recorded by the clock of node A, while  2, and  3, are recorded by that of node B. After N rounds of message exchanges, node A obtains a set of time stamps { 1, ,  2, ,  3, ,  4, } =1  .The relationship among these recorded time stamps can be modeled as  2, = ( 1, +   ) ×  0 +  0 ( 3, = ( 4, −   ) ×  0 +  0

Figure 1 .
Figure 1.Two-way message exchange mechanism for diffusion-based clock synchronization.

Figure 2 .
Figure 2. The MSE of the estimated clock offset vs. the number of rounds for different pre-defined   .

Figure 2
Figure2shows the relationship between the MSE of the estimated clock offset and the number of rounds for different pre-defined  0 .It can be seen from the figure that as the number of synchronization rounds increases, the MSE of the estimated clock offset decreases.This result shows the effectiveness of our proposed estimation algorithm.In the figure, the MSEs of the estimated clock offset for three different initial clock offset values, 5 μs, 10 μs and 20 μs, are presented.The result implies that the initial clock offset has little effect on the clock synchronization accuracy by the proposed algorithm.

Figure 3
Figure3describes the relationship between the MSE of the estimated clock offset and the number of the synchronization rounds for different initial clock skew  0 .For all the pre-defined clock skew  0 , the MSEs of the estimated clock offset decrease with respect to the number of rounds of the message exchanges.This simulation results demonstrate that our proposed algorithm is effective.It is also obvious that as the increase of the initial clock skew { 0 = 1.01,  0 = 1.10,  0 = 1.20} , the MSE of the

Figure 4
Figure 4 presents the MSE of the estimated clock offset versus N for different {, }.Here  and  denote the average delay and the standard deviation of the Gaussian distributed molecular propagation delay.Similar to Figure 2 and Figure 3, the MSE of the estimated clock offset decreases as the increase of the number of rounds for all the different parameters {, }.It proves the effectiveness of our proposed estimation algorithm.From the figure, if the average delay is fixed, the larger standard deviation is, the larger the MSE of the estimated clock offset is.It means that the more random the molecular propagation delay is, the worse the clock synchronization accuracy achieves.For the curves of { = 20,  = 5}, { = 30,  = 5} and { = 50,  = 5}, it is obvious that different average propagation delays only do not affect the MSEs of the estimated clock offset.

Figure 3 .Figure 5 .
Figure 3.The MSE of the estimated clock offset vs. the number of rounds for different   .

Figure 4 .
Figure 4.The MSE of the estimated clock offset vs. the number of rounds for different {, }.

Figure 6 .
Figure 6.The MSE of the estimated clock skew vs. the number of rounds for different {, }.