Measuring Success, One Sensor at a Time: A Sensing Infrastructure for Longitudinal Workspace Behavior Monitoring

The development of built environments has expanded its focus beyond sustainability to health due to the potential to become a transformative health tool. Studies have shown that exposure to poor Indoor Environmental Quality (IEQ) can affect health and productivity, manifesting itself as sick building syndrome (SBS) and economic losses. Although previous studies have used wearables, mobile sensing, environmental sensing, and self-reports, none have utilized all four in a naturalistic environment. This study introduces a naturalistic multi-modal occupant state and behavior monitoring framework that (1) collects occupant and environment data through smart wearable devices, smartphones, environmental sensors, and self-reported surveys; (2) processes data to gain insight into participants. To assess the validity and ease of use of this framework, a pilot study was conducted with 13 participants, some in a smart office building space and others in their homes. This preliminary study confirmed the feasibility of employing surveys, smart wearable devices, environmental sensors, and passive smartphone sensing in a multi-modal approach to monitor occupant states and behaviors within smart office settings. The results revealed a positive linear relationship (r = 0.2497, 95% CI of [0.1502, 0.3493]) between subjective sleep ratings and total sleep time (TST). The reported sleep times were cross-validated with the identified sleep cycles, confirming the reliability of smart wearables in assessing sleep. Furthermore, in both the office and home participant data, noise levels exhibited a high incidence of coinciding change points with physical activity, suggesting a relationship between shifts in noise levels and changes in the physical activity of the occupant and vice versa. These findings further underscore the complex interaction between environmental factors and human behavior in the wild that can be closely examined in the proposed framework.


