# Energy-Efficient IoT-Based Light Control System in Smart Indoor Agriculture
## 5 Results and Discussion
### Simulation Setup  
Simulations were carried out on the network emulator Contiki-NG (next generation), which is an open-source, IoT simulation platform for severely constrained wireless devices. Contiki-NG facilitates the implementation, prototyping, and the evaluation of IoT research works. It reduces the development time of IoT products and allows one to teach IoT systems based on its platform [68]. The main reasons for selecting Contiki-NG are the variety of its new features like the data structure manipulation libraries and the network evaluation tools. The simulations were performed under the conditions listed in Table 1.  
The proposed 6 loWPAN network consists of 10 to 60 nodes in which client nodes are distributed in a grid topology with equal distances between the nodes in each direction, whereas the root of the network is located on the side of the grid. Figure 4 shows the nodes' positions as they are supposed to be in the indoor farming facility. The server node is the first node in the network (green color), and the remaining nodes (yellow color) are the clients. Each client node is responsible for controlling the growth conditions--more specifically lighting--in a growth chamber, so the number of nodes represents the number of the growth chambers, and the size of the indoor farming facility can be estimated based on it.  
The nodes used in the simulation are the Zolertia Z1 motes ([[https://github.com/contiki-os/contiki/wiki/Zolertia-z1-motes](https://github.com/contiki-os/contiki/wiki/Zolertia-z1-motes)]([https://github.com/contiki-os/contiki/wiki/Zolertia-z1-motes](https://github.com/contiki-os/contiki/wiki/Zolertia-z1-motes)) (accessed on 20 March 2023)) generally used in WSN. They are equipped with the second generation of Texas Instruments' MSP430F2617 low-power and efficient microcontroller ([[https://www.ti.com/product/MSP430F2617](https://www.ti.com/product/MSP430F2617)]([https://www.ti.com/product/MSP430F2617](https://www.ti.com/product/MSP430F2617)) (accessed on 20 March 2023)) containing a 16-bit RISC CPU functioning at 16 MHz clock  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Operating system/simulator & Contiki-NG \\ \hline MAC layer & IEEE 802.14.5 \\ \hline Network type/addressing scheme & 6 LoWPAN/IPv6 \\ \hline Transport & UDP \\ \hline Radio medium model & Unit disk graph medium (UDGM): distance loss \\ \hline Area & \(100\times 100\), \(\ldots\), \(300\times 300\) m\({}^{2}\) \\ \hline Number of nodes & \(10\), \(\ldots\), \(60\) \\ \hline Simulation time & 5,000,000 ms \\ \hline Objectives functions & OF0, MRHOF (ETX, Energy) \\ \hline Transmit/receive ratio & TX = 100\%, RX = 100\% \\ \hline Transmission range & 50 m \\ \hline Interference range & 100 m \\ \hline Topology & Grid, multipoint-to-point \\  & point-to-point \\ \hline Nodes type & Zolertia Z1 \\ \hline Packet sending rate (from clients) & 1 packet/s \\ \hline \hline \end{tabular}
\end{table}
Table 1: Network simulation conditions.  
speed, a built-in clock, an 8 KB RAM, and a 92 KB Flash memory. They are also equipped with the CC2420 transceiver, which operates at 2.4 GHz and has a data rate of 250 Kbps.