#### Abstract

Motivated by the importance of the clock synchronization in wireless sensor networks (WSNs), due to the packet loss, the synchronization error variance is a random variable and may exceed the designed boundary of the synchronization variance. Based on the clock synchronization state space model, this paper establishes the model of synchronization error variance analysis and design issues. In the analysis issue, assuming sensor nodes exchange clock information in the network with packet loss, we find a minimum clock information packet arrival rate in order to guarantee the synchronization precision at synchronization node. In the design issue, assuming sensor node freely schedules whether to send the clock information, we look for an optimal clock information exchange rate between synchronization node and reference node which offers the optimal tradeoff between energy consumption and synchronization precision at synchronization node. Finally, simulations further verify the validity of clock synchronization analysis and design from the perspective of synchronization error variance.

#### 1. Introduction

From the present study [1], the purpose of establishing various models of the clock synchronization is to design a more optimized synchronization algorithm and improve the synchronization precision. For the analysis of synchronization precision, the studies focus on estimating the clock parameters; at the same time, deeply analyzing the synchronization error variance is also worthy of attention. For the network without packet loss, existing studies offered the quantitative equation of the synchronization error variance, which can be determined offline. Various optimized synchronization algorithms are aimed at decreasing the synchronization error variance as far as possible. However, due to the randomness of packet loss, the synchronization error variance is a random variable [2]. For given applications, the variance maybe exceeds the designed boundary of the synchronization variance. This brings serious hidden peril for wireless sensor networks.

Therefore, this paper researches clock synchronization problems from the point of the synchronization error variance. How does packet loss affect the synchronization error variance? Can packet loss in the existing network satisfy the requirements of the synchronization precision? How to reasonably improve synchronization precision with a limited resource? It is the following cases that are common but not efficiently solved in reality.

For a wireless sensor network with packet loss, packet loss has a serious influence on clock parameters estimation of the synchronization node. The more the packet is lost, the larger the estimation error of clock parameters is and the lower the clock synchronization precision is. And due to the randomness of packet loss, the synchronization error variance is a random variable. Further, different sensor networks have different requirements of synchronization precision according to the different application backgrounds. So can packet loss in the existing network satisfy the requirements of application background? For the synchronization error variance analysis issue, we look for a minimum clock information packet arrival rate in order to guarantee the precision requirement at synchronization node.

Assume there is no packet loss in sensor network but the sensor node freely schedules whether to send the clock information. The more the clock information is exchanged, the higher the synchronization precision is, while the more the corresponding energy is consumed. We expect that the sensor nodes can consume as little energy as possible. At the same time, we hope that the clock synchronization is as highly precise as possible. At this point, it is important to consider how to set up network parameters in order to achieve the optimal tradeoff between energy consumption and synchronization precision. For the synchronization error variance design issue, we look for an optimal clock information exchange rate between synchronization node and reference node, which offers the optimal tradeoff between energy consumption and synchronization precision at synchronization node.

For the issue of clock synchronization, early studies focus on the design of protocols, such as the Time Synchronization Protocol for Sensor Networks (TPSN) [3], the Reference-Broadcast Synchronization (RBS) [4], the Flooding Time Synchronization Protocol (FTSP) [5], and the Pairwise Broadcast Synchronization (PBS) [6]. Other researches optimize the classical protocols, such as [7–9]. In [1], clock synchronization of WSNs is modeled and analyzed by following a signal processing viewpoint in various network delay distributions. At present, the latest research proposes a distributed algorithm, which is scalable with network size. Reference [10] models the accumulated clock offset and skew as the evolution model and proposes a distributed Kalman filter algorithm. The algorithm only requires each node to exchange limited information with its direct neighbors and thus is robust to changes in network connectivity. Reference [11] estimates clock parameters of the global network from the perspective of probability distribution based on belief propagation and puts forward a full distributed algorithm which adopts asynchronous way and does not require any centralized information processing or coordination. In addition, [12] introduces two kinds of control strategy based on the state space model of the clock synchronization. From the perspective of network control, the literature improves the synchronization precision and speeds up the convergence of the synchronization. But these studies rarely analyze the random distribution of the synchronization error variance, let alone the analysis and design issues of the synchronization error variance beyond the designed boundary of the synchronization variance (or the probability of the synchronization error variance beyond the designed boundary of the synchronization variance). In order to solve, analyze, and design issues put forward above, this paper analyzes the clock relationship based on the two-way information exchange mechanism between the nodes in WSNs. Then regarding fixed delay and clock offset as unknown parameters and using the clock synchronization state space model, the paper establishes the model of synchronization error variance analysis and design issues.

The existing literatures of network control theory have carried on a large number of early-stage studies of network control theory model which proved to be effective. References [13, 14] introduce problems of the state estimation and stabilization of a LTI (linear time invariant) system with finite-communication bandwidth constraints. Reference [2] shows that there exists a critical rate of packet arrivals below which the modified Kalman filter diverges and converges otherwise. Reference [15] evaluates the performance of the estimator subject to packet loss from the perspective of probability. Reference [16] considers the presence of observation packet loss and shows the error variance of the minimum mean square error of estimate is less than that of the linear minimum mean square error estimation and the former has wider application. In [17], author describes packet loss as two-state Markov chain process and analyzes the problems of Kalman filter in this case. Reference [18] improves the statistical stability and performance of Kalman filter over a large set of packet loss using multiple description coding. Reference [19] extends the theoretical results in [2] to closed loop control and points out that when the separation principle holds, the optimal linear-quadratic-Gaussian (LQG) controller is a linear function of the estimated state; when the separation principle does not hold, the optimal LQG controller is in general nonlinear. These theoretical achievements offer great reference value for analyzing the clock synchronization issue. In view of this, based on the unified framework of the clock synchronization state space model, this paper researches the synchronization error variance analysis and design issues from the perspective of the unified framework of network control.

