Mobile sensing based indoor thermal field reconstruction: test in a virtual environment

. Environmental monitoring is a prerequisite to evaluate, control, and optimize indoor environmental quality. Compared to stationary sensing that deploys sensors at fixed locations, mobile sensing using an automated moving robot can actively take measurements at locations of interests, which provides a more flexible and efficient way to achieve a high-granularity agile environmental monitoring. Studies have been conducted to design and implement mobile sensing algorithms, however, to deploy on hardware and test the algorithm in the real world is usually expensive and challenging. In this study, we introduced a virtual testbed, AlphaMobileSensing which can be used to test, evaluate, and benchmark mobile sensing algorithms easily and efficiently. Using the virtual testbed, we conducted a test on a spatio-temporal (ST) interpolation algorithm for its robustness in indoor thermal field reconstruction. Two factors, the moving path, and the initial position, were considered, and the corresponding field reconstruction results were compared. The results show that the ST interpolation algorithm can extract similar global trend of a dynamic field regardless of different moving paths and initial locations, however, predictions of field local variations are sensitive to these two factors.


Introduction
As people spend more than 90% of their lifetime indoors [1], indoor environmental quality (IEQ) plays a critical role in ensuring occupants' health, comfort, and productivity. To maintain or enhance the IEQ, as a prerequisite, we need to understand the surrounding indoor environment, which can effectively be achieved by environmental monitoring. One common practice for environmental monitoring is stationary sensing, where sensors are deployed at fixed positions to continuously take measurements of IEQ parameters (e.g., temperature, relative humidity). Since the sensor deployment is straightforward and monitoring data processing methods (e.g., spatial interpolation) are well-established, stationary sensing has been widely adopted in indoor environmental monitoring of thermal condition [2] and contaminant dispersion [3,4]. However, the key challenge in applying stationary sensing is to determine the number and location of the sensors. On the one hand, to obtain a monitoring result with high spatial resolution generally requires a dense sensor network that consists of many sensors deployed here and there in the target indoor space, which could be costly in infrastructure investment and maintenance. On the other hand, as the sensor deployment is sparse in the target space, the stationary sensor network may fail to capture critical environmental information at locations where the sensors are absent, especially in a large space with inhomogeneous IEQ parameter distributions. * Corresponding author: qizhou@ust.hk Differentiated from stationary sensing, mobile sensing leverages a constantly moving agent (e.g., automated ground robot) to take measurements at locations of interests. The autonomous mobile nature enables the agent carrying a sensor moving towards and taking informative measurements at critical locations, which can address the issue that stationary sensing encounters. As a promising environmental monitoring technique, mobile sensing has attracting increasing research attentions for contaminant distribution detecting [5] and pollutant source positioning [6]. Since the mobile sensing data are highly sparse in time and space, using conventional spatial interpolation methods is thus insufficient to reconstruct the dynamic physical field, which requires sophisticated interpolation algorithms to obtain a high-granularity monitoring result. For this purpose, Jin et al. [7] proposed a spatio-temporal (ST) interpolation algorithm which can efficiently capture spatial and temporal dynamics of the indoor environment by extracting global and local trends based on the sparse data. More recently, Geng et al. [8] developed a novel method which combines mobile and stationary sensing to achieve a long-term estimation of continuous thermal map. To test the performance of the algorithms, experiments were carried out in an environmental chamber and a university classroom, respectively. Since not only software but also hardware and testing site are necessary for carrying out experiments, testing the mobile sensing algorithm could thus be expensive and time-consuming. In addition, it could also be difficult to benchmark the algorithm in the E3S Web of Conferences 396, 01074 (2023) https://doi.org/10.1051/e3sconf/202339601074 IAQVEC2023 experiment owing to the uncontrollable environmental factors (e.g., initial and boundary conditions of the test room). For these challenges, experiment scenarios and rounds are usually very limited, which hinders a comprehensive understanding of the algorithm for its performance and characteristics. As for the ST interpolation algorithm, the approach showed its strength in reconstructing the environment dynamics as compared to a dense sensor network in a chamber experiment [7]. However, owing to limited experiments, the robustness (e.g., sensitivity towards experiment conditions) of the algorithm remains unclear. Because robustness of the algorithm reflects its reliability and feasibility, which is critical to practical applications, the topic therefore deserves more investigations. To overcome the challenge in real-world experiments, we developed a virtual testbed AlphaMobileSensing for testing and benchmarking mobile sensing algorithms [9].
Compared to real-world experiments, AlphaMobileSensing provides a controllable virtual laboratory for users to conduct various experiments on the algorithm, which makes algorithm development and test more easily and efficiently. In this study, using the virtual testbed, we performed a test on the ST interpolation algorithm for its sensitivity towards moving path and initial location of the mobile agent. The objectives of this study are two-fold. First, by experimenting using the virtual testbed, we aim to demonstrate its effectiveness and strength in mobile sensing algorithm test and benchmark. Second, by investigating the sensitivity, we aim to obtain a better understanding of the algorithm performance and characteristics.

