## 2 Related Work
### Fuzzy Logic and Load Balancing  
In this section, we provide an overview of previous studies conducted between 2018 and 2021 that leveraged the fuzzy logic system to enhance decision making in their respective approaches. These studies have been compiled to showcase the efficacy of employing fuzzy logic in making accurate decisions pertaining to task scheduling and load balancing in IoT systems. [PERSON] et al., 2021 [PERSON] et al. (2021) proposed a fuzzy logic algorithm called real-time task scheduling (FLRTS) to enhance the execution of the tasks of IoT applications at the Fog layer. The algorithm works as a filter to divide the tasks into two categories: Fog group and Cloud group, to select the environment to execute data to either the Fog or the Cloud. Furthermore, the algorithm works inside the Fog broker at the Fog layer for the purpose of classification. The algorithm incorporates five inputs: CPU utilization, storage utilization, bandwidth utilization, task deadline, and network latency, to determine the optimal execution environment for data, whether it should be processed in the Fog or the Cloud. To evaluate the proposed algorithm, the IFogSim simulator, a Java-based simulation toolkit, was employed. The simulation results showed that the proposed approach outperforms the existing algorithms first in first out (FIFO) and short job first (SJF) scheduling algorithms and real-time task processing (RTP) in terms of makespan, delay, success ratio, and average turnaround time. To achieve improved response time and decision making, it is crucial for the filtering process to be situated closer to IoT sensors rather than at the Fog layer. Filtering should ideally take place at an early stage, and in our perspective, the Mist layer is the most suitable for task filtering since it is the layer closest to the Edge layer (which represents the sensors layer). [PERSON] et al., 2020 [PERSON] et al., 2020 [PERSON] et al., 2020 [PERSON] et al., 2020 proposed a user categorization using a fuzzy logic (UCFL) algorithm to improve the overall performance of IoT networks. The framework consists of three layers: the second layer (Fog devices) works as a chine to allow the first layer (users) to collect data from the third layer (sensor nodes). Due to the power constraints in the IoT network, the sensor nodes are not involved in the authentication process to save power. Instead, only nodes with higher capacity, specifically the Fog nodes in this framework, are engaged in the authentication process. The algorithm takes into account three inputs: user experience, user knowledge, and user recommendation, to generate an output that classifies users into three categories: high-trusted, medium-trusted, and low-trusted. This classification plays a crucial role in reducing the number of authentication phases required. High-trusted users do not require authentication phases as they have high experience, knowledge and recommendation, while medium-trusted users only require one phase of authentication. On the other hand, low-trusted users require two phases of authentication as they have low experience, knowledge, and recommendation. To evaluate the proposed algorithm, a Raspberry Pi was employed as a user, while a laptop served as a Fog node to facilitate the communication process. The simulation results clearly demonstrated that the proposed approach outperformed other algorithms such as CoAP-Micro, CoAPBlip, and HTTP/UDP in key metrics including handshake duration, memory consumption, average response time, and computation cost. In the UCFL framework, the authors achieved performance improvements by reducing certain users' authentication processes and adjusting security levels. However, it is important to note that from our perspective, enhancing network performance should not compromise the system's security, either directly or indirectly. In their work, [PERSON] et al. (2021) [PERSON] et al. (2021) [PERSON] et al.