In this paper, the major contributions are as follows.(1)By analyzing the clock relationship for the two-way information exchange mechanism in wireless sensor network and based on a unified framework of the clock synchronization state space model, we discuss the analysis and design issues between the synchronization error variance and packet loss rate.(2)In the analysis issue, we prove that the steady-state error variance of Kalman filter in the statistical property is a monotonically decreasing function of packet arrival rate. Then we find a minimum clock information packet arrival rate by an efficient bisection search algorithm in order to guarantee synchronization precision at synchronization node.(3)In the design issue, we establish a performance metric between energy consumption and synchronization precision at synchronization node. Then we obtain the optimal solution form of clock information exchange rate in order to achieve the optimal tradeoff between energy consumption and synchronization precision at synchronization node.

This paper is organized as follows. In Section 2, regarding fixed delay and clock offset as clock state variables, clock synchronization system models are established. Section 3 puts forward mathematical model of the synchronization error variance analysis and design issues. Some preliminaries are represented in Section 4. In Section 5, the proposed analysis issue is researched in detail. In Section 6, the proposed design issue is researched in detail. Some examples are given in Section 7. Finally, Section 8 discusses the future work and Section 9 summarizes the paper.

#### 2. System Modeling

We consider the clock synchronization problem between two nodes. Referencing TPSN [3] synchronization protocol, we also adopt the classical mechanism [1, 3, 20] of two-way message exchange between two adjacent nodes, which is depicted in Figure 1. And in this figure, we consider that Node A needs to be synchronized to reference Node B. Assuming timing messages are exchanged times, in the th round of message exchange, Node A sends a synchronization message which carries to Node B at . Node B achieves that message at and then replies to Node A at . The reply message contains both and . Finally, Node A gets the reply message at . Note that and are the local clock of Node A, while and are the local clock of Node B. After exchanging times, Node A receives a set of time stamps . The above procedure can be mathematically modeled asIn the paper, most of basic values we used are listed in Value Definition. And there are three points emphasized.(1)Assume that and obey the independent identically distributed (i.i.d) Gaussian distribution due to the central limit theorem. We take simples from an arbitrary and i.i.d totality with mean and variance . When is large enough, the sampling distribution of sample mean approximatively obeys normal distribution with mean and variance . If the delay is the addition of innumerable independent random process, the delay obeys the Gaussian delay model. And the test [4] showed that the variable delays can be modeled as Gaussian distributed random variables with 99.8% confidence.(2)Assume that the size of data packet which includes the clock message exchange between two nodes is generally equal, and the transmission rate of data packet is the same, so there are the same transmission time and reception time between two nodes. Moreover, propagation time is decided by the distance between two nodes. Suppose that the relative position between two nodes does not change in the process of information exchange, so propagation time keeps invariable.(3)Assume that clock skew () has no obvious changes and is known within one round of time-stamp exchange. The hypothesis is supported by two reasons. (a) Clock drift (variation of the clock frequency), which reflects the stability of crystal oscillator, is the second derivative of the clock. It has little influences on clock, so the relative clock skew () is slowly time-varying and we may think that clock skew () has no obvious changes in one synchronization period. From the point of control theory, the relative skew () can be processed by system identification parameter estimation. (b) References [8, 9] presented the statistical signal processing approaches estimating the clock skew under known fixed delay and unknown fixed delay. The approaches adopting signal processing technology not only apply to the case where the variable delay is the Gauss distribution, but also apply to the case where the variable delay is the exponential distribution.

##### 2.1. Clock Synchronization State Space Model without Packet Loss

In this paper, we may think that relative clock skew () has no obvious changes within one round of time-stamp exchange (emphasized in the third point above). So (1), which only has two unknown parameters, can be transformed intoTo present the linear relationship between and , we transform the above equations into state space model:

Equation (3) can be further simplified towhere and .

Defineso (4) can also be written as

In this paper, the random delay obeys independent identically distributed Gaussian distributions, which have been confirmed above, so it is assumed that its mean is zero and correlation matrix of the covariance is , which is a diagonal matrix.

For (6), we describe all parameters as follows.(1)We regard two unknown parameters, fixed delay and relative clock offset , as clock synchronization state between synchronization node (namely, Node A in Figure 1) and the reference node (Node B in Figure 1).(2)After exchanging the time-stamp information between synchronization node and reference node, obtained are viewed as the measurement information of fixed delay and relative clock offset, namely, .(3)Affected by the variable delay between nodes, the measurement information cannot accurately reflect the fixed delay and relative clock offset information, and the error covariance is . This is equivalent to the fact that we measured unknown things and the measurement information affected by instruments, environment, and methods of measurement has some errors with the true values. We call the errors measurement noises.

To sum up, (6) is described as follows. When measuring the unknown state , measurement (time-stamp information ) is influenced by the noise (the variable portion of delays). In this paper, the equation is treated as the measurement equation.