INTRODUCTION
Throughout the COVID-19 pandemic, individuals spent an exceptional amount of time indoors, a significant shift given that even before the pandemic, approximately 90% of their time was already spent inside [2].With most of the time spent indoors, occupants can experience symptoms and health illnesses due to exposure to poor indoor environmental quality (IEQ), known as Sick Building Syndrome (SBS) [24].Additionally, there are also economic consequences with a loss of productivity [6].The relationship between IEQ and the occupant state motivates the development of smart buildings that are not only sustainable, but supportive of human well-being and health, especially since smart buildings have the potential to be a public health tool [7].Smart buildings are touted for their ability to reduce energy costs, but can also increase productivity by 11% through improved ventilation and reduce short-term sick leave by 35% [11].
Building management systems are essential for monitoring and adjusting the IEQ for the improved health of occupants [7,18,38].Many studies have found thresholds for many IEQ metrics that would increase the prevalence of SBS, such as relative humidity below 30% or ventilation rates below 10 liters per second per person [18].IEQ has also been found to affect sleep quality, productivity, and overall well-being of individuals [30,35].Specifically, a study [15] found that elevated levels of CO, CO 2 , and temperature corresponded to significant decreases in sleep quality.
It is worth exploring the environmental factors that can cause occupants to be distracted, leading to increased mobility and decreased productivity.A recent study gathered environmental data and subjective assessments to assess productivity and health [20].The study discovered that illuminance, temperature, and airflow velocity significantly improved productivity.However, no physiological data was obtained and the study was conducted among manufacturing workers in a factory; elements contributing to productivity in office settings could be different, since tasks differ in dexterity and physical coordination.Individual physiological data and passive mobile sensing could serve as a proxy for measuring productivity in an objective manner as they can provide insight into times of user distraction (e.g., physical activity, receiving calls) [40].Many studies [25,32] that used wearables to evaluate well-being did not utilize environmental sensors, and a study that used both wearables and environmental sensors [15] only investigated sleep.
In contrast to studies that used sensors to collect quantitative data, many studies on the influence of the building environment on the occupant state relied primarily on subjective responses and lacked the support of quantitative data [8].However, the merits of qualitative studies should not be dismissed, as they can be conducted on a larger scale at a lower cost than studies that implement sensors to collect quantitative data.
As evident in prior discussion, studies on the effects of the building environment on occupant states and behaviors lack a standardized sensing framework [13].The lack of standardization also impedes comparison between studies and the reproducibility of longitudinal studies.Many studies conducted in the indoor environment have been found to be deficient in several ways, such as a lack of quantitative data, inadequate reporting of collected data and how it is processed, and insufficient details regarding the sample of participants [8].A standard sensing framework will streamline and simplify the process of conducting studies, improving the quality of research in the domain of human-building interactions.
This study proposes a framework for naturalistic multi-modal occupant state and behavior monitoring in the built environment.Consequently, we introduce a naturalistic longitudinal case study that utilizes surveys, smart wearables, environmental sensors, and passive smartphone sensing.To evaluate the validity and ease of use of this framework, a pilot study is conducted to evaluate the merits, areas of improvement, and concerns.Heart rate was also measured at a higher frequency during detected exercise, as described in Table 1.
Sleep is recorded with a timestamp, sleep stage, and time spent in the sleep stage.Raw data must be processed to retrieve bedtime and wake-up time, the total duration of time in each stage of sleep, and the overall duration of sleep.Participants were excluded if they did not have enough observations, as underlined in Table 3. Data processing must account for moments of stillness mistaken for sleep, napping, and waking up at night before falling asleep again.To help clean the data, an arbitrary value of 100 minutes was used to group sleep cycles such that if the time difference between rows was greater than 100 minutes, then the next row was the start of the next sleep cycle.Self-reported sleep times were also used to help filter out detected sleep not within range.
Additionally, we want to use the survey responses as validation for the smart wearable observations, thus we only use sleep observations that have corresponding surveys for the day after.This validation step helps us to clean the Fitbit data prior to analysis.As a result, the original 731 sleep observations were reduced to 524 observations of sleep and daily surveys across twelve participants.Furthermore, Fitbit sleep observations can be used to validate selfreported bedtimes and wake-up times, as the error in selecting AM and PM is common.The comparison can be used to remove data considered outside the scope and to evaluate the discrepancy of self-reported sleep times.
Sleep stages include light, deep, REM, asleep, wake and restless.Light sleep, the initial stage of sleep, helps restore both mental and physical restoration; it is marked by a readiness to wake up and a slight decrease in breathing and heart rate.Deep sleep occurs in the early hours of sleep with a reduced response to external stimuli and slower breathing; it aids physical recovery, memory storage, and immune system support [14].REM sleep, which occurs later in the sleep cycle, is characterized by active brain activity, dreaming, increased heart rate, and irregular breathing and is essential for mood regulation, learning, and memory storage [14].While the asleep stage is where the smartwatch detects sleep but is unable to categorize the specific stage.Each stage of sleep has its own benefits and has a specific optimal range.Two of the major measures of proper sleep quality in the literature are described in Eqns. 1, 2, from Fritz et al. [15].The first is Total Sleep Time (TST), which has an optimal range of seven to nine hours and REM to non-REM ratio (REM:nREM) with an optimal range between 0.25 and 0.33 [17,27].
2.1.2Smartphones.Smartphone data is collected through AWARE, an open source framework application designed to help conduct user studies in the mobile context [3].The application can collect data from various smartphone sensors, including WiFi networks, location, applications, and communication.We observed varying degrees of data collection in iPhone and Android users, where Androids were able to collect more detailed data as described in 1. Smartphone data can provide details on the daily behaviors of participants and help understand events of interest found in the other data modalities.The amount of data collected depends not only on the type of operating software, but also on the sensors that are selected when the application is downloaded on the phone.
For the pilot study, we did not utilize all available sensors.To have central storage for all the smartphone data, the AWARE application allows the syncing of data to a database, which also records the timestamp of the last sync and allows for compliance tracking.Processing of smartphone data requires reference to the AWARE documentation as some fields are nominal data (i.e., screen status: 0 = off, 1 = on, 2 = locked, 3 = unlocked) and also depend on the type of phone that the participant has.The data processing for iPhones will not necessarily apply to that of Androids due to the available data.Even when the same type of sensor data is available for both types of smartphones, such as screen status, the detail of the data is higher on Android than on the iPhone.2.1.3Environmental Sensors.For the collection of environmental data, we deployed Awair Omni sensors as described in Table 1.An Awair Omni sensor was installed at the desk or location closest to the participant in the workspace.Figure 1 shows how Awair Omni sensors were installed for remote and in-person participants.
The sampling frequency for the two different work contexts is also different; sensors in the office had a sampling frequency of ten seconds, while those in the home workspaces have a sampling frequency of five minutes.The environmental sensors in the office space are connected to the cloud and, through the Awair API, more granular data can be extracted.On the contrary, the sensors in homes could not be accessed by the API, so less granular data was extracted from the Awair dashboard.Each IEQ metric has associated recommended threshold values that can be used to analyze the collected data.As a way to limit and refine the data that is analyzed, location data from smartphones can be utilized to define the times that the participant is at their workspace (office or home) as opposed to being outside.

