Abstract
Time synchronicity works as a popular requirement in wireless sensor networks. Pulse-coupled oscillators similar to firefly flashing and synchronization via discrete pulse coupling are widely used in wireless sensor networks. In this article, we have studied the time synchronization with communication delay in the nearest neighbor network of distributed sensors, based on the pulse-coupled oscillators model of synchronicity achieved by biological systems. First, we present a linear pulse-coupled oscillators model with coupling delay and the model is used to analyze the wireless sensor networks synchronization with communication delay. Second, we mathematically analyze the firing behaviors in the linear pulse-coupled oscillators network using the delayed excitatory coupling and track the synchronization process of the two and multi-oscillators and obtain the synchronization conditions from the regression mapping. Finally, through the proposed model implementation in the wireless sensor networks simulation framework, we demonstrate that the multi-oscillators system can be synchronized from a random starting stage distribution under linear phase responding functions and the nearest neighbor communication. The results show that our approach can achieve clock synchronization in wireless sensor networks with delayed nearest neighbor communication.
Keywords
Introduction
Wireless sensor networks (WSNs) consist of a plurality of sensor nodes that are linked without any centralized infrastructure being assumed. 1 Every node is capable of certain computing ability, radio communication, and sensing capability and cooperates in order to track the field, guide direction, and fuse information. 2 WSNs have been applied to many scenarios, such as industry, 3 indoor positioning, 4 and environmental monitoring. 5 Synchronization of time references into different sensor nodes is a prerequisite condition for many of these applications.6,7 If the clocks of the sensor nodes are not properly synchronized, basic operations will not be able to deliver results. Thus, time synchronization is a fundamental requirement in WSNs; it provides the entire sensor nodes with a standard reference time. 8 Since sensor networks usually use relatively cheap and unreliable hardware clock crystal oscillators. 9 There are several factors affecting time synchronization, such as oscillator aging, temperature, battery level, and strain. 10 The non-deterministic delays in information exchange, topology, and so on are other factors that influence accurate and stable time synchronization. 11 It is very difficult to implement correct synchronization for such sensor nodes in this way. Synchronization techniques focused on packets such as RBS, 12 TPSN, 13 FTSP, 14 GTSP, 15 PulseSync, 16 and Glossy 17 have been regarded as successful alternatives for periodic time synchronization in sensor networks. The need to exchange several packets, however, is typical of the above-mentioned synchronization protocols. Post facto synchronization involves either the presence of a third party or the existence and maintenance of a skew table and a protocol of routing, which may not be fulfilled for a broad network. The scalability of the sensor network is limited by all these limitations. The wide size of the network and complex topology require more efficient synchronicity with the development of the WSNs. Inspired by biology, the theory of pulse-coupled oscillators (PCOs) provides fascinating solutions for inner synchronization suited for WSNs.18–23 PCOs may obtain a cost-effective synchronization of the physical layer through pulse transmission rather than packet exchange, which is of great interest to inexpensive sensor nodes. Then, it is a distributed approach that does not need a root, or guidance, node to be chosen to synchronize the network. However, the significant drawback of their scheme is the reliance on an all-to-all communication model. In addition, the model is built according to the instant coupling, meaning that the pulse is delivered without any delay, although it is not possible to ignore the propagation delay in wireless communication, which limits its application to real-world networks.
Data transmission in WSNs is accomplished by multi-hop communication, in which the sensor nodes transmit their data to the sink via neighboring nodes, and obstructions in the environment can also limit communication between nodes, which in turn affects the network synchronicity.24–27 Based on the above results mentioned, we study and analyze the linear PCOs model synchronization in WSNs indoor application environment with non-fully connected to the topology. Furthermore, the transmission of a pulse requires a finite propagation time in most applications. Therefore, when communication delays prevail, how to achieve synchronization in the nearest neighbor connection network is a problem to be solved.
Throughout this article, we demonstrate a linear PCOs model with coupling delay, based on the PCOs model of synchronicity achieved by biological systems, and the model proves to achieve synchronization in the sensor network of nearest neighbor communication, which narrows the distance between settings in the real world. This article considerably extends the linear PCOs model in our prior work.28,29 There are some major differences: we consider the propagation delay in real-world wireless environment, and the sensor network deployed in the indoor environment is not a fully connected topology. Then, we extend the synchronization scheme to the case where all-to-all communication is not feasible. Our generalizations include the synchronous case of the nearest neighbor communication network and communication delay:
The way of introducing a delay in the linear PCOs model is a real and intuitive way of signal transmission. That is, the transmission delay is the time spent from the “fire” packets generation to their arrival at the sink. With the introduction of delay, oscillator dynamics with coupled delays to be given in different ways.
For the phase space of different disjunct domains (the method can be found in Ernst et al. 30 ), we mathematically analyze the firing behavior of the linear PCOs model with delayed excitatory coupling. And phase tracking of the system consisting of two oscillators reveals the firing map and the return map.
We show that the model can be synchronized by a WSN simulation system from the random starting stage distribution under linear phase responding functions and the nearest neighbor contact.
The remainder of this article is structured and organized as follows: the related work is discussed in the section named “Related work.” We define a linear PCOs model with delay and the article motivation in section “System model and motivations.” In section “Mathematical analysis,” we introduce a complete analysis of two oscillators in mathematics with delayed synchronization. The conditions for synchronization to be achieved and maintained are derived, and the results are utilized to show that synchronization can be achieved by the oscillators in the model. Section “Numerical simulations and analysis” presents numerical experiments that confirm the analytical findings. Finally, possible research directions are discussed in section “Conclusion.”
Related work
The PCOs are restricted cycle oscillators connected at discrete time instants by exchanging pulses. 31 The impulsive nature of coupling has rarely been utilized in mathematical models because it includes discontinuities that are difficult to mathematically manage. 32 Mirollo and Strogatz 33 carried out pioneering work on modeling and conducted analysis on pulse-coupled units (M&S model). Influenced by the model of Peskin 34 for cardiac pacemaker self-synchronization, Mirollo and Strogatz suggested a PCOs model without delayed exciting coupling. He modeled the natural pacemaker of the hearts as a device consisting of some “integrate-and-fire” oscillators that are interconnected. Each oscillator in the system can be considered as an electric circuit consisting of a capacitor in parallel with a resistor, and the state x is the voltage across the capacitor. When the voltage reaches a threshold, the capacitor discharges, and then, the voltages of other capacitors will be kicked up by a small amount ε, which is known as the coupling effect. Every oscillator shall be characterized by state x, satisfying as
where γ and S0 are the oscillators’ intrinsic properties. As x = 1, an oscillator fires and jumps back to x = 0, and coupling strength ε will motivate the states of the other oscillators. The state x evolves based on a smooth monotonically raising concave function
where T is the cycle length and
A more general linear PCOs model28,29 based on the M&S model was proposed as follows
The moment of the firing of oscillator i at time t, when the phase reaches the ϕ = 1, oscillator firing and the phase ϕ immediately jump down to 0, and the cycle is repeated thereafter. When the j oscillator “fire,” the oscillator will generate a pulse, and other oscillator will receive the pulse and change the state of the node itself. Figure 1 shows the excitation coupling in the “fire” state, which can affect the phase change of other oscillators. Oscillators i and j influence each other, and the oscillators phase difference gradually decreases until the system reaches synchronization.