Next, we analyze the unknown state .(1)The state is a two-dimensional vector and includes two unknown parameters, which are fixed delay and relative clock offset .(2)Clock model of sensor node is a linear function of time , [1], where and , respectively, represent clock offset (phase difference) and clock skew (frequency difference). Modeling the clock relationship for the first order linear function is mainly due to neglecting the effect of clock drift on the clock. Clock drift (variation of the clock frequency), which reflects the stability of crystal oscillator, is the second derivative of the clock. So it has little influences on clock, and we may ignore its influence.(3)In addition, fixed delay between nodes including transmission delay, propagation delay, and reception delay is related to the power of transceiver, the length of data packet, and the distance between the nodes. Generally, it can be considered to be fixed within one round of time-stamp exchange.

Considering the three aspects above, we assume that the state of clock synchronization between synchronization node and the reference node changes slowly, and the present state linearly relates to the state in previous time instance [19, 21, 22]. Therefore, unknown state is built as a Gauss-Markov dynamic model:where interference part is modeled as a Gaussian distribution with mean zero and correlation matrix . Assume that the initial state also obeys the Gauss distribution with mean zero and covariance . In order to facilitate the subsequent research, (7) is rewritten into

Of course, matrix is an identity matrix. We call (8) the system state equation of clock synchronization between synchronization node and the reference node.

We need to explain that the coefficient matrix , measurement matrix , and the variance of noises and in the model are assumed to be known and fixed. It is convenient to the analysis and study. But in the actual environment, the network is complex and changeable, and the local clock is easily influenced by environment and other unpredictable interference, and so forth, so it needs to make the corresponding adjustment according to the actual situation. In the paper, the constant coefficient is treated as an example, without generality.

Above we build the clock synchronization state space model of synchronization node and the reference node, where two nodes are not isolated but are regarded as a whole, forming an orderly system. So, from the point of system, clock synchronization process based on two-way information exchange of sender-receiver can be interpreted as follows (shown as in Figure 2): establish the unknown state ; then by sending a synchronous request, obtain the measurement information of unknown state; finally, according to the measurement information, estimate the unknown state and revise the clock of node.

##### 2.2. Latest Developments in the Clock Synchronization State Space Model

Reference [10] established the accumulated clock offset and skew evolution model and expanded the model to sensors network with multiple nodes. Reference [10] presented a distributed Kalman filter algorithm for the clock parameters of the entire network node tracking (the clock skew and clock skew). The model is easy to expand the network size, is robust to changes in network connectivity, and can maintain long-term precision of clock parameters.

The state space model established above ((6) and (8)) and the state space model of [10] have a similar form, but there are still some differences. (a) In this paper, the state vector is a matrix form about the relative clock offset and fixed delay, and, in [10], about the clock skew and accumulated clock offset. (b) In this paper, measurement model (6) directly considers the clock skew, and, in [10], the localized timestamp measurement model considers the relationship between the timestamps and the accumulated clock offset. (c) In the paper, the clock offset of the model is relative to neighboring node and in [10] the clock relationship is between one node and the only reference node in the entire network.

Among literatures about the clock synchronization, there is little study related to synchronization error variance analysis and design issues proposed in this paper. In addition, variety and complexity of large-scale networks take some difficulties for synchronization error variance analysis and design issues presented in the paper. However, [10] proposed an efficient algorithm to solve the clock synchronization problem of large-scale and distributed network. Therefore, in order to simplify the study of problem and go deep into the essence of problem, the paper firstly uses two nodes as a springboard and focuses on discussing the effect of packet loss on the synchronization error variance in detail, which includes analysis and design of synchronization error variance. After strictly discussing two nodes, we are extending the result to the network with many nodes based on [10].

##### 2.3. Clock Synchronization State Space Model under Intermittent Observation

As above, we have regarded fixed delay and relative clock offset as the unknown parameters and established state space model, but the introduction of wireless network brings many unreliable factors for clock synchronization, such as network delay and packet loss. Obviously, exchanging clock synchronization information must be affected by these uncertain factors. Thereby the estimation of clock synchronization parameters is affected. In this paper, due to adopting the clock synchronization mechanism of two-way message exchange, where one round includes the exchange message which two nodes send to each other, as long as there is one time of communication failure between two nodes, this round is thought of as exchange of failure, namely, packet loss, shown as in Figure 3. If the time-stamp information arrives at Node A, we think that the information exchange is successful. That is to say that Node A receives the measurement information successfully.

In the following, we will consider how to modify models (6) and (8) in two cases mentioned above; namely, Node A receives intermittent observations.

In the first case, as shown in Figure 3, network packet loss is considered. Let be the random variable indicating whether measurement information is dropped at time or not, so if the packet is dropped and otherwise. We assume is an i.i.d Bernoulli random variable [23–25] with . represents the probability that the time-stamp information arrives at Node A, in short packet arrival rate.

In the second case, there is no packet loss in sensor network. Measurement information always successfully arrives at Node A, but in one round of clock information exchange, there is a fixed unit energy . Let be the random variable indicating that Node A freely schedules whether it exchanges clock information at time or not, so if Node A exchanges clock information and otherwise. It is similar to the first case that we assume is an i.i.d Bernoulli random variable with . Herein, represents the probability that clock information is exchanged between Node A and Node B in one period of the clock synchronization, in short the packet exchange rate.

