# A System-Level Methodology for the Design of Reliable Low-Power Wireless Sensor Networks
## 2 Sensor Node Energy Model
### Analytical Energy Model
#### 2.3.1 Micro-Controller Unit (MCU)
By using the N6705A DC Power Analyzer from Agilent Technologies, multiple test instruments and external circuitry to analyze the energy requirements of the device under test (DUT) can be omitted. In addition, the \"Agilent 14585A Control and Analysis Software\" tool is used to control the Agilent N6705A for a better display and control over the equipment. After estimating the current consumption, an accurate estimation of the processing time is also required in order to evaluate the energy consumption. Metrics such as the million instructions per second (MIPS) are only an approximation as to how a set of processors' performances would vary, since different amounts of work can be done in one cycle for each processor. Even when using the same intellectual property (IP) core such as the ones provided by ARM, each MCU or system-on-chip (SoC) manufacturer has the freedom to decide whether or not to implement advanced features (e.g., memory accelerators, longer bus fetch widths, floating point unit (FPU)). Figure 4 shows the impact of the FPU on the execution time. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**MCU** & **Software** & **Measured Current (mA)** & **CM Current (mA)** & **Error (\%)** \\ \hline CC1310 & TI 15.4 stack & 3 & 2.88 & \(-4\) \\ CC2650/CC2640R2 & BLE stack & 2.825 & 2.938 & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Accurate current consumption estimation using CM. Figure 3: Current consumption profile of the CC1310 wireless MCU on the transmitter’s side. Figure 2: (a) Clear cable connections of the (b) current consumption measurement setup of the CC1310 wireless MCU while performing a point-to-point communication of an internal temperature sensor data and running the TI 15.4 network stack. Therefore, rapidly comparing the speed of different MCUs that are becoming more and more complex is not a trivial task. As the CM benchmark becomes an industry standard, the CM/MHz figure is increasingly provided in data sheets. It is judged to be accurate enough to estimate the time it takes different MCUs to process the same workload [53] using  
\[t_{PROCESS}=t_{PROC\_REF}\frac{f_{REF}\ S_{REF}}{f_{MCU}\ S_{MCU}}, \tag{1}\]  
where \(t_{proc\_ref}\) and \(S_{ref}\) are the reference time and reference CM score, respectively, extracted from the reference MCU. The values \(f_{MCU}\) and \(S_{MCU}\) are the operating frequency and CM score of the studied candidate MCU and \(f_{ref}\) is the reference operating frequency. It is important to note that the latter can be used when the execution time of the workload on a reference MCU is known. In addition to the aforementioned advantages, CM is judged to be a reliable benchmark because it ensures that compilers would not be able to pre-compute results to completely optimize the work away, unlike the Dhrystone benchmark [53]. Another important characteristic about CM is that results reporting is done following a standard format so they can be eventually certified by EEMBC. In Figure 4a, the STM32F070 RB Cortex-M0 MCU was used as a reference to estimate the processing time of running the room occupancy estimation algorithm [1] on the STM32F401 RE Cortex-M4 MCU and vice versa. Additionally, the STM32F051R8 Cortex-M0 MCU was used as a reference to estimate the processing time of the ECDSA cryptography algorithm for IoT applications [6] on the STM32F100 RB Cortex-M3 MCU and vice versa. For the four MCUs, the processing time is estimated with an error between 9.4% and 11.5%. Therefore, the estimates are judged to be accurate enough to help make high level decisions. For a better visualization of the data, in Figure 4b, 15,000 iterations of the Temperature-Dependent Kinetic Battery Model (T-KiBaM) algorithm [28], used in battery-powered WSN, are assumed to be running on the SAMG55 32-bit ARM Cortex-M4 MCU. The SAMR21G18A 32-bit ARM Cortex-M0+ MCU studied in [28] was used as a reference. However, when the FPU is enabled, the estimation is no longer acceptable for both MCUs, especially for the STM32F401 RE.