Two pulse-coupled integrate and fire oscillators.
System model and motivations
In this part, we describe the model of linear PCOs synchronization with delay and discuss the differences between theoretical and practice models in WSNs. Then, we propose our modified algorithm, which takes these differences into account, including delay and the chain-ring hybrid network topology.
Delayed linear PCOs model
In sensor networks, wireless communication has unpredictable communication delays. 35 Therefore, in order to get closer to the real application of WSNs, we analyze the synchronization of the linear model with coupling delay.
Different from the linear PCOs synchronization model, when the j oscillator “fire,” the oscillator signal cannot be instantaneously coupled to excitation, and the other oscillators are coupled to the transmitting oscillator, receives this pulse at t = τ, and then modifies its respective phases (Figure 2).

Two pulse-coupled integrate and fire oscillators with delay.
When an oscillator fire at time t, it is
if n ≥ 2 oscillators fire at time t simultaneously, it is
The delay of the proposed model is a real and intuitive of signal condition transmission, that is, the transmission delay is the time spent from the “fire” packets generation to their arrival at the sink, 36 and pulse transmission relates to the times between the receipt of the pulse by the transmitting oscillator in the neighbor and the transmission of a pulse. 37
Oscillator dynamics
Oscillator dynamics with coupled delays were given in different ways. Combining the overview in section “Delayed linear PCOs model,” we can summarize the process of the oscillator dynamics in the Algorithm (Oscillator dynamics).
The dynamics are presented in the linear state change function with the value of the phase
Network topology and preliminaries
In sensor networks, there are many kinds of network topologies, such as star network, mesh network, and hybrid network (layered network). For indoor environments, such as coal mines, underground pipe corridors, and building office spaces, there are many intricate roadways or corridors. Due to the low cost, scalability, and topology variability of WSNs, it is not the best choice to deploy large-scale all-to-all communication network sensors. 38 Therefore, we study synchronization in a ring-chain hybrid network topology with nearest neighbor communication (Figure 3). Each node only communicates with its neighbor nodes and sends pulse signals in the excitation state. When the signal passes through the delay, the neighbor nodes are excited and coupled to change the phase of the current time.

