## 6 Performance Analysis
### Energy Performance  
The SN's energy performance is one of the first parameters to measure the SN's life in the field and the lifetime of the WSN. The SN has three main components for measuring energy consumption: the MCU, the LoRa module, and the sensors. Irrespective of the components used, the total power consumption of the SN varies at the different events performed by the SN. These events mainly depend on the software algorithm and transmission time required for the protocol used. The events used  
Figure 10: WQM parameters (**a**) pH and turbidity from two different SNs, (**b**) Temperature, humidity, pressure, and uncalibrated total volatile organic compound measure (TVOC) from different SNs. to measure the SN's energy performance are startup-mode (the MCU is initializing), active mode (the MCU is running the normal functions such as housekeeping and sensor reading), sleep mode (the MCU is not running, and only the RTC (Real Time Clock) and sensor are functional), LoRa data receive mode, and LoRa transmission mode. We use a DC energy measuring unit and log the data to monitor the input voltage, current, and power consumption of the SN, at a resolution of 1 mV and 1 mA. The voltage is measured at the input of the sensor node as shown in Figure 8a and after the DC-DC converter. The DC-DC converter efficiency is considered to be 85% to calculate the lifetime of a node with the power supply used. The SN is configured to transmit data at three-second intervals to measure the energy consumption of the SN at different events, and the MCU operates at 16 MHz without any sleep mode. In the beginning, the MCU is re-started to begin the initialization event; it then moves to the active mode followed by the LoRa reception and transmission activities. The entire event's duration and power requirement are measured using an energy meter and data logger. Table 5 summarizes the event duration, voltage, current, power, and energy consumption, including energy consumption for a complete cycle. In this experiment, LoRa transmission time is kept close to the TOA\({}_{\text{max}}\) by using a data packet size of 165 bytes. For the field operation with a data transfer interval of 15 min, the MCU can be in sleep mode most of the time other than when it is active, and during LoRa transmission events. In this configuration, the LoRa transmission channel utilization was calculated as only 0.015%, which is very low compared with the LoRaWAN channel utilization ratios of 0.1% and 1.0%. Therefore, using LoRaPHY can increase the LoRa channel capacity, and hence, can accommodate more SNs in a specific WSN. SN lifetime using three 18,650 Li-Ion battery of 3.6 V and 6000 mAh, can be calculated as 681 days, which is a rough estimate and may depend on the working temperature of the sensor node itself. The overall energy efficiency of the WSN using the proposed LDAP can easily be calculated using Equation (11). One method to measure the energy efficiency of a specific WSN algorithm or protocol is to express it in terms of the ratio of the energy required without implementing that algorithm or protocol and the total WSN energy required with the algorithm or protocol implemented. As the energy required for the algorithm or protocol is highly dependent on the method of implementation (software algorithm or methodology), the energy efficiency of the LDAP is not comparable with other routing protocols or algorithms using their proposed implementation. However, a comparison in terms of the energy efficiency is shown in Table 1 based on the general concept and Equation (11), where k is calculated using the number of hops (h) and the data relay factor (\(\mu\)), as shown in Equation (13). \[\text{k}\ =\ \mu\bigg{\{}\frac{h}{2}(h+1)\bigg{\}} \tag{13}\]  
Figure 11: (**a**) Data loss at different RSSIs and SNRs, (**b**) RSSI and (**c**) RSSI changes with the distance between the SN and DS. Therefore, k is highly dependent on u, which is highly dependent on the WSN topology used, and u is variable over the whole WSN.