## 6 Conclusions  
A novel energy consumption model has been proposed for sensor nodes that deploy the synchronous duty-cycled MAC protocol named Priority Sink Access MAC (PSA-MAC) in heterogeneous IoT WSNs. The new methodology to determine the average energy consumed by SNs in a cycle considers all the operation modes in the entire operation cycle. The model is based on two 2D-DIMCs that define the evolution of the active sensor nodes of each class, as well as the number of packets in their queues. Their stationary probability distributions are used to derive, in a systematic and conceptually simple way, closed-form expressions that allow to determine the average energy consumed by the sensor nodes along an operating cycle.  
The model considers different classes of SNs, each with its own features and priority assignments, allowing the determination of the performance of complex heterogeneous WSNs. In addition, each class can independently support two packet transmission modes: the single _DATA_ packet transmissions (SPT), or the more sophisticated aggregate _DATA_ packet transmission (APT) mode.  
The model has been designed to be able to compute the energy consumed in every period of the cycle, the _sync_ (synchronization), _data_ and _sleep_ periods. In addition, the model considers _normal_ and _awake_ operating cycles. During a _normal_ cycle, an inactive sensor node will remain in the _sleep_ mode for the full duration of the cycle once the _sync_ period ends. However, at the end of a _sync_ period, active sensor nodes will start contending for access to the channel. After an active sensor node transmits a packet frame successfully, or as soon as it detects a collision, it will switch to the _sleep_ mode. An active sensor node also switches to the _sleep_ mode as soon as it detects that it has lost the contention. However, during _awake_ cycles, an SN, instead of switching to the _sleep_ mode, will remain awake until the end of the cycle to hear possible transmissions of _SYNC_ packets. The proposed model determines the average energy consumed by an SN in both _normal_ and _awake_ cycles.  
The accuracy of the proposed methodology to determine the average energy consumed by a sensor node in a cycle has been measured by comparing the results of the analytical model to those obtained by a customized discrete-event simulation program. The obtained results show that the approximate analytical model is very accurate.  
In its current form, the model only considers ideal channels, i.e., an error-free channel from the MAC perspective. In a future work, we plan to extend the model to support a more realistic error-prone channel. This will allow the model to take into account the impact of the MAC layer, as well as the impact of the physical layer on the network performance.  
Conceptualization, C.P. and J.M.-B.; methodology, C.P. and J.M.-B.; software, C.P. and J.M.-B.; validation, C.P.; formal analysis, C.P., J.M.-B., V.P. and V.C.-G.; investigation, C.P.; resources, J.M.-B., V.P. and V.C.-G.; writing--original draft preparation, C.P., J.M.-B.; supervision, J.M.-B., V.P. and V.C.-G.; funding acquisition, J.M.-B., V.P. and V.C.-G. All authors have read and agreed to the published version of the manuscript.  
This work was supported through Grant PID2021-123168 NB-I00, funded by MCIN/AEI, Spain/10.13039/ 501100011033 and the European Union A way of making Europe/ERDF, and Grant TED2021-131387B-I00, funded by MCIN/AEI, Spain/10.13039/501100011033 and the European Union NextGenerationEU/ RTRP. Canek Portillo was supported in part by Grant 2014-0870/001-001 (EuroinkaNet) and by Grant DSA/103.5/15/6629 (SEP-SES).  
Data Availability Statement: Data are contained within the article.  
The authors declare no conflicts of interest.