From the above description, represents different meanings in the two cases. But in fact, we may transform the angle and we can uniformly think two cases are equivalent from the perspective of absence of clock information.

Therefore, for the two cases have been mentioned above, we modify clock synchronization state space models (6) and (8) and obtain the following clock synchronization state space model with intermittent observations:

Describing packet loss, we have also considered other forms of description. For example, for the clock synchronization mechanism of the two-way message exchange between two nodes, in every step the observation equation includes two times of message exchanges. If, in every one-way message exchange between two nodes, events of packet loss are independent of each other, the probabilities are not necessarily equal to each other, so we may use a matrix to describe communication situations, and it is given bywhere and are the Bernoulli random variables, respectively, indicating whether a packet is dropped from Node A to Node B or not and whether a packet is dropped from Node B to Node A or not, and their ranges are 0 and 1. In the process of communication, as long as , message exchange is successful; otherwise it is dropped.

Also event of packet loss was built for the Markov chain model [17]. But no matter how we build the model of packet loss, we still adapt the form described in (10), because it is more simple and it abstracts the event of packet loss.

So far, we have established the clock synchronization state space model under intermittent observation, tracking clock state. However, due to the randomness of packet loss, the synchronization error variance is a random variable, which maybe exceeds the designed boundary of the synchronization variance. This does not make some applications depending on clock consistency work normally. Thus, we will discuss the analysis and design issues between the synchronization error variance and packet loss rate based on a unified framework of the clock synchronization state space model in the following work.

#### 3. Synchronization Error Variance Analysis and Design

In Section 1, we have introduced that this paper researched clock synchronization issues from the point of the synchronization error variance. On the one hand, in the packet-dropping network, the synchronization error variance is a random variable. Existing studies about the clock synchronization primarily focused on the design of the synchronization estimation algorithm to improve the estimation error variance. But they rarely analyze the random distribution of synchronization error variance, let alone the analysis and design issues of synchronization error variance beyond the designed boundary of the synchronization variance (or the probability of synchronization error variance beyond the designed boundary of the synchronization variance). Therefore, the research on synchronization error variance is more necessary. On the other hand, the different application backgrounds have different requirements for synchronization error variance in reality. How could we ensure that the synchronization error variance is within the designed error variance border? How could we reasonably reduce the synchronization error variance with a limited resource? Thus, the research on synchronization error variance also has practical significance.

In the following, we begin to analyze two cases mentioned above in this paper.

Firstly, we define the following synchronization state qualities at synchronization node:

The random variable is 0 or 1, representing whether the synchronization node has received the measurement information . The matrix is the state estimation error variance, reflecting the estimation precision. The error between estimation state and actual state value is smaller, while is smaller.

Because clock state contains clock error between two nodes, the estimation value is much closer to actual value , which means that the estimation value of clock error is more precise. So, after adjusting, the synchronization error between two nodes is smaller, namely, the higher synchronization precision. Thus, the state estimation error variance matrix could reflect synchronization precision, that is, the synchronization error variance in this paper.

##### 3.1. Synchronization Error Variance Analysis

In the first case, for a wireless sensor network with packet loss, packet loss has a serious influence on clock state estimation of the synchronization node. The more the packet is lost, the greater the estimation error for the synchronization node is and the lower the clock synchronization precision is. Further, each of the sensor networks has different requirements of synchronization precision according to the different application backgrounds. When the clock synchronization error variance cannot meet the requirements of the desired precision, the network cannot guarantee the normal operation. Thus, if the network packet loss is too large, the synchronization error variance may exceed a desired variance boundary. At this time, we attempt to judge whether the conditions of existing network can meet the requirements of the desired synchronization error variance or not.

The description of packet loss is as the introduction in the first case of Section 2.3. Assume that we can observe the probability that clock information packets in network arrive at the synchronization node, and tentatively consider it is . And the desired clock synchronization precision (the desired synchronization error variance) is . Due to the introduction of random variable , the estimation error variance of the synchronization node is also a random variable (shown in Section 4.1). It is because is a random quantity due to the randomness of , the synchronization error variance may go beyond the desired boundary of the synchronization variance. And because the value of cannot be obtained offline, the statistical properties of the error variance are considered in this paper.

Particularly, we are interested in the following questions.

*Question 1 (synchronization error variance analysis). *For any given synchronization precision , find a minimum packet arrival rate , satisfyingwhere is the times of clock information exchanges in one period of synchronization.

As to the problem, we will begin with the following critical questions.(1)Because the exact value of is difficult to obtain, we discuss the certain upper boundary of when .(2)Judge the relationship between the upper boundary and packet arrival rate.(3)Look for the minimum packet arrival rate using a search algorithm.

##### 3.2. Synchronization Error Variance Design

In the second case, there is no packet loss in sensor network, but the synchronization node freely schedules whether it exchanges clock information with the reference node. The more the clock information is exchanged, the higher the synchronization precision is, while the more the corresponding energy is consumed, which is not expected for sensor node whose energy is limited. So, for the sensor node, the energy consumption and synchronization precision are mutually restricted. At this point, how should we set up the network parameters to achieve the optimal tradeoff between energy consumption and synchronization precision at the synchronization node?

In this issue, the detailed description of the unit energy consumption and the clock information packet exchange rate is introduced as the second case in Section 2.3.