Virtual environment
AlphaMobileSensing is a virtual testbed which was developed for testing and comparing mobile sensing algorithms [9]. As shown in Figure 1, AlphaMobileSensing was wrapped as a custom OpenAI Gym environment with various parameters defined and several public and private methods created in the environment for specific functionalities. To instantiate the virtual environment, users are required to assign parameter values for different test scenarios. Parameter definitions and their settings in this study are listed in Table 1.
To conduct a test, either a static or a dynamic physical field is required, which is a virtual test site for an imaginary moving robot to take measurements of environmental parameters such as air temperature and pollutant concentration. The physical field is imported as a .csv file which contains spatio-temporal data of environmental parameters. The data can be obtained through field measurements or numerical simulations. To perform a measurement, the robot will get access to the .csv file and retrieve environmental parameter value corresponding to its current location.  MaxStep Maximum step of one episode 500 As a customized OpenAI Gym environment, AlphaMobileSensing utilizes a standard interface to interact with a control agent following these steps: (1) the control agent executes actions in the environment; (2) the environment performs a one-step run and returns information including observations and rewards to the agent; (3) the agent determines and executes the next actions. The process iterates until a termination signal is received. Here, the actions involve a move/stop signal, moving speeds at x and y directions respectively, and moving duration. The observations consist of location of the robot (x and y coordinates), global time, and environmental parameter value sensed by the robot. A reward is defined as a weighted sum of moving time and moving distance, which will be used in route planning and source identification problems.
AlphaMobileSensing also provides a functionality of evaluating the performance of an algorithm by computing a key performance indicator (root mean square error between estimation and ground truth). The readers are referred to [9] for more detailed information about AlphaMobileSensing.

Spatio-temporal interpolation algorithm
The high sparsity and non-continuity in space and time of mobile sensing data poses challenges to the data processing, which motivated new solution approaches. In view of that the variation of an indoor environment usually shows both a global trend and a local variation, Jin et al. [7] proposed a data-driven spatio-temporal interpolation algorithm to capture the two characteristics of a dynamic environment by constructing two estimators based on the mobile sensing data. The dynamics of the indoor environment can then be estimated, as shown in Equation (1).
The global trend is dominated by outdoor conditions and air-conditioning operations, etc., whereas the local variation is influenced by occupants and furniture, etc. Locally weighted scatterplot smoothing (LOWESS) is used to fit one estimator to capture the global trend. For local variation, a linear regressor (e.g., K-nearest neighbor) is fitted based on the empirical risk minimization.

Case description
The sensitivity test took place in a virtual climate chamber, as shown in Figure 2. The chamber has dimensions of 8m (X) × 6m (Y) × 2.7m (Z), with two windows on the front wall, and one air supplier near the floor and one exhaust near the ceiling on the right wall. The dynamics of the indoor environment was simulated using computational fluid dynamics (CFD) with boundary conditions listed in Table 2. Unsteady-state Reynolds averaged Navier-Stokes (URANS) simulation was run with a uniform indoor initial temperature of 300 K, and the turbulence effect was resolved using renormalization group (RNG) k-ε model with standard wall-function. The spatio-temporal data of the thermal field was arranged in a .csv file for importing to the virtual testbed AlphaMobileSensing. Mobile sensing was performed using a virtual robot placed in the climate chamber. The height of the sensor was assumed to be 0.5 m above the ground. In the test, the ST interpolation algorithm was used to reconstruct the thermal map of a plane at 0.5 m height based on the mobile sensing data. Four scenarios were designed to investigate the sensitivity of the algorithm towards moving path and initial location of the robot, as shown in Figure 3. In each scenario, the robot started sensing from the initial position, and moved following the predefined route (Figure 3) for two laps, leading to a total of 12 sensing locations and 24 measurements. Every two scenarios (scenarios 1 and 2, scenarios 3 and 4) shared the same path trajectories, but the sensing data varied owing to different initial positions and moving directions. To avoid impacts of sensing location and random factors in the environment, the robot took measurements at the same locations and the dynamic variation of the environment was kept identical in the four scenarios.