Surveys.
At the start of the study, a baseline survey was administered to participants to collect data on their sociodemographic status, personality, and psychological well-being through various standardized scales.Table 2 details the various subjective measures collected at different frequencies throughout the study.
The baseline and pre-study was conducted once at the very start, which collected data that would not see much change during the course of the study.Five formal scales were used in the baseline and pre-study survey: Weekly and daily surveys serve to collect more granular measures of sleep quality, stress, and productivity.More specifically, the weekly survey assesses the completion of tasks, the efficiency, satisfaction, and quality of the completed tasks, the time management, the workload, and the physical health.The daily check-in is a brief survey that is open from 9 am to 5 pm and evaluates overall sleep rating, frequency of trouble staying awake, and self-reports of when they went to bed and when they woke up that morning.
For the purposes of this paper, in proposing a sensing framework, most of the analysis is focused on responses to daily surveys.The daily surveys contain questions about the day before, which assess the frequency of difficulty staying awake, self-reported bedtime and wake-up time, sleep quality rating, physical activity, and social  [31] Flourishing Scale [12] Multidimensional Scale of Perceived Social Support [43] General Self-Efficacy [33] Monthly Perceived Stress Scale [9,10]  interactions.Additionally, it also assesses their current state with respect to a rating of their stress, productivity, and emotions.As mentioned in 2.1.1,self-reported bedtime and wake-up time are very prone to errors, as participants overlook the option of AM and PM.Sleep observations from their Fitbit devices helped to correct the values.A histogram of responses can be plotted to assess the validity of this justification, which is as shown in our data.Therefore, missing data can be imputed with the most likely value, which is the default value of the slider.Daily surveys offer a subjective view of the data collected from the other sensors, which helps to understand the state and behavior of the occupants.