Then, we will research the following questions.

*Question 2 (synchronization error variance design). *Find an optimal clock information packet exchange rate between synchronization node and reference node, minimizing (minimizing the trace) where the first part represents the limitation of mean estimation error variance during the synchronization; the second part represents mean energy consumption during the synchronization process.

As to the problem, we will begin with the following critical questions.(1)As of Question 1, find the certain upper bound of when .(2)Prove that there exists the minimum of the mathematical model (14).(3)Obtain the solution form of the optimal clock information exchange rate that minimizes the mathematical model (14).

#### 4. Preliminaries

As can be seen from the analysis of the above two sections, the key in the clock synchronization process is that, according to measurement received, the synchronization node estimates an unknown clock state with the reference node and then corrects the local clock, making it consistent with the reference node. Therefore, the estimation error variance determines the precision of the clock synchronization. For the two issues in the paper, we define the criteria with state estimation and estimation error variance as shown in (12).

##### 4.1. Kalman Filtering under Intermittent Observations

In the case of , it is obvious that the standard Kalman filter is the optimal linear state estimation, for the clock synchronization state space models (9) and (10), where state estimation process is divided into two steps, namely, innovation step (prediction step) and correction step (update step). It is easy to write the recursive formula of standard Kalman filter [26].

However, for the two issues of the paper, it is not really that the synchronization node gets all of the clock information . When some of are lost, it will affect the state estimation of the synchronization node. Reference [2] showed that the Kalman filter is still the optimal linear estimator in the setting when possibly . It is different from the standard Kalman filter that only the innovation step is performed when a measurement packet is dropped. And the modification of the Kalman filter equations is given as follows:Unlike the standard Kalman filter where is deterministic for any given initial value , the randomness of the packets loss makes a random variable as well.

##### 4.2. Kalman Filtering in the Statistical Property

Since is a random sequence, the estimation error variance matrix is also stochastic and cannot be determined offline. In this paper, the statistical properties of the error variance are considered. For the modified Kalman filter, the estimation error in the statistical property can be expressed aswhere represents the expectation of random sequence . In Question 1 (clock synchronization analysis issue), indicates the clock information packet arrival rate, while in Question 2 (clock synchronization design issue), it denotes the clock information packet exchange rate.

The steady-state error variance about (21) is defined as

Now the concept of asymptotic stability in the error system is extended to the case containing packet loss. The definition of asymptotic stability in the error system is given in the statistical property.

*Definition 1. *For the expectation with a given random sequence , if the state estimation error (21) in the statistical property is Lyapunov asymptotically stable, it is called that the state estimation error (18) of Kalman filter in the statistical property is asymptotically stable, and the corresponding steady-state error covariance of Kalman filter satisfiesNote that if and only if is bounded, so we mainly study the expected error variance and is the expectation of .

In order to solve synchronization error variance analysis and design issues in this paper, we need to use a basic conclusion.

Consider the following function:

Lemma 2 (see [27]). *Under intermittent observations, there is a Kalman gain which makes the system asymptotically stable, if and only if inequality of the matrix variable **exists positive-definite solutions. And steady-state error variance of corresponding satisfies**where .*

Since Kalman filter is the optimal linear estimator, the error variance of which is minimum, it satisfies for all and is the infimum of . And the corresponding Kalman gain is .

##### 4.3. Definitions of Notation

In order to facilitate the following study of synchronization error variance analysis and design issues, the related formulas and notation are simplified in this section. Suppose is the same as described in Section 2. If the matrix is positive definite, we write . We define the following functions as [15]

Compared with the standard Kalman filtering, it can be easily seen that the function is a prediction step function of estimation error variance in the standard Kalman filter. And the function represents an update step function of estimation error variance in the standard Kalman filter.

Therefore, estimation error variance equations of the standard Kalman filter can be expressed using the above-defined function as follows:Steady-state error variance of the modified Kalman filter can be written asNamely, is the unique solution of the following equation:

#### 5. Synchronization Error Variance Analysis

In this section, we consider Question 1 (synchronization error variance analysis issue) shown as the description in Section 3.1.

Firstly, we consider the limited case . It is mainly because the time of clock information exchanges is not determined in the process of synchronization and depends on two aspects: the design of synchronization algorithm and the setting of the desired synchronization variance. On the one hand, using high precision synchronization algorithm, the time of clock information exchanges is smaller. On the other hand, if the requirement of synchronization precision is different, the time of clock information exchanges is also different. In fact, there exist some limitations when discussing , but it has great value of the theoretical research.(1)For any , is the low bound of .(2)If we can find a minimum clock information packet arrival rate , satisfying when , then the is also treated as the minimum clock information packet arrival rate, satisfying .

So in the section, we look for a minimum clock information packet arrival rate , satisfying for .

However, unfortunately, it turns out that the exact value of is difficult to find ever for scalar systems [2].

But we can find the upper bound of as follows:where the first equation is obtained due to the property of conditional expectation, and the inequality is because is a concave function of (Lemma 1-e [2]) and Jensen inequality is used.

According to (29), it can be seen that steady-state error variance in the Kalman filter is the unique solution to the following equation:Use induction for inequality (31) and the limit is taken (proof process in detail appears in Appendix A), so it is easy to get

According to (33), only if we look for the minimum clock information packet arrival rate , satisfyingwill be guaranteed.

