## 5 Case Study
### Preliminary Analyses: Sensors Spatial Distribution and Orientation
#### 5.1.2 Analysis of the Geometry of Spaces and Simulation of Sensors Location and Orientation  
During the preliminary phases regarding the system planning, the BIM model of the building was used to optimize locations and orientations of the camera-based sensors. The geometry analysis highlighted that the building corridors are long, low ceiling, and narrow (length: 32 m; height: 2.40-2.70 m; width: 1.60 m). Three simulations of the interrelated position of the sensors in a corridor have been performed to define the best configuration. Virtual objects representing the sensors were added to the BIM model in different locations according to the three possible configurations. Each virtual sensor was then linked to a field-of-view that allowed to virtually check through the model the area covered by each sensor. The BIM-based simulation analyzed three possible configurations, as shown in Figure 4:  
* The first solution considered two standard cameras at the two opposite sides of the corridor. Each corridor would be entirely monitored by two sensors at the same time, but in the central area, the detection could be less precise due to the distance from the sensors. In addition, cameras would have difficulty in monitoring areas near the end of the corridor, i.e., the area close to each sensor. Users passing through a door near the end of the corridor would be extremely distorted in the view of the nearby camera, making recognition difficult. * The second solution considered two standard camera-based sensors located at 1/3 and 2/3 of the corridor. This solution allows for a better monitoring of the end areas of corridors, but limits the simultaneous monitoring by both sensors to the central area only. * The third solution implied the use of a single 360-degree camera at the center of the corridor. Those kind of sensors are more expensive than standard cameras, but the total cost would be comparable, since this solution would consider only one sensor instead of two. This solution results in the corridor being entirely monitored by a single camera. The chosen solution was the second one, since in many cases there are doors near the end of corridors, thus excluding the first solution. In addition, due to the reduced width of the corridors, one single camera could struggle in identifying two people walking lined up. Therefore, the third solution, which involved only one camera, was also less preferable than the second one. The chosen sensors are High Quality Bullet Pro Camera PoE, with the following features: they provide HD quality images; the Power over Ethernet (PoE) allows to supply power and network connection to the camera with a single cable; a Wide Dynamic Range (WDR) allows to compensate problems due to exposure to light; the view angle of the camera reaches a maximum of 110 degrees. The system is installed in a dedicated Virtual Local Area Network (VLAN), and a static IP is provided for each element of the system. As stated in the Introduction, the sensor system was provided by a third-party organization, Laser Navigation SrI, who operated in full compliance with EU General Data Protection Regulation (GDPR). In fact, the deep learning algorithm does not record images, but only metadata regarding the anonymous movements and count of users are processed by the system, inhibiting the recognition of the observed subjects. The 20 sensors were installed directly in the ceiling, i.e., at height 2.40/2.70 m depending on the level of the building, ensuring the maximum coverage area. Figure 5 shows the plan of the IoT sensors system in the case study building. The BIM model also allowed for an optimization of the field-of-view of the sensors, as shown in Figure 6. The virtual camera field-of-view simulation supported the definition of the best orientation, i.e., the best tilt angle of each camera on x- and y-axis. This ensured that all the offices and bathrooms defined as critical, whose occupancy needed to be monitored, were correctly detected by the sensors.