## 6 Methodology and Experimental Setup  
In this section, we focus on the HAN part of the smart grid. This part consists of IEEE 802.15.4/ZigBee smart sensors that embedded in different types of home appliances. These sensors operate based on MicaZ platform [69]. The characteristics of MicaZ platform are summarized in Table 8 [70]. The MicaZ platform is a good choice for the smart grid because it operates with low power consumption, works on the license-free band (ISM band), and covers up to 30 m of home or building area. However, this platform has limited energy resource, which operates based on 2\(\times\) AA batteries. The misuse of the devices will deplete the battery power and decrease the node lifetime. On the other hand, the network delay will be increased with an increasing number of smart meters in HANs, especially in crowded cities. Therefore, if the delay increases, the number of dropped packets will be increased and retransmitting the dropped packets will consume more power and time. Therefore, we used four algorithms namely, the MOSFET, OMOPSO, NSGA-II, and SPEA2 algorithms, to maximize both the network energy efficiency and network throughput; in particular we use these algorithms to minimize both the network end-to-end delay and end-to-end latency. We assume that the smart home consists of four sensors embedded in four appliances such as a smart refrigerator, smart light and air conditioner controller, smart washing machine and smart TV. These sensors operate over the 2.4 GHz ISM band to communicate with a smart home gateway that is integrated with the smart meter using a star topology. The proposed network is depicted in Figure 4. These sensors consume 8 mA in start-up mode and 19.7 mA when the sensor is in communication mode [70]. 802.15.4/ZigBee can support a low sampling rate from 0 to 250 Hz [71]. This can satisfy the requirements of the smart grid. The BER in normal status has a value of 0.0004 [72]. By knowing these values and the other values such as the IEEE 802.15.4 physical and MAC headers, we can measure the objective functions (Equations from (8) to (19)). We focused on minimizing both the network end-to-end delay and end-to-end latency and also maximizing both network energy efficiency and packet throughput by changing the packet payload size. Packet payload size plays a significant role in \begin{table}
\begin{tabular}{c c c} \hline \hline
**Features** & **Value** & **Remarks** \\ \hline Frequency band & 2.4 GHz band & License-free band (ISM band) \\ Data rate & 250 kbps & - \\ EEPROM & 4K bytes & - \\ Operating system & TinyOS & Open-source \\ Battery & 2\(\times\) AA batteries & Attached pack \\ Energy consumption in startup mode & 8 mA & - \\ Energy consumption in communication mode & 19.7 mA & - \\ User interface & 3 LEDs & Red, green and yellow \\ Indoor range & 20 m to 30 m & 1/2 wave dipole antenna \\ Outdoor range & 75 m to 100 m & 1/2 wave dipole antenna \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Features of MicaZ platform [70]. determining the optimal value of these features, which if the packet payload size increases, the network delay will be increased and the energy efficiency will be decreased. We compile the JMetal 4.5 tool in NetBeans IDE 8.0.2 by using the Java version. The test environment is a 3 GB RAM, Intel dual-core CPU-T3200, running Windows 7. Table 9 summarizes the parameters of all the optimization algorithms that are used in this study. Most of these parameters and settings are assigned as recommended in [15; 53]. On the other hand, Table 10 summarizes the parameters needed to evaluate the network modelling part. The procedure of maximizing both network energy efficiency and packet throughput, and minimizing both the network end-to-end delay and end-to-end latency are summarized for each algorithm in Figures 5-8. The procedure of OMOPSO, summarized in Figure 5, begins by initializing the parameter of packet payload size that varies from 0 to 114 bytes based on the IEEE 802.15.4 data frame.