To sum up, for , the synchronization error variance analysis issue is equivalent to looking for the minimum clock information packet arrival rate , making

Then, we need to determine the function relationship between and such that the minimum clock information packet arrival rate is found.

Theorem 3. *For any given clock information packet arrival rate , steady-state error variance of the Kalman filter is a monotonically decreasing function of .*

*Proof. *For the packet arrival rate and Kalman gain , the steady-state error variance of the Kalman filter satisfies the following equation (from (23)):For the Kalman filter, the steady-state estimation error variance is less than or equal to the estimation error variance of prediction step, that is,For any ,If the above inequality takes the equality, it shows is equal in the case of and in the case of , so . If the inequality excludes the part of the equality, then According to Lemma 2, we know in the case of packet arrival rate any solution of the inequalityhas . This is because the Kalman filter is the optimal linear estimator and is the minimum value of all of the solution space above.

Contrasting inequalities (39) and (40), it can be seen that is a set of solutions at a packet arrival rate , so we judge . is the Kalman gain in the case where packet arrival rate is .

Therefore, the steady-state error variance of the Kalman filter is a monotonically decreasing function of packet arrival rate .

Because is a monotonically decreasing function of , where , for any given , the minimum , which satisfiescan be efficiently found through the bisection search algorithm. The bisection search algorithm is a common search algorithm which has the good characteristic of search speed and mean performance. The specific idea of the algorithm can be found in [28].

#### 6. Synchronization Error Variance Design

During the synchronization process, increasing the transmit power of sensor nodes can reduce the packet loss rate, and the synchronization nodes can obtain more clock information, so the estimation of clock parameters will be more accurate at the synchronization node. However, increasing the transmission power increases the corresponding energy consumption of the sensor nodes.

Since the transmission power of sensor node has an impact on the packet loss rate and packet loss rate also affects the synchronization precision, how should we adjust transmission power of sensor node to make the clock synchronization estimation variance as small as possible? In other words, if there are multiple levels of transmission power, how should we schedule the transmission power of sensor node in order to improve synchronization precision as soon as possible with limited energy? At this point, in order to improve synchronization precision as much as possible, we will design the optimal transmission power scheduling sequence with the restriction condition of limited energy.

It is as any research which needs a gradually in-depth process that, in order to achieve the purpose, we firstly need to fully understand the relationship between energy consumption and synchronization precision and, after all, the energy consumption and synchronization precision are mutually restricted. The more the clock information is exchanged, the more the corresponding energy is consumed, while the smaller the estimation error is. The different application backgrounds have different requirements for synchronization precision in wireless sensor networks and have different restrictions of the energy. The ideal situation is that we can achieve high synchronization precision and do not consume too much energy. Therefore, in order to further have more in-depth understanding of the mutually restricted relationship between energy consumption and synchronization precision, we firstly treat energy consumption and synchronization precision with the same importance in the paper. After comprehending the essential relationship between both, we will further extend to the generality.

So, this paper firstly discusses the case where there is no packet loss in sensor networks, but the synchronization sensor node freely schedules whether it exchanges clock information with the reference node. Assuming the energy consumption in one round of clock information exchange for sensor nodes is fixed, the more the clock information is exchanged, the higher the synchronization precision is, while the more the corresponding energy is consumed. On the one hand, we expect that the sensor nodes can consume as little energy as possible; on the other hand, we hope that the clock synchronization precision is as high as possible. At this point, we attempt to reasonably adjust parameters in order to achieve the optimal tradeoff between energy consumption and synchronization precision at synchronization node.

Now, we discuss the proposed design issues of synchronization error variance, shown as in Section 3.2 described.Firstly, we consider the performance metric as follows, which reflects the relationship between clock synchronization precision and energy consumption: where the first part represents the mean estimation error variance in the process of clock synchronization, which determines the clock synchronization precision; the second part represents mean energy consumption in the process of clock synchronization.Then, seen from the above discussion about analysis issues, it is sure that (a) when discussing , it has some significance of the theoretical research; (b) (33). So to minimize (minimize the trace), we can replace it with minimizing .In order to find an optimal , minimizing , we need to judge the function property of , where the function property of is critical. Because the function property of is not easy to be proved, we introduce the function . By analyzing the property of the function , we deeply judge the function property of . Firstly, we introduce the following lemmas. Omitted proofs appear in Appendix B.

Define(1),(2),(3).

Lemma 4. *If is a monotonically increasing function of , is also a monotonically increasing function of , where is a diagonal matrix.*

Corollary 5. *Consider and .*

Lemma 6. *If is a convex function of , where is a diagonal matrix, is a convex function of .*

Lemma 7. * is a convex function of , that is, , where and .*

Lemma 8. * is a monotonically increasing function of , that is, .*

Lemma 9. *Consider .*

In the subsequent proof, for simplicity, is written as ; the derivative of is written as ; the second derivative of is written as . In addition, , , and represent , , and , respectively.

In we have the following lemma.

Lemma 10. *If and , whose eigenvalues are not less than 1, is a diagonal matrix, is a convex function of , that is,*

*Proof. *Consider the following equation:where is the unique solution to the above equation.