The chain-ring hybrid network topology.
The pulse signal in the ring-chain hybrid network can only excite neighboring nodes, and the excitation is not instantaneous. Therefore, in the process of synchronization of the nearest neighbor network, a huge number of excitations coupling signals are required to excite the neighbors of each node, and the excitation has a delay.
In the nearest neighbor coupling network, since we have no way to determine the position of the delay and pulse signal, the synchronization process of the linear model considering the delay is more complicated. In this article, synchronization can be defined as:
Definition 1
If there are delay τ and time t0 such that ϕi(t0) = ϕj(t0) for all t0 ≥ τ, then the oscillator i and j shall finish the entire synchronization process.
Definition 2
If there exist delay τ and time t0 such that ϕ1(t0) = ϕ2(t0) = …= ϕn(t0) for all t0 ≥ τ, then the oscillators can achieve complete synchronization.
In order to grasp the position of the pulse signal when it is not passing through the delay, we use the symbol Di(t) and Dj(t) 39 to determine the position of the pulse signal
This can be used to obtain the arrival time after the delay of the pulse signal from the ith oscillator.
In a mathematical sense, we can use the firing map h(ϕ) and return map R(ϕ) to explore the development process of oscillators system and the relationship of oscillator phases. 28 To get the synchronization behavior of linear PCOs model with coupling delay, we trace the development of phase differences between oscillators, the total Δϕi, j is given by
The firing map h(ϕ) and return map R(ϕ) can be defined as:
Definition 3
Given two oscillators i and j, assuming that at the instant after one firing of i the phase of j is ϕ, the firing map of i about h(ϕ) is defined as the phase of i after the next firing of j.
Definition 4
Given two oscillators i and j, assuming that at the instant after one firing of i the phase of j is ϕ, the return map of j about R(ϕ) is defined as the phase of j after the next firing of i.
Mathematical analysis
We consider two oscillators’ system S as i and j in the linear PCOs model, excitatory coupled with time delay τ. The phase tracking of the system consisting of two oscillators reveals the map of firing and return. The state shift is obtained from the firing map h(ϕ), and the synchronization condition is obtained from the return map R(ϕ), where the address of the pulse signal in the delay is obtained from Di(t) and Dj(t). The determination of the fixed point for system S is unique, allow the synchronization of the system status over a finite number of variations to be verified.
Our strategy is to (ϕ, ε) space is divided into discrete phase domains I1, I2, and I3
The coupling strength is different for each oscillator, which we treat separately to get different h(ϕ) in each of them, these fire map h(ϕ) must be determined the long-term behavior of S.
Both oscillators reached the excited state in a first interval I1, but their pulse signals have not yet reached the other oscillators. Therefore, it is appropriate to determine the outcomes of the two pulses being obtained. The second interval I2, only the pulse signal i, has not reached j. As for the interval I3, oscillator j would reach the threshold before the firing stage of i can be received. Each domain will be divided into smaller areas, and we use consecutive numbers to represent Ex0~Ex6 for excitation coupling, as shown in Table 1∼7.
EX1: 0 ≤ ε < 1−(τ + ϕ) & ϕ∈I1.
h(ϕ) = 1−(ϕj–ϕi) = 1−[(τ + ϕ + εi) − (τ + εj)] = 1 − [ϕ + εi–εj].
Since ϕi(τ) = τ + εj ≥ τ and ϕj(τ) = τ + ϕ + εi < 1, h(ϕ) τ such that h: Ex1→I2∪I3.
EX2: 1–(τ + ϕ) ≤ ε ≤ 1−τ & ϕ∈I1.
h(ϕ) = 1−(ϕj−ϕi) = 1−[1 − (τ + εj)] = τ + εj.
Since ϕi(τ) = τ + εj ≥ τ, h(ϕ) < τ such that h: Ex2→I2∪I3.
EX3: 1−τ ≤ ε < 1−(τ−ϕ) & ϕ∈I1.
h(ϕ) = 1−(ϕj−ϕi) = 1−[1−(τ−1 + εj)] = τ + εj−1.
Since ϕi(τ–ϕ) = τ−ϕ + εj < 1, h(ϕ) < ϕ < τ such that h: Ex3 → Ex3 ∪ Ex4.
EX4: ε ≥ 1−(τ−ϕ) & ϕ∈I1.
h(ϕ) = 1−(ϕj−ϕi) = 1−(1−ϕ) = ϕ.
Since h(ϕ) = ϕ, with the same initial conditions only i and j exchanged. This assures that h: Ex4→Ex4.
EX5: ε < 1−(τ + ϕ) & ϕ∈I2.
h(ϕ) = 1−(ϕj−ϕi) = 1−[(τ + ϕ + εi)−τ].
Since ϕj (τ) = τ + ϕ + εi < 1, τ<h(ϕ) < 1−τ such that h: Ex5→Ex5∪Ex6.
EX6: ε ≥ 1–(τ + ϕ) & ϕ∈I2.
h(ϕ) = 1−(ϕj−ϕi) = 1−[(τ + ϕ + εi)−τ].
Since ϕj(τ) = τ + ϕ + εi = 1, h(ϕ) = τ such that h: Ex6→Ex6.
EX0: εϕ & ϕ∈I3.
h(ϕ) = 1−(ϕj−ϕi) = 1−[1−(1−ϕ)] = 1−ϕ.
Since 1−τ < ϕ ≤ 1, h(ϕ) < τ such that h: Ex0→I1.
In the linear PCOs coupling delay model, as the case distinctions needed for a comprehensive analysis of the time evolution of the system are very complex, we need to use the tabular form consistently. The related time steps are displayed along with the related oscillator phases. In the lines marked with an asterisk, the rationale for the upper limits of ε can be found.
Since there are stable excitation mappings in the phase tracking of EX5, as shown in Table 8, we will continue to track the phase in both phase changes until we find the regression mapping R(ϕ), and then obtain the synchronization conditional. It is very important to find its unique synchronization from unstable synchronization.
The phase tracking of EX5.
The return map R(ϕ) = ϕ + εi–εj is obtained, and the phase difference from the initial state is εi–εj, we obtain the synchronization condition can be found in EX5 as coupling strengths satisfying
If there is no coupling delay, under the required conditions εi≠εj, the two coupled oscillators can always achieve synchronization; more importantly, communication and interaction delays are unavoidable and have unfortunate effects on the accuracy of time synchronization. In order to obtain stable synchronization, we need to deeply analyze the oscillator dynamics of the synchronization process.
In practice, each biologically composed system must deal with many delays that seem to limit synchronization process. In the linear PCOs model with coupling delay, the nodes that reach the threshold cannot continuously interact with each other but exchange pulsed signals at certain times. First, we obtain the phase tracking results described above based on an analysis of the coupling strength of the interactions and the coupling delays, as well as the respective pulses of the three regions signal excitation on the phase state of the oscillator. Then, we judge the time of pulse signal excitation through the symbol Di, j(t) to obtain the respective h(ϕ). Finally, we combine these mappings and determine the long-term behavior of system dynamics changes (Figure 4).

