## 3 System Development
### Analysis Phase  
In the analysis phase, the main functionalities of the system are elicited, with the goal of driving the subsequent design choices and implementation technologies. In detail, the smart environments should expose the following functionalities:  
* **Warning and Notification**: Warnings about the operational status of UV-C lamps and ozone emission are critical to prevent accidental exposure. Therefore, to properly notify people that the area is undergoing ozonation, notifications should be sent through their smartphones. Similarly, alerts should be sent to the administrator when environmental conditions are unsuitable for a correct lamp operation or if it is nearing the end of its life or has failed, ensuring timely replacement and maintaining system effectiveness.
* **Video surveillance**: Once the treatment is started, it is important to avoid the presence of people in the room since ozone, if inhaled in significant quantities, can be harmful. Therefore, a video recognition system should be designed to make sure, in primis, people are not detected in the room while ozonation is taking place, and, hence, no pets.
* **Operational Efficiency and Automation**: Lamps' activation and deactivation can be dynamically performed according to the manufacturer's instructions so as to ensure continuous safe operation without manual intervention. For example, the system's operation can be optimized by adjusting settings in response to changing conditions: ozone dose can be the enforced or the exposure time extended according to current sensor data, or, conversely, ozonification interrupted if unsafe conditions are detected, or UV-C lamps and ozone generators shut down when they are not needed, thus saving energy. Finally, once the ozonation process is complete, ventilation of the  
Figure 1: System architecture.  
room should be initiated for the time needed to convert any remaining ozone back to oxygen.
* **Reliability and Maintenance**: UV-C lamps have a limited operational lifespan and may degrade over time, being sensitive to temperature, humidity, and pollutants. These can reduce the efficiency of the lamp, accelerating the degradation of the bulb or reducing the effectiveness of the lamp. Figure 2 presents the reliability of a typical UV-C lamp [27] over the operating time. In particular, the blue line shows that at 500 h and with an ambient temperature of 35 \({}^{\circ}\)C, 50% of the population will emit at least 45 mW (L75 means that the LED produced 75% of the initial UV-C output of 60 mW) while only 10% of devices (i.e., B10) emit less than 36 mW of their initial output, which is the L60B10 value. Hence, by monitoring environmental conditions, system administrators can ensure timely replacement and maintain system effectiveness so as to balance lifetime and effectiveness. Likewise, in the direction of predictive maintenance, trends in IoT data can be analyzed to predict when the system's components require maintenance or are likely to fail.
* **Logging and Storage**: For regulatory compliance and performance analysis, it is important to keep a record of all the operations. In particular, many industries have rigid rules about ozonification, thus log data ensure that the system remains compliant with health and safety regulations.