# Adaptive Data Synchronization Algorithm for IoT-Oriented Low-Power Wide-Area Networks
## 4 Adaptive File Synchronization
### On Double Signature Efficiency
It is worth highlighting that this procedure is exactly the same as performed by the cloud in the original _rsync_ framework. In that case, the cloud generates the new signatures lists on its updated file \(F_{C,t}\), entailing that \(F_{C,t}\) has become equal to \(F_{DIoT,t}\). Therefore, the sets \(\mathcal{R}\) and \(\mathcal{S}\) calculated by the cloud on \(F_{C,t}\) will be the same ones computable from \(F_{DIoT,t}\) at DIoT side. The proposed reference signatures self-generation approach avoids the cloud to spend data traffic to transmit \(\mathcal{R}\) and \(\mathcal{S}\), but it also provides energy saving as explained in the next section. On the other hand, it requires a further computational effort from the DIoT that can however be considered as negligible since the device's power consumption mainly concerns data transmission and reception mechanisms. Finally, it is worth noting that the downlink communication from the cloud to the DIoT is significantly reduced but not completely cut. In fact, the signature lists transmission from the cloud remains available and acts as a sort of reset when unexpected events, such as DIoT formatting, malfunctions, or failed updates, occur, compromising the DIoT-cloud connection. ## 5 Power Consumption Analysis

In general, power consumption is not considered a critical issue for the cloud since it is referred to as an actively powered entity (as a data center is). On the other hand, energy saving is fundamental for IoT devices that are typically battery supplied, to support mobility. Following the model given in [34], the total energy consumption for IoT devices can be derived as the sum of four components:

\[\mathcal{E}_{tot}=\mathcal{E}_{tx}+\mathcal{E}_{rx}+\mathcal{E}_{prc}+\mathcal{ E}_{sys} \tag{7}\]

where \(\mathcal{E}_{tx}\) refers to data communication, \(\mathcal{E}_{rx}\) to sensing and data reception, \(\mathcal{E}_{prc}\) to the processing and \(\mathcal{E}_{sys}\) to the other minor functionalities of the considered device. However, by assuming \(\mathcal{E}_{sys}\) is negligible and considering \(\mathcal{E}_{prc}\) as included in data transmission and reception processes, it is possible to recast Equation (7) in the classic energy consumption models developed for Wireless Sensor Networks (WSNs):

\[\mathcal{E}_{tot}=\mathcal{E}_{tx}+\mathcal{E}_{rx}=P_{tx}\frac{D_{s}}{v_{UL} }+P_{rx}\frac{D_{r}}{v_{DL}} \tag{8}\]

with the total energy consumption of DIoT being described as a function of their transmission and reception activity [35; 36]. Specifically, the transmit power \(P_{tx}\) takes into account the energy spent to run the electronic hardware (mainly related to the digital-to-analog signal conversion and power amplification), while the received power \(P_{rx}\) is defined by the energy employed for maintaining the device in active mode and processing the received signals [37]. \(v_{DL}\) and \(v_{UL}\) refer to the download and upload data rate, respectively. Finally, \(D_{s}\) and \(D_{r}\) represent the data volume to send and receive. In particular, considering Equation (8) in the context of data synchronization returns \(D_{s}\) as the \(\Delta\) containing the information transmitted from the DIoT to the cloud for its update, and \(D_{r}\) as the reference information (that is the signatures lists) sent by the cloud to let the DIoT perform its file processing and \(\Delta\) generation. The parameters \(P_{tx}\), \(P_{rx}\), \(v_{DL}\) and \(v_{UL}\) are instead specific to the employed technology, therefore not dependent of the data synchronization mechanism. As an additional comment, it is worth noting that the implementation of AC-_diff_ and AH-_diff_ algorithms in a communication framework with reduced cloud-to-DIoT transmission such as one proposed in the previous section returns the following benefits. First, the optimization of \(\Delta\), that is \(D_{s}\), implies the optimization of \(\mathcal{E}_{tx}\).