# A Survey of Secure Time Synchronization
## 5 Discussions for Future Work  
The survey results have shown that almost all the current time synchronization protocols have synchronization errors, and those errors are exposed for some of the popular protocols. The LTS protocol is not suitable to provide high precision because its accuracy is reduced towards the depth of the tree, whereas the FTSP provides high precision and high robustness against node failure and topology changes. However, the FTSP requires high energy consumption and computational resources (which is limited for sensor nodes) as it is not a software-based protocol. The RBS protocol involves a large number of message exchanges to provide high precision which increases energy consumption, and therefore costs. The TPSN achieves accuracy of ten microseconds which depends on the growth of offset affected by the propagation time. Although a nondeterministic delay caused by propagation is limited in these protocols compared to the precision that is achievable, in order to meet specific precision every protocol needs to send and receive packets. Sending and receiving packets consume most of the energy during network synchronization. The energy consumption of a network can be reduced by reducing the number of packets exchanges. For future work, these errors should be improved to achieve better results from these protocols. The TPSN is a widely used protocol which can achieve high accuracy and energy efficiency; however, its accuracy decreases due to a change in the tree structure because of conflicts that occur during the communication of change messages which results in delays, message loss, as well as increased energy consumption. For example, Nodes A and B want to connect with Node C which is a common neighbor of Nodes A and B. Conflict can occur while sending synchronization packets to Node C which is an important factor that affects accuracy. In Figure 13, Node A sends a synchronization packet to Node C to perform synchronization. Normally, the TPSN assumes that delays between messages are small and can be omitted as zero, and therefore, delay is calculated as follows while ignoring the errors brought by clock bias represented by \(\sum 1\) and \(\sum 2\). \(T_{1}\), \(T_{2}\), \(T_{3}\), and \(T_{4}\) are timestamps. \[d=\frac{(T_{2}-T_{1})+(T_{4}-T_{3})}{2} \tag{15}\]However, when a conflict accrues delays over tens of seconds, it is not acceptable in a wireless sensor network, and therefore, these errors need to be considered and cannot be omitted. To calculate the exact delay of the message, we need to rewrite the above equation in the following way:  
\[d=\frac{(T_{2}-T_{1})+(T_{4}-T_{3})-(\sum 1+\sum 2)}{2} \tag{16}\]  
In the case of conflict, one node has to wait until the other node finishes synchronization which causes delays and reduces accuracy. It is important to reduce conflicts in order to achieve high accuracy and reduce energy consumption. In addition, the performance of the TPSN depends on efficiency of hierarchical structure (Figure 14). However, in the TPSN, the authors have used simple flooding for level discovery to reduce complexity and energy consumption. Thus, in the TPSN tree structure, when the number of levels increases, the local clock offset difference also increases. The TPSN tree is constructed in following way:  
\[N(m)=n(E)+2(n(T)-1)=2\times n(T)+n(E)-2 \tag{17}\]  
where \(N(m)\) is the number of total messages exchanged to provide synchronization, \(n(E)\) is the number of elements in a set of parent nodes at a tree, and \(n(T)\) is the total number of nodes in a tree. Since the TPSN synchronizes using two message exchanges, it requires as many transmissions as there are nodes in the network. The energy consumption of WSNs depends on these transmissions. To make sure we do not miss any communication messages and to minimize complexity, it is necessary to avoid conflicts during communication messages, and nodes can be organized inside a cluster hierarchy.