State transition diagram of the oscillator system.
The activity of the system tends to be synchronized in-state shifts at different intervals if satisfying the synchronization condition. However, there are states EX0↔EX1 & EX2 in the dynamics diagram, if this state is a cycle without boundaries, then the system with delays cannot be synchronized. Therefore, we first track the phase of oscillators i and j with delays in the I3 interval, and then with the comparison of the phase changes without delays of the linear PCOs model. The phase of the two oscillators changes in a linear PCOs model without delay, after a complete pulse signal excitation, the firing map h(ϕ) and return map R(ϕ) of system S are obtained (Figure 5(a)). The phase of the two oscillators changes in a linear PCOs model with delay, after a complete pulse signal excitation, the firing map h(ϕ) delay and return map R(ϕ) delay of system S are obtained (Figure 5(b)).

Track the mapping of the two oscillators: (a) without delay and (b) with delay.
By contrast, we find that in the linear PCOs model, the delay causes the pulse signal leading to the emitted state to not stimulate the oscillator fast enough, and in the presence of the delay, the firing map is less εj
The return graph already passes through both delays τ. The pulse signal passes through the delay τ completely, so that the return graph is unchanged in the case
there is a fixed-point R(ϕ) = ϕ0 while satisfying the synchronization condition
Therefore, the fixed point of R(ϕ) is unique, and the system gradually tends to synchronize at the time when εi≠εj. We can observe that the cycle between the I3 & I2 interval EX0 ↔ EX1 & EX2 is bounded, the state transfer tends to change in the direction of the synchronous state.
Numerical simulations and analysis
In this section, we evaluate the proposed linear PCOs synchronization model with delay by simulations. We confirm the result of two oscillators and multiple oscillators synchronization with time delays by numerical tests. To evaluate and validate the model, we compared the synchronization period of different delays and the sizes of the network and then tested the model on a simulator for the sensor network.
Numerical examples of two oscillators synchronization with delay
To verify that the synchronization can be formed for the linear PCOs model and the theoretical results demonstrated in the preceding parts, we performed detailed numerical tests of the two oscillators synchronization with different delay events.
The synchronization results are shown in Figure 6. The network of two (N = 2) oscillators, whose initialize phase ϕi and ϕj (ϕi≠ϕj), with the coupling factor εi and εj (εi≠εj). The coupling delays τ were set to τ = 0.1 (Figure 6(a)), τ = 0.3 (Figure 6(b)), τ = 0.6 (Figure 6(c)), and τ = 0.9 (Figure 6(d)), respectively. From the results, we can clearly note that as the amount of time increases, the oscillators would gradually clump into synchronous firing groups. This state can always be maintained because it will eventually achieve synchronization.

