# Wireless Sensor Network Energy Model and Its Use in the Optimization of Routing Protocols
## 3 Analysis and Results under the Simulation Tool
### Experimental Scenario  
To validate the tests done by the simulator, we intended to recreate a scenario with real sensors on the university campus of the Universidad Panamericana in Guadalajara, Mexico. We considered an area of 300 \(\times\) 300 m\({}^{2}\) surrounded by a two-story building, a green area, living rooms, and free area with a terrace, as shown in Figure 14.  
Figure 15 shows the top view of the engineering building at the university campus and the location of the sensors in this building. This plan helps to better visualize the walls and the specifications of the construction to give a better idea of the traffic routes of people, location of computer equipment, lights, etc. There is a Gateway with LoRa technology and WiFi, which is the general hub of all the nodes. This Gateway receives data from all devices and sends the information to a platform called the things network. The devices that are held as nodes are divided into three technologies: Bluetooth, LoRa, and Zigbee. Zigbee nodes are a set of high-level wireless communication protocols, based on the IEEE 802.15.4 standard, i.e., communication using the 2.4 GHz frequency. The CC2530 device is configured as the coordinator; its main function is to create the network in mesh topology. The other four devices can be connected to the network and have communication between them, allowing the possibility to have devices withdrawn from the coordinator because the information packet passes through the other \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**TIME (s)** & & & \% & \multicolumn{2}{c}{**PDR**} & \\ \hline  & **AODV** & **DSR** & **LEACH** & **PEGASIS** & **MPH** & **ZTR** \\ \hline
10 & 72 & 73 & 92 & 93 & 98 & 93 \\
20 & 81 & 84 & 90 & 93 & 98 & 89 \\
30 & 92 & 91 & 91 & 94 & 98 & 89 \\
40 & 97 & 97 & 91 & 93 & 98 & 90 \\
50 & 93 & 91 & 92 & 94 & 96 & 91 \\
60 & 83 & 84 & 93 & 95 & 97 & 91 \\
70 & 86 & 86 & 93 & 93 & 99 & 91 \\
80 & 93 & 93 & 90 & 93 & 98 & 90 \\
90 & 96 & 97 & 90 & 93 & 96 & 89 \\
100 & 92 & 93 & 90 & 94 & 98 & 91 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Percentage of Packet Delivery Ratio (PDR). \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**PTR (kbps)** & & & **Total** & **Energy (J)** & \\ \hline  & **AODV** & **DSR** & **LEACH** & **PEGASIS** & **MPH** & **ZTR** \\ \hline
50 & 33.4 & 31.3 & 20.4 & 20.1 & 21.1 & 20.2 \\
100 & 35.4 & 34.7 & 23.8 & 24.3 & 25.4 & 23.1 \\
150 & 42.3 & 41.5 & 30.4 & 27.4 & 32.5 & 31.2 \\
200 & 44.6 & 43.2 & 32.1 & 30.2 & 34.2 & 34.5 \\
250 & 45.8 & 43.  
devices to the coordinator. Each of the devices contains a temperature sensor, allowing measuring the ambient temperature in different locations of the university campus. The coordinator sends a signal to know which devices are connected to the network and in turn, these send their temperatures every 5 min. After obtaining all data, the coordinator sends the information through another protocol called LoRa to the Gateway. Figure 14: The test area at Universidad Panamericana (Mexico). Figure 15: Top view of the test area (engineering building at Universidad Panamericana, Mexico). For LoRa nodes, LPWAN is a specification for low power and wide area networks designed specifically for low power consumption devices operating in local, regional, national, or global networks. In Mexico, LoRa uses the 915 MHz frequency. The topology of LoRa is point-to-point; there is a gateway or hub and one or more nodes. The Gateway is in charge of reading all the packets that are on that frequency. The nodes are devices that transmit small information frames to avoid high-energy consumption. The created network consists of five different devices: garbage sensor, light sensor, accelerometer sensor, gyroscope sensor, and environmental sensor. The Gateway is the device that acts as connection interface between devices and allows resource sharing between two or more computers. The Gateway used contains the LoRa and WiFi protocols.