Results and Discussion
We conducted mobile sensing and reconstructed the thermal map for each scenario as the monitoring finished (at 465s in global time) and made comparisons among the results. Figure 4 demonstrates the thermal maps reconstructed using the ST interpolation algorithm based on the mobile sensing data collected in each scenario. The CFD simulation result was treated as a ground truth and presented as well for reference. The reconstructed results show similar non-uniform thermal distributions where temperature at the left part is higher than that at the right part. However, discrepancies among the scenarios can also be observed. Scenario 1 shows a lower temperature than the other three scenarios. Temperatures near the right wall estimated in scenario 4 are slightly lower than those of scenarios 2 and 3. As compared with the ground truth, the reconstructed thermal maps show similar overall trend to that displayed in Figure 4(e) but fail to represent some details such as the horizontal warm circulation flow in the middle and left part of the chamber.
To make a quantitative comparison, we invoked the method for performance evaluation which is provided by AlphaMobileSensing. As the function is executed, the users are required to assign the number of points for evaluation, which was set to 10 in this study. Therefore, the performance of field reconstruction was evaluated based on the root mean square error (RMSE) between estimations and ground truth at the 10 randomly selected points on the target plane. Table 3 lists the RMSE values of each scenario, which ranges from 0.4 K to 1.4 K. Scenario 1 shows the largest RMSE among the four scenarios as it estimates an obviously lower temperature than the ground truth. Scenarios 2 and 3 have comparable estimation errors as they exhibit similar reconstructed thermal map in Figure 4. The RMSE of scenario 4 is doubled, which could be attributed to the temperature discrepancy near the right wall. (e) ground truth (CFD result). The results indicate that field reconstruction using the ST interpolation algorithm can be influenced by the moving path and initial location of the moving agent. To get a better understanding of the phenomena, we analysed the mobile sensing data for global trend extraction and local variation estimation, respectively, since the field reconstruction is based on these two processes.
For global dynamics, Figure 5 presents the mobile sensing data arranged in time series of each scenario, where similar trends of temperature decreasing can be observed. Owing to the different moving path and initial position in each scenario, measurement data with the same timestamp were obtained at different locations, however, a similar global trend can still be captured. The result is reasonable because environment variation at the room level is dominated by factors such as outdoor conditions and operation of air-conditioning, which is independent of specific locations. The global trend was fitted using the LOWESS model based on the time series of the measurements. The fitted model was then adopted to estimate the global temperature of the chamber for each scenario (at 465s), which is listed in Table 4. The estimation of scenario 1 is approximately 1.5 K lower than the other three estimations, which is consistent with the result shown in Figure 4(a) where a thermal map with lower temperature was reconstructed.
Since LOWESS allocates local weights based on the 'distance' between the estimation point and measurements, the sensing data closer to the timestamp of 465s thus have larger weights and can have more impact on the estimation. It can be found in Figure 5 that scenario 1 has lowest monitoring values among the four scenarios for consecutive three measurements before the sensing terminated, which could lead to an estimation of the coolest condition in scenario 1. Similarly, scenario 2 demonstrates the warmest estimation value because its measurement values close to the target timestamp were the largest among the 4 scenarios. For local variations, although the measurement locations in each scenario were identical, sequences of obtaining sensing data were not the same owing to the different moving path and initial positions (Figure 3). Since the thermal field was dynamic, the mobile sensing data obtained at the same measuring point thus reflects a local evolution of the thermal environment at different timestamp of the four scenarios. To quantify the difference among the measurements at each location, we calculated standard deviation (SD) values of measurements acquired in the four scenarios, as shown in Figure 6. Since the regression model for capturing local variation was trained based on the error between global estimation and local measurement, a higher SD value can thus lead to a larger deviation in local estimation, which may explain why the reconstructed results of each scenario showed higher discrepancies at some locations (e.g., point 4, 8, 11, 12 in Figure 6). Meanwhile, the SD values of the second lap decreased as compered to those of the first lap. This is because evolution of the thermal field became slow as the time elapsed.  The results also highlighted the effectiveness and strength of the virtual testbed for mobile sensing algorithm research. Thanks to the simulation-based process, a variety of test scenarios can be designed and compared. The reproductivity and controllability of indoor climate of a virtual environmental chamber enables investigations that were formerly difficult in real-world, e.g., a sensitivity test.

Conclusions
Mobile sensing is an emerging technique for highgranularity monitoring of indoor environment, which is able to address the challenges that stationary sensing encounters. However, because the measurement data taken by the moving agent is highly sparse in both spatial and temporal dimensions, sophisticated algorithms for field reconstruction and route panning are necessary as mobile sensing is adopted. To test and benchmark a mobile sensing algorithm in real-world E3S Web of Conferences 396, 01074 (2023) https://doi.org/10.1051/e3sconf/202339601074 IAQVEC2023 experiments is usually costly in time and money, and is not always practical and available. This reality makes experiment scenarios and rounds for algorithm test be very limited, which prevents a comprehensive understanding of performance and characteristics of the algorithm. In this regard, we proposed a novel virtual testbed AlphaMobileSensing for testing and benchmarking mobile sensing algorithms easily and conveniently. In this study, we adopted the virtual testbed to carry out a sensitivity test on a sptio-temporal (ST) interpolation algorithm for field reconstruction considering different moving path and initial position of a mobile robot. Four scenarios were designed and reconstructed thermal fields of an imaginary environmental chamber were compared. The ST interpolation algorithm was able to capture similar global trends of the dynamic environment despite different moving paths and initial positions. However, estimation of the local variation is sensitive to these two factors. This study reveals the robustness of the algorithm and meanwhile, it demonstrates the effectiveness and strength of the virtual testbed in mobile sensing algorithm development.