# CoSiWiNeT: A Clock Synchronization Algorithm for Wide Area IIoT Network
## 2 Related Work  
Performance of software-based clock synchronization in terms of accuracy and precision fails to match their hardware-based counterparts due to device-level inaccuracies and unpredictable network conditions. Many methods have been described in the literature focusing on the performance improvement of software-based clock synchronization.  
A large section of literature lists clock synchronization methods for wireless sensor networks divided into centralized and distributed synchronization. The centralized category uses the receiver-to-receiver principle, where one reference sender broadcasts packets and synchronizes a group of receivers with each other. They include Reference Broadcast Synchronization (RBS) described by [PERSON] et al. [9] and [PERSON] et al. [10] and Flooding Time Synchronization Protocol (FTSP) outlined by PulseSync [11] and several other works [12; 13]. In contrast to centralized approaches, distributed time synchronization protocols rely on consensus algorithms to coordinate independent clocks in the network. They include Gradient Time Synchronization Protocol (GTSP) proposed by [PERSON] et al [14] and Average TimeSynch (ATS) described by [PERSON] et al [15]. [PERSON] et al [16] present a methodology and a tool to choose an adequate time-synchronization strategy for wireless IoT end devices. [PERSON] et al [17] proposed low-energy algorithms to converge the clocks of wireless sensor nodes quickly. More explicitly in the IoT domain, [PERSON] et al. describe the CheepSync time synchronization protocol [18] for Bluetooth Low Energy (BLE) platforms. [PERSON] et al. [19] developed a synchronization system, including a lightweight client, a new packet exchange protocol called SPoT. In another work, [PERSON] et al. [20] proposed a lightweight clock synchronization algorithm called CoSiNeT for IIoT field devices. Recently, low-power Bluetooth or Wi-Fi beacons [21] have been proposed for synchronizing all the nodes of the network. All the above-listed methods are suitable for LANs where the field devices, e.g., temperature and pressure sensors, actuators, and low-end controllers, are resource-constrained and require a lightweight clock synchronization method in terms of memory and computation power.  
In the case of WAN, remote systems that need to be synchronized are typically not resource-constrained in terms of computation power and memory. The higher noise and interference levels in WAN result in higher PDV compared to field IoT LANs. To deal with higher PDV, a computationally heavy clock synchronization algorithm can be realized for WAN. Several methods [22; 23; 24; 25; 26] have been proposed that extensively use the Kalman filter-based clock filter algorithm to estimate the server clock state (phase and frequency) from time offset measurements. The Kalman filter is ideal for random Gaussian errors in offset; however, it is sensitive towards packet delay outliers and occasional large spikes in offset. [PERSON] et al. [27] proposed a digital-twin-enabled model-based scheme to achieve clock synchronization in IIoT environments. The success of this scheme depends on accurate clock modeling so that its behavior under dynamic operating environments is predictable. A batch least square (LS) based estimator to minimize the clock skew has been described by many works [28; 29; 30]. However, in LS, when the skew changes as a result of the ignored frequency drift term, its time offset estimates quickly deviate from the true values.