# CoSiWiNeT: A Clock Synchronization Algorithm for Wide Area IIoT Network
## 6 Conclusions  
Clock synchronization for distributed sites using WAN is essential for realizing emerging automation applications based on remote monitoring and control of factory sites. GPS and PTP can be prominent hardware-based solutions to achieve accurate clock synchronization; however their use is challenged by cost, unavailability of continuous GPS signals due to environment, and hardware failure modes. As the existing software-based solution, NTP overcomes these challenges but lacks in accuracy, for WAN a scalable, software-based clock synchronization algorithm called CoSiWiNeT was proposed. The new algorithm's  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithm** & **Mean** & **Std Dev** \\ \hline KF & 6.23 & 6.78 \\ \hline LS & 32.02 & 0.02 \\ \hline CoSiWiNeT & 18,400 & 20,000 \\ \hline NTP & 61.53 & 55.31 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of synchronization algorithms using execution time (us).  
performance was evaluated by means of simulation based on parameters, predicted clock offset, frequency offset, offset error, and execution time. Based on the first three parameters, the evaluation shows that the CoSiWiNeT algorithm matches well NTP and state-of-the-art method based on Kalman filter in a good network environment, but performs better by 41% and 40%, respectively, in fair and deteriorating network conditions. The downside of the CoSiWiNeT algorithm is comparatively higher execution time. However, for a polling rate of 1 \(s\), this execution time is fast enough to predict offset before the next sample measurement. Furthermore, the algorithm can successfully deal with offset changes due to step changes in RTD and multiple errors in timing messages due to network deterioration, improving system reliability and safety.  
Having evaluated the functional performance of CoSiWiNeT in terms of accuracy and precision, as a future step, the other aspects such as availability, scalability on different hardware platforms, and performance in distributed topology comprising multiple master or server devices can be studied further. In clock synchronization systems, the devices, as well as the synchronization related communication messages are prone to security incidents and thus security issues can be investigated for identifying effective measures.  
Conceptualization, R.N.G., E.L., J.A. and M.B.; Funding acquisition, J.A. and M.B.; Investigation, R.N.G., E.L., J.A. and M.B.; Methodology, M.B.; Project administration, J.A.; Supervision, E.L., J.A. and M.B.; Writing--original draft, R.N.G.; Writing--review and editing, R.N.G., E.L., J.A. and M.B. All authors have read and agreed to the published version of the manuscript.  
This work has been financed by the Future Industrial Networks (FIN) project, grant number 2018-02196 within the strategic innovation program for process industrial IT and automation, PiiA, and PiiA Research Etapp II, a joint program by Vinnova, Formas and Energimyndigheten.  
Not applicable.  
Data Availability StatementData is contained within the article.  
The authors declare no conflict of interest.