Pilot Study.
A recruitment email was sent through the listserv to residents of the smart building space, which includes students, faculty, and staff.Fifteen participants were recruited between April and May 2022.Two participants dropped out.A majority of participants (n = 11) were graduate students, while the rest were faculty (n=2).There were four female and nine male participants, and the age distribution was as follows: 20-29 years old (n=8), 30-39 (n=4), and 50-59 (n=1).The countries of origin of the participants included the United States (n=5), China (n=2), Brazil, Iran, Sri Lanka, South Korea, Bangladesh and Egypt.Participants were compensated with Tango gift cards of up to $100 for two months, depending on compliance with data collection.The study was conducted from the end of April 2022 to July 2022.The study was approved by the Institutional Review Board for Social & Behavioral Sciences at the University of Virginia (IRB-SBS Protocol #2668).All individuals who participated in the study read and accepted the informed consent form.All procedures were carried out according to applicable guidelines and regulations.
For the purpose of this paper, we focus on the relationship between physical movement as a proxy for distraction and lack of productivity, and environmental factors, namely CO 2 , TVOC, and noise.More specifically, we are interested to know whether abrupt changes in CO 2 , TVOC, and noise are associated with increased physical activity measured through step count.
Table 3 shows the breakdown of each participant with respect to their primary place of work, role, and number of available observations for analysis.For two of the participants at home, their workspace is in their bedroom, so the environmental sensors are installed in their bedroom, as noted in Table 3.The merged sleep and survey observations were used for sleep validation, whereas the merged steps and IEQ data were used to perform the Bayesian change point analysis.The underlined values show which participants had less than 15 days of data and were subsequently excluded from the analysis.
Bayesian Change Points: To quantify the probability and presence of abrupt changes in the indoor environment measures and the physical activity of the occupant, we leverage Bayesian change points (BCP) detection analysis as described by Barry and Hartigan [4].This model uses a probabilistic framework and product partition models to detect the point at which the mean changes.Using a change-point detector, we can detect the moments in the time series of an occupant's physical activity that can be associated with changes in the environment and vice versa.This has also been explored in previous studies using BCP for HR analysis [34].We perform this process in R using the package bcp with default values [39].Additionally, due to the presence of numerous change points, as evidenced by the posterior probability peaks, we utilized the scipy package in Python to attenuate noise and identify the local maxima of these peaks.
We applied Bayesian change point analysis to examine physical activity (steps), CO 2 levels, noise, and TVOC data across ten participants due to the availability of data.The ten participants are divided based on their working location for analysis purposes -in office (n = 7) and at home (n = 3).We investigated possible associations between workplace environmental changes and physical activity patterns, as indicated by step counts, of occupants.Also, note that Bayesian change point analysis was conducted separately for those who worked remote and in person due to the different contexts and sampling frequency.For participants who primarily work from home, it becomes uncertain whether they are in their workspace near the environmental sensor or not.In comparison, for those who work primarily in office, when the location data show that they are in the office, they are more likely to be at their desk.

Sleep Quality Validation
In the sleep quality analysis, three participants were exempted since they did not have at least 15 sleep observations, as indicated by an underline in Table 3.In Figure 2, we compare the subjective sleep rating of the participant with the observed TST, which resulted in an overall Pearson correlation coefficient  = 0.2497,  < 0.001, with a 95% confidence interval of [0.1502, 0.3493].Self-reported sleep times were cross-referenced with the sleep cycles observed by smart wearables, serving as a mutual validation method.Approximately 53.3% of all sleep observations in the 10 participants met the recommended sleep of seven to nine hours and 33% met the recommended REM ratio of 0.25 to 0.33.

Working in Office
We examined the relationships between physical activity and IEQ metrics using different window sizes centered on observed time points and calculated the proportion of change points in a reference metric (first-level header) that were concurrent with change points in another metric (second-level header), as seen in Table 4. Figure 3a illustrates the simultaneous behavior of various metrics for one of the participants, who works mainly in an office.The dotted lines indicate the change points, which makes it evident that the change points for the different metrics occur within a window of time from each other.With respect to physical activity (steps), it can be discerned that noise levels exhibited the highest incidence of coinciding change points, which indicates that noise levels were particularly likely to undergo simultaneous changes when abrupt changes in physical activity were observed, ranging from 27.5% to 53.3% as shown in Table 4.This was followed by TVOC change points occurring simultaneously with 22% of step count changes when using a 10 minute window and 33.8% and 43.3% at 20 and 30 minute windows, respectively.Lastly, the changes in CO 2 occur simultaneously with 19.1% of the changes in step count in a 10-minute window and 27.6 %, and 32.4 % in a 20 and 30 minute window, respectively.Of the CO 2 change points, 46.9% coincided with the change points in noise and 41.2% coincided with TVOC, in a 20 minute window.With TVOC as the reference metric, noise has the highest rate of change points at around 41%, compared to CO 2 at 25.6% in a 20 minute window.

Working at Home
For work-from-home participants, we used the step data that were detected to be at home to merge with the IEQ data.The data frequency is with a 5-minute interval, as opposed to a 1-minute interval.Noise had the highest rate of change points when steps were the reference metric, with 7.6%, 15%, and 22.1% in 15, 25, and 35 minute windows, respectively, as shown in Table 5. CO 2 exhibited similar but slightly higher proportions of coincident change points  than TVOC among change points in steps.Compared to CO 2 as the benchmark, TVOC had a higher frequency of simultaneous change points ranging from 20% to 31.7%, while noise had a range of 10.9% to 26.6%.Of the noise change points, the CO 2 change points coincided at a slightly higher rate compared to TVOC.Of the TVOC change points, 23.8% coincided with the change points in CO 2 and 15.2% coincided with noise, in a 25 minute window.Figure 3b shows the metrics over time for a participant who primarily works from home.The metrics show no change points until about 8 AM in steps and VOC and after about 10 PM, which was when Fitbit had observed that the participant had woke up at about 7 AM that morning and went to bed a little past 10 PM that night.

DISCUSSION
This study introduced and tested a framework to analyze the effect of environmental factors on occupant state changes in the wild.Through the framework, longitudinal studies can be conducted and replicated with ease.This framework is characterized by the systematic integration of diverse data collection methods, each contributing unique dimensions of information.It encompasses a structured methodology for data acquisition, synchronization, and analysis, all embedded within a comprehensive sensor infrastructure.
In the pilot study, we employed the framework in a real-world scenario, which allowed us to examine various aspects of sleep patterns, IEQ, and physical activity in a dynamic workplace setting.Our findings revealed a positive linear relationship ( = 0.2497, 95% CI of [0.1502, 0.3493]) between subjective sleep ratings and observed TST, establishing the reliability of smart wearables to detect sleep.Sleep detection within smartwatches is not completely reliable, but can also be cross-referenced with screen use that is collected by the Aware mobile application.The validation of sleep data is only one example of the different validation checks that should be performed.
The application of using Bayesian change point analysis explores the environmental triggers to human behavior changes as indicated by their movement.The results, in both the office and home participant data, indicate that often when there is a change in physical state of the occupant, such as from rest to active, it tends to be accompanied by a respective change point in noise data.The in-office data has shown higher proportions of coincident change points between CO 2 , TVOC, and noise than those observed in the work-from-home participants, which can be attributed to the increased granularity of the office data.These findings emphasize the intricate relationship between environmental factors and human behavior in the workplace, which aligns with previous research on IEQ, occupant satisfaction, and productivity [16,24,28].Although physical activity may indicate distraction, we cannot definitively link these changes to work-related activities without more comprehensive data, which can be collected through Ecological Momentary Assessments (EMA).EMAs can enrich the understanding of environmental and physiological data while minimizing recall bias in participants [41].Additional ground truth combined with the data could help produce a distraction measure for the workplace, revealing information on the impact of the built environment on the focus of the occupants [37].This highlights the need for responsible data collection and awareness of privacy, as many occupants are unaware of the inferences that can be drawn from seemingly harmless sensors, such as IEQ sensors [23,42].
Due to the number of surveys and the short frequency in between, the compliance of some surveys was fairly low.The average compliance for the surveys is as follows: monthly (73.1%), biweekly (77.7%), weekly (69.9%), and daily (73.5%).However, only two monthly surveys were administered to each person due to the short duration of the study, and only one bi-weekly survey was administered due to technical difficulties.However, the research team strived to make the questions in the daily survey as brief as possible to minimize survey fatigue [29].Participant stress and productivity were each surveyed with a single-question Likert scale.While this approach minimized survey fatigue, it revealed the unreliability of current measurement methods.Stress and productivity, intricate and context-dependent constructs, are difficult to capture accurately using Likert scales, which are susceptible to response bias, interpretation challenges, and limited in capturing the nuances of participant experiences.Future research should consider the refinement of survey methodologies to mitigate these challenges.
When considering each modality individually, it became evident that some participants lacked sufficient data for each modality for a robust analysis.This discrepancy arose from variations in the availability of data, as certain participants had more data in one modality and less in another, making it more challenging to establish connections and discern relationships.This situation not only underscores the importance of careful data handling and statistical approaches to account for this variability, but also highlights the critical need for consistent data monitoring throughout the study to address and mitigate data discrepancies as they arise.Many of the limitations discussed so far can also be addressed with the transition from surveys to EMAs [1,26,36].
Our pilot study explored the intricate relationship between environmental and behavioral factors in dynamic workplace settings.The objective of the framework is to explicitly consider the impact of Cyber-Physical Systems (CPS) on social objectives such as productivity and well-being.By investigating how workplace environments influence the two, we contribute to understanding how CPSISs can be harnessed to enhance user experiences and improve social outcomes.This preliminary research confirmed the feasibility of employing surveys, smart wearables, environmental sensors, and passive smartphone sensing in a naturalistic, multi-modal approach to monitor occupant states and behaviors within smart office settings.Furthermore, the pilot study laid the foundation for future in-depth examinations of how workplace conditions impact occupants and the role of individual differences in shaping these effects, emphasizing the need to address potential social inequities.The versatility and adaptability of this framework further underscore its suitability for conducting repeated studies with diverse research objectives, opening doors for a wide range of investigations into workplace well-being, productivity, and the dynamic interplay between environmental factors and human behavior.The framework can also be used to study the privacy implications of collected data and how facilities can prioritize responsible data collection, operate with transparency and accountability, and safeguard user privacy while harnessing the potential of smart sensing technologies for the betterment of occupants.

FUTURE WORK
The pilot study has shed light on the intricate dynamics between workplace factors, human behavior, and well-being.As we look ahead, there are several promising avenues for future research.Future research can refine survey methodologies, moving beyond Likert scales to capture nuanced constructs such as stress and productivity and improvements to minimize missing data and response bias.Furthermore, research should explore the practical applications of our findings in workplace design and interventions, including that of occupant privacy.Advanced data integration and analysis techniques can address data discrepancies, and ethical considerations surrounding data privacy must be paramount.By pursuing these avenues, we can build on this foundation and contribute to developing evidence-based strategies to improve employee wellbeing and productivity in dynamic workplace environments.

Figure 1 :
Figure 1: The installation location of the Awair Omni sensor depends on the primary location of work -either in-person or remote from home.

Figure 2 :
Figure 2: Rating of Sleep Quality against Total Sleep Time (TST)

Figure 3 :
Figure 3: Stacked change point plots of different metrics for two participants in different work contexts.

Table 1 :
Sensors and corresponding metrics The proposed naturalistic multi-modal occupant state and behavioral monitoring framework is composed of (1) smart wearables, (2) smartphones, (3) environmental sensors, and (4) surveys.Fusing the different data modalities provides a much richer source of data to answer various questions.

Table 2 :
Surveys and scales administered

Table 3 :
Participant Information

Table 4 :
In Office: Proportion of Change Points Between Multiple Metrics

Table 5 :
In Home: Proportion of Change Points Between Multiple Metrics