## 2 IoTMADLab and Methodology  
### The IoTMADLab  
The IoTMADLab is joint initiative between the Madrid city Council (through the Digital Office) and the Universidad Politecnica de Madrid (through the research center CEDINT), aimed at defining a standardized IoT network model that is open, neutral, and interoperable to facilitate the direct connection between devices (equipment, sensors, and actuators) from different manufacturers and services [30]. It serves as a platform for research, development, and innovation in the field of the Internet of Things (IoT) technology, particularly focused on applications for smart cities. Collaborating closely with the technicians from the different municipal services, service awarded companies, and their respective technological providers, the aim is to define a reference architecture to establish a framework that allows cities to implement and use IoT technology efficiently and effectively while ensuring consistency and interoperability among different devices and systems.  
The IoTMADLab facilities are divided into three areas: the IoT Laboratory, the Controlled Environment, and Virtual Reality Laboratory.  
* IoT Laboratory: an indoor laboratory equipped with measurement and testing equipment and data representation interfaces. It is where the compatibility, interoperability, and cybersecurity IoT devices and sensors are tested. Compatibility certification requires that the devices fulfill the requirements of the specific municipal service and comply with the communication protocols from the IoTMADLab IoT network reference architecture. Interoperability certification, which demands compiling with the data model, may be achieved at different degrees (depending on the communication protocol. For both certifications, minimum cybersecurity requirements must be met.
* Controlled Environment: an outdoor replica of the urban environment, integrating operational city elements such as streetlights, waste containers, parking lots, and green areas. Once the equipment has been validated in the laboratory, it is deployed and tested in a controlled yet real-world environment. In this area, the devices are exposed to variables and conditions they might encounter in actual urban situations, allowing for monitoring and evaluation of their performance in a more genuine setting. This ensures that issues, incompatibilities, or unforeseen challenges can be identified and resolved before the devices are deployed in an operational urban setting. The impact of interoperability across municipal services is closely examined.
* Virtual Reality laboratory: a facility equipped with the most advanced XR hardware and software for the design and development of pioneering solutions that address complex problems and technological challenges across various disciplines. It specializes in creating immersive VR experiences, being the creation of the digital twin for the IoTMADLab. This initiative seeks to construct an interactive virtual counterpart of the laboratory, utilizing Virtual Reality to achieve precise representation, visualization, and interaction within both tangible and digital domains. To achieve its goal, developers undergo a detailed development process encompassing several key stages: 3D modeling, realistic texturing, and integrating communication protocols with IoTplatforms. The design of user interactions is carefully considered to provide intuitive and engaging experiences.