# A TDD Framework for Automated Monitoring in Internet of Things with Machine Learning +
## 2 Related Work
In [15], a routing protocol for the IoT (RIoT) was presented with an aim to overcome the problems associated with routing protocol for low-power and lossy networks (RPL) for a better IoT ecosystem. They also presented a communication architecture based on multiple gateways. The testbed results demonstrate that due to RIoT's lower control message overhead it exhibits better performance in terms of packet delivery ratio (PDR) and per-packet end-to-end delay compared to the RPL-based protocol. They showed that network partitioning is a major problem in mobility-based IoT use cases, and the impact of the problem on a network performance can be reduced using multiple gateways in the network. The proposal in [16] is to use the MAPE-K framework (monitoring, analyze, plan, and execute with knowledge base), applied to a BPM system to operate an IOT environment capable of monitoring itself in cycles and verifying its own functioning and its own quality, if the tasks are being carried out in the best way possible. Researchers in [17] presented an alternative to improve the data transmission validation process in a previously developed WSN-IoT system. They implemented the test-driven development methodology (TDD) for the build out of validation application algorithms. As a result, they developed validation application that captures and analyzes data frames, in addition, compares the values of the monitored variable in each layer of the implemented model. Furthermore, the development reports the errors detected in the data transmission. As limitations of this work, they cite the high dependence on networks to monitor the performance of the designed application. In [18], the researchers described the Open-Multinet (OMN) framework, which allows the extraction of underlying information from tree-based data structures. Additionally, they developed a set of ontologies to support resource management in federated and distributed computing infrastructures. Users can query OMN information that represents the resources available in the underlying infrastructures and match them with their own computational requirements. The time needed to find matching resources in more complex queries are acceptable to end-users. A mathematical model to represent a system in aggressive cyberspace is presented in [19], and it supported a simulation of a system considering its efficiency of operation, operation risk, and the resources invested in cybersecurity measures. The authors of [20] propose the functional safety estimate of a cyber-physical system using a Markov model. It is relevant because the assessment of functional safety is one of the primary tasks both at the design stage and at the stage of operation of critical infrastructure, in which IoT systems could be deployed. Regarding IoT systems development, some application fields are vehicular networks (e.g., delay-tolerant networks for IoT-based vehicular networks are proposed in [21]) and smart homes (e.g., a smart home based on Bluetooth is proposed in [22]). One case study presented in this paper is also in the smart home scenario. Table 1 summarizes the related work. We realized that some of the related work carried out experiments in testbeds with real hardware devices but none of them used machine  
learning (ML), which motivates the TDD approach with machine learning proposed and validated with two study cases.