Taking derivative on both sides of (44) with respect to leads toAfter transposition, we obtain the following:And because of Corollary 5 and Lemma 9, we getTaking again derivative on both sides of (46) with respect to leads toAt the same time, according to (46) and (48), we haveAfter transposition, we obtain the following:According to Lemma 9, (47), and , if we prove , only we can proveAnd according to Lemma 7, Lemma 9, and (47), to prove (51) holds, we just need to proveBecause of (47),Because and , whose two eigenvalues are not less than 1, is a diagonal matrix; thereforeAnd because , (52) is set up; thusIn other words, is a convex function of .

In we have the following lemma.

Lemma 11. *If and , whose eigenvalues are not less than 1, is a diagonal matrix, is also a convex function of ; that is, for any , .*

*Proof. *Firstly, from Lemma 10, we have which is a convex function of ; then according to Lemma 6, Lemma 11 can be obtained.

Next, we state a main result.

In we have the following theorem.

Theorem 12. * which minimizes can be obtained by solving the following two equations:*

*Proof. *Equation (56) can be obtained according to the definition. Because is a convex function of and is linear relationship with respect to , is also a convex function of . Thus, takes derivative of and then makes it equal to zero:that is,According to (46), satisfies (57).

In one word, synchronization precision and energy consumption of sensor nodes are mutually restricted for clock synchronization. By solving the two equations (56) and (57), we can find an optimal clock information exchange rate, optimally trading off between synchronization precision and energy consumption of sensor nodes.

#### 7. Simulation Analysis

In this section, for synchronization error variance analysis and design issues, we will simulate and illustrate the theories and algorithms proposed in the previous sections by some examples. Firstly, we start with analysis issue.

##### 7.1. Analysis Issue

Consider the system parameters of clock synchronization state space model with

Three graphs in Figure 4 indicate the relationships between the trace of Kalman filter steady-state error variance (when ) and clock packet arrival rate as well as the relationship between the mean error variance (when ) and clock packet arrival rate with different circumstances of the system noise and the same observation noise as , where (when ) is obtained by Monte Carlo simulation. As can be seen from the figure, with different system noise, is tight approximation to (when ). And with the weakening of system noise, the effect of replacing with (when ) approximately is more and more perfect. Two diagrams in Figures 5 and 4(b) represent that the observation noise is different and the system noise is the same as . From the comparison of figures, the change of observation noise has no effect on the degree of approximation between and (when ). Seen from the comparison and analysis of Figures 4 and 5, can be used to replace approximately (when ), and is a monotonically decreasing function of . It shows again that the higher the probability that clock information arrives at the synchronization node is, the higher the precision of clock synchronization is.

**(a)**

**(b)**

**(c)**

**(a)**

**(b)**Assume that the loop termination condition of bisection search algorithm , the system noise correlation matrix , and the observation noise correlation matrix . The simulation results show that the algorithm can obtain the minimum after five steps. For example, while , ; while , ; while , . At the same time, is a identity matrix.

##### 7.2. Design Issue

In this problem, the system parameters are the same with Section 7.1. In addition, we consider three different unit costs of sensor node, , , and , respectively. From Theorem 12, the optimal that minimizes can be obtained by (56) and (57). The solutions of and are as follows:

We also draw the relationship between and . As is confirmed in Figure 6, is a convex function of . And it can be seen easily from the figure that the optimal that minimizes is the same as the calculated from (56) and (57).

#### 8. Future Work of Synchronization Error Precision Analysis and Design

This paper deeply researches certain respect on the synchronization error variance analysis issue from the perspective of statistical mean. At the same time, we are aware that it has a certain limitation in practice. For example, we assumed that packets are dropped independently in this paper, which is certainly not true in the case where burst packets are dropped or in queuing networks where adjacent packets are not dropped independently. Besides, we also use the mean of the synchronization error variance as the measure of performance. Reference [15] pointed out that this can conceal the fact that events with arbitrarily low probability can make the mean diverge, and we should ignore such events with extremely low probability.

##### 8.1. Investigating Synchronization Error Variance Analysis from the View of Probability

From the front analysis, it is seen that there exists packet loss such that is a random variable. It is because cannot be determined in one synchronization process that the analysis from the perspective of statistical mean only shows statistical synchronization error variance of multiple information exchanges and may omit some of small probability events. Statistical synchronization error variance of multiple information exchanges does not represent all of synchronization error variance which is not beyond the desired boundary of the synchronization variance. In a period of synchronization, there exists the possibility that some of synchronization error variance goes beyond the desired boundary. For high reliability, if the synchronization error variance goes beyond the desired boundary, it brings serious hidden peril for sensor networks. Motivated by [15] which analyzed that packet loss affects the state estimation variance from the perspective of probability and by [11] which estimated clock parameters from the perspective of probability distribution based on belief propagation, can we analyze the probability that the synchronization error variance goes beyond the desired boundary by the same way?

Therefore, in future research, based on the latest synchronization state space model [10] or the research framework in [11], we could discuss the probability distribution of synchronization error variance under the condition of packet loss and analyze the probability of the synchronization error variance beyond the designed boundary of synchronization variance. Then Question 1 proposed in this paper is shown as follows.

For a given packet arrival rate, we estimate a different performance metric , that is, the probability that is bounded by a given variance , where notation takes the probability.

Compared with the performance metric , which maybe omits some of small probability events, we will discuss the synchronization error variance from the point of probability. Due to including small probability events, the high reliability requirement for synchronization precision boundary can be satisfied.

##### 8.2. Optimizing the Performance Metric of Synchronization Error Variance Design