Dynamics of the two oscillators phases ϕ(t) for different values of delay(τ): (a) N = 2, τ = 0.1, εi≠εj; (b) N = 2, τ = 0.3, εi≠εj; (c) N = 2, τ = 0.6, εi≠εj; and (d) N = 2, τ = 0.9, εi≠εj.
Implementation of multi-oscillators synchronization in a WSN simulation framework
WSNs consist of a few sensor nodes which are wireless. They are equivalent to a swarm of fireflies, using the PCOs guideline to drive accomplices into mating. We put forward the actual realization of the proposed model in the WSNs simulation framework to prove that the proposed multi-oscillators model is useful in solving the time synchronization problem in WSNs. The simulation was introduced in Sinalgo v.0.75.3,40,41 a platform for test and network validation, building built in Java, Eclipse, and JDK 1.6.
We construct a simple project of “pulseSync” in the sinalgo framework, where each sensor node behaves as an infinite, but delayed repeater of messages it receives. Whenever a node receives a pulse message, it starts a timer to forward the message. A timer is an entity that enables a node to schedule tasks in the future. When the task is due, the timer would notify the node and execute the assigned task. When the timer fires, the node selects its nearest neighbor node with the ID and forwards the message to this node. Then, the timer is reset, and the process is repeated forever. Message transmission delay is described as how long it takes before the message arrives. The delay is determined by the int value of the message and an increment value, specified in the config file. The parameters related to the simulation setup are shown in Table 9.
Initial settings of Sinalgo project.
The simulation is composed of the stage of initialization and the stage of simulation. In the simulation stage, it is assumed that the initial phases of 25 oscillators are generated at random at the initialization level, and it is ensured each oscillator is different from the others. The phase of simulation is divided into different cycles. In each cycle, the oscillator with the phase ϕ = 1 is found first, and other oscillators continue to linearly evolve to the firing state. After a period, the phases of the other oscillators are adjusted according to the pulse signal of the fired oscillator, which may contribute to the firing of oscillators. This process remains until no oscillator is fired in the current cycle. We can see from Figure 7 that all the fired oscillators are combined as one single oscillator. Therefore, the oscillators can complete synchronization when there is only one group left and this state can always be maintained.

Dynamics of the multi-oscillators phases ϕ(t), with N = 25, τ = 0.1, and εi≠εj.
Then, the evolution of the N = 25 oscillator phases versus the number of cycles is simulated. Each dash in the figure reflects the stage of oscillators in cycles number of the Equal Interval sampling round, and the results are shown in Figure 8. The sampling interval of Figure 8(a) is half a cycle, and the sampling interval of Figure 8(b) is a cycle. From the plot, we can see that as cycles proceed, the number of dashes decreases, and the dash in the figure reflects the stage of a specific oscillator or specific group of oscillators. The oscillators clump into groups gradually. Eventually, the oscillators complete synchronization when there is only one community remaining.

The phase of multi-oscillators (N = 25) varies with the cycles number: (a) half cycle; (b) a cycle.
Figure 9 displays the number of cycles needed for completing the synchronization process versus oscillators numbers for the initial stage difference ϕ and the coupling delay τ in three intervals I1, I2, and I3(in section “Mathematical analysis”), respectively. To minimize the effect of random characteristics of the ε, we conducted extensive numerical tests of the experiment. From the results, we can conclude that for a certain interval of the phase space (ϕ, τ), more cycles are needed to achieve the synchronization process as oscillators become more in number, since the nearest neighbor network needs more firing nodes and excitation coupling to achieve synchronization, and synchronization convergence speed is slow. In addition, at interval I1, the fixed value of ϕ requires the number of cycles needed to achieve synchronization required cycle than other intervals. This kind of observation is because more and more oscillators’ initial phase and the phase at a certain moment are smaller than the delay in the system. Multiple consecutive pulse signals of more nodes will appear in the delay interval at the same time and there is no guarantee that the phase difference will be reduced. Oscillators are difficult to gather in the synchronous firing groups.

Number of cycles needed to achieve synchronization versus oscillator numbers.
As a result, the nearest neighbor network requires more firing events and excitation coupling of nodes to achieve synchronization, in order to obtain the best synchronization results in the presence of delays, a good balance must be struck between the initial phase and delay.
Conclusion
In this article, we have studied the time synchronization with communication delay in the nearest neighbor network of distributed sensors, considering the influence factors of practical applications such as message delay, network topology, and computing power of sensor nodes, based on the linear PCOs model of synchronicity achieved by biological systems. In the networks of PCOs with delayed exciting coupling and phase monitoring of the system consisting of two oscillators, we track the development of phase differences between oscillators and discussed the synchronization condition with delay for the oscillator system. From the simulation results, we demonstrated that the system can be synchronized by practically implementing the proposed model in a WSN simulation framework from random initial phase distribution under linear state change functions and nearest neighbor communication. This study provides a new research idea for time synchronization in WSNs consisting of the nearest neighbor communication with delay.
Footnotes
Handling Editor: Dr Yanjiao Chen
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Natural Science Foundation of China under Grant 61761038, in part by the Inner Mongolia Science and Technology Plan Project of China under Grant 2019GG328, in part by the Basic Research Reinforcement Project under Grant 2019-JCJQ-JJ-412, and by the Inner Mongolia Natural Science Foundation of China under Grant 2020MS06027.