Combining synchronization precision and energy consumption into a cost function, as the performance metric ((42) in the paper), reflects the tradeoff between energy consumption and synchronization precision at synchronization node. However, in practice, the energy used to synchronize is limited and we prefer to improve the synchronization precision with the limited energy as much as possible. In fact, the latest literatures have preliminary study, but there is no in-depth study about clock synchronization. Thus, in future research, we need to further optimize the performance metric built in the paper.

Since the transmission power of sensor node has an impact on the packet loss rate and packet loss rate also affects synchronization precision, how should we adjust transmission power of sensor node to make the clock synchronization estimation variance as small as possible? In other words, if there are multiple levels of transmission power, how should we schedule the transmission power of sensor node in order to improve synchronization precision as soon as possible with limited energy? At this point, in order to improve synchronization precision as much as possible, we will design the optimal transmission power scheduling sequence with the restriction condition of limited energy.

#### 9. Conclusion

In this paper, regarding fixed delay and relative clock offset as the unknown clock state variables and based on a unified framework of clock synchronization state space model, we discuss the analysis and design issues between the synchronization error variance and packet loss rate.

In the analysis issue, we theoretically prove that the steady-state error variance of Kalman filter in the statistical property is a monotonically decreasing function of clock information packet arrival rate. And in order to guarantee the desired synchronization precision of sensor node, we find a minimum clock information packet arrival rate by an efficient bisection search algorithm. In the design issue, in order to achieve the optimal tradeoff between energy consumption and synchronization precision, we obtain the optimal solution form of clock information exchange rate.

It is as indicated in the sections of the synchronization error variance analysis and design issues in this paper. It has great theoretical significance to discuss the synchronization error variance in limited case from the perspective of statistical mean and the performance metric considering both energy consumption and synchronization precision, but it has a certain limitation in practice. However, the estimation performance metric with the view of probability in network control theory brings another research perspective for the analysis and design issues proposed in this paper. In addition, in order to simplify the study of problem and go deep into the essence of problem, the paper firstly uses two nodes as a springboard and focuses on discussing the synchronization error variance analysis and design in detail. For multinode wireless sensor networks, we can use the latest clock synchronization system model. So, based on the latest model of distributed clock synchronization system, we will further discuss the influence of packet loss on synchronization error variance analysis and design issues from the point of probability and assess the reliability of the synchronization error variance beyond the designed boundary of the synchronization variance in future research.

There are some works further researched. Discuss the possibility of the synchronization error variance beyond the designed boundary of the synchronization variance from the view of probability. Design an optimal transmission power scheduling sequence of sensor node to make the synchronization precision as high as possible with the limited energy of sensor nodes. The synchronization error variance analysis and design issues will be extended to the distributed network.

#### Appendices

#### A. Supporting Proofs

*Proof Process of *. Since is the steady-state error variance matrix of Kalman filter, so with

The initial estimation error covariance of the Kalman filter is , which is a fixed value, and then .

When ,

Assume that when , .

Then, when , where the second inequality is because and are monotonically increasing functions of . The related proof is from Lemma B.1 in Appendix B.

In conclusion, .

The limit is taken on both sides of above inequality; it can be obtained that

#### B. Supporting Lemmas

*Proof of Lemma 4. * is a monotonically increasing function of .

For , we haveand for , we haveNamely, .

is also a monotonically increasing function of , where is a diagonal matrix.

*Proof of Corollary 5. *According to Lemma 2, is a monotonically decreasing function of , so . According to Lemma 4, is also a monotonically decreasing function of , so .

*Proof of Lemma 6. * is a convex function of .

Consider .

Consider .

is also a convex function of .

*Proof of Lemma 7. *It can be found in Lemma 1-e [2] that is a convex function of .

*Proof of Lemma 8. *The proof is in Lemma 1-c [2].

*Proof of Lemma 9. *Note that , and .

Lemma B.1. *For any , we have *

*Proof. *According to the definition of function , it can be easy to be proved byFrom Lemma 1-c in [2], if , then , namely,Left multiplying both sides of the inequality by and right multiplying both sides of the inequality by , thereforeThat is to say, .

Therefore, .

#### Value Definition

: | The relative clock skew of Node A with respect to Node B |

: | The relative clock offset of Node A with respect to Node B |

: | The fixed delay portion between Node A and Node B |

: | System noises |

: | Measurement noises |

: | The clock synchronization state at time |

: | The estimation of the clock synchronization state at time |

: | The measurement of the clock state at time |

: | The estimation error variance of the clock synchronization state at time |

The desired synchronization precision | |

: | The unit cost used by sensor |

: | 1: Whether clock information is dropped at time or not; 2: Node A freely schedules whether to exchange clock information at time or not |

: | The variables delays portion at th time in the transmission from Node A to Node B and from Node B to Node A. |

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

The work is supported by the National Natural Science Foundation Project of NSFC (NSFC nos. 61403055 and 61301125), the Chongqing Education Administration Program Foundation of China (nos. KJ120514 and KJ110513), and the Natural Science Foundation Project of CQ CSTC (nos. 2014JCYJA40025 and 2014JCYJA40005). This work was supported in part by the Foundation for University Youth Key Teacher of Chongqing, Outstanding Achievement Transformation Project of CQ CQJW (no. KJzh10207). And special thanks are due to all who have helped to make this study.