Sofiane Zemouri

Yiannis Gkoufas

Damien Magoni

Kostas Katrinis

Ayoub Zemouri

John Murphy

An Edge Computing Approach to Explore Indoor Environmental Sensor Data for Occupancy Measurement in Office Spaces

Keywords: Occupancy detection, occupancy measurement, RaspberryPi, Internet of Things, Edge Computing, IBM Cloud

Human occupancy measurement has become a topic of increasing interest in the past few years, due to the important role it plays in controlling a number of demand-driven applications like smart lighting and smart heating, as well as improving the energy efficiency of these applications in a broader sense. Office occupancy monitoring in commercial buildings can yield huge savings and improvements in terms of thermal, visual, and air quality. However, this is often impeded due to the lack of fine-grained occupancy information. This paper explores the use of low-priced environmental (temperature and humidity) sensor data for measuring occupancy in an office space. The idea behind this work is to leverage the variation divergence between humidity and temperature caused by human presence. We used a Raspberry Pi with a daughterboard called Sense Hat, which is equipped with the environmental sensors used in this study. The results are compared with occupancy data obtained from camera feeds in order to assess the effectiveness and the accuracy of the combined occupancy measurements, and show up to 87% accuracy.

I. INTRODUCTION

Internet of Things (IoT) has become a major technological revolution, which is leading to an explosive growth in the number of internet-connected devices globally thanks to a strong reduction in sensors costs. Experts estimate that IoT will consist of approximately 50 billion devices by 2020 [START_REF] Evans | The internet of things: How the next evolution of the internet is changing everything[END_REF]. Consequently, IoT is gradually impacting every business area and industry field. These IoT devices offer an attractive, lowercost alternative to more expensive traditional monitoring systems like surveillance cameras or traditional weather stations. In addition, these devices can be more easily integrated with control systems like Building Management Systems (BMS) [START_REF] Levermore | Building energy management systems: An application to heating, natural ventilation, lighting and occupant satisfaction[END_REF], thanks to their integrated communication modules.

The decrease in sensors prices was also accompanied with a continuous decrease in electronic components prices and This research was partly funded by IBM Faculty Award grant, by Science Foundation Ireland grant 13/RC/2094 (Lero), by SFI grant 17/IFB/5401, and by ANR grant 10IDEX-03-02 to the University of Bordeaux. particularly a reduction in processing power costs. This led to more and more computational power being integrated into IoT devices, which paved the way to the advent of a new concept commonly called Edge Computing (EC) [START_REF] Shi | The promise of edge computing[END_REF]. EC consists of pushing the intelligence of a system towards the edge of the network composing it. In other words, offloading some of the tasks that are usually handled on the cloud, to the some "cloudlets" [START_REF] Lewis | Tactical cloudlets: Moving cloud computing to the edge[END_REF] closer to the source of the data or to the IoT devices themselves.

The most notable advantage of such an approach is the considerable reduction of the response time enabling new, latency sensitive applications that were not possible using a traditional cloud architecture. Moreover, how effectively these IoT devices are able to communicate (particularly over potentially heavily congested networks) can have a major impact on the quality of the services provided, as well as in their degree of success (or failure). EC allows for a considerable reduction in the network load, since a good part of the data processing is done on the IoT device and thus, less data is transferred through the network to the cloud.

With the availability of IoT sensor data in commercial buildings, occupancy information can be monitored in real time. This information can be used in a variety of applications controlled by the BMS. For example, energy consumption can be regulated by controlling the Heating, Ventilating and Air Conditioning (HVAC) based on the occupancy information gathered from the sensors. In case of issues with HAVC, temporary adjustments can be made in order to ensure occupants comfort and safety [START_REF] De Paola | Intelligent management systems for energy efficiency in buildings: A survey[END_REF], [START_REF] Nguyen | Energy intelligent buildings based on user activity: A survey[END_REF]. In addition to energy management, the fire system can benefit from such information. Survivors can be located and rescued in case of emergency situations [START_REF] Nyarko | Cloud based passive building occupancy characterization for attack and disaster response[END_REF]. Finally, occupancy information can be used to enhance the building security and surveillance [START_REF] Akkaya | IoT-based occupancy monitoring techniques for energy-efficient smart buildings[END_REF].

In the recent years, many occupancy measurement approaches have been investigated in the literature to explore different flavours of IoT devices, sensor types combination, data processing methods, as well as functions and usecases.

However, these approaches have some pros and cons in terms of cost, accuracy and privacy. This latter is a big concern especially in an office spaces where the privacy of occupants is of high importance. This restricts the use of a number of intrusive devices that can uncover the identity of the occupant or track their movements in the context of a commercial building or occupancy in office spaces. On the other hand, it is common sense that cost and accuracy are positively correlated as usually, the higher the accuracy of the sensor and its readings, the higher its cost is. Nevertheless, we argue that the accuracy of occupancy measurement could be improved relying on a combination of a number of different sensor readings.

This work investigates the use of low-cost, non-intrusive environmental sensors and the fusion of their readings in order to estimate office spaces occupancy more accurately in commercial buildings. We are particularly interested in detecting human presence in an office space as the number, location, and activity of the occupants are outside the scope of this work.

The main premise of this paper is that human presence in a closed space like an office, affects the temperature and the humidity in different ways, which creates some interesting divergences in the humidity and temperature behaviour between occupied and unoccupied periods. This difference in pattern is exploited to detect human presence.

First, the environmental sensor readings are gathered using the Sense Hat1 . Next, these readings are combined and processed locally on the Raspberry Pi2 to detect changes in humidity and temperature patterns. Finally, the occupancy information in the office space is estimated based on the change in humidity and temperature behaviour. In order to assess the accuracy of our occupancy estimation method, we compared the occupancy results we obtained with manually reviewed video recordings of the office using a Pi Camera 3 . The proposed approach leverages the computational power of edge devices to alleviate the network load compared with traditional approaches where data is transferred to the cloud creating a bottleneck in the network.

The remainder of this paper is organized as follows: section II is a review of the current state of the art and a discussion of different approaches, their pros and cons. Section III introduces the method followed in order to infer occupancy in the office space. Section IV discusses the results and the limitations of this approach. Finally, section V discusses future directions and concludes this paper.

II. RELATED WORK

There are a number of occupancy measurement solutions in the literature. Throughout the past decade, researchers have explored various detection mechanisms using different types of sensors. Perhaps, the most obvious solution when trying to detect human presence is to use a system humans can interact with to mark their presence, like the work in [START_REF] Martani | EN-ERNET: Studying the dynamic relationship between building occupancy and energy consumption[END_REF]. The work in [START_REF] Ul Haq | A review on lighting control technologies in commercial buildings, their performance and affecting factors[END_REF] used carefully placed Passive Infra-Red (PIR) sensors to detect if someone cuts the infrared beam. A criticism of such solutions would be that they require a direct line of sight between the sensor and the occupant [START_REF] Teixeira | A survey of humansensing: Methods for detecting presence, count, location, track, and identity[END_REF]. It also requires continuous movements from the occupants [START_REF] Meyn | A sensor-utility-network method for estimation of occupancy in buildings[END_REF]. Other studies have demonstrated that such systems can be triggered by heat currents in the room, causing frequent false positives occurrences [START_REF] Li | Measuring and monitoring occupancy with an RFID based system for demand-driven HVAC operations[END_REF]. Other works relied on sound sensors [START_REF] Uziel | Networked embedded acoustic processing system for smart building applications[END_REF] or ultrasonic sensors [START_REF] Tarzia | Sonar-based measurement of user presence and attention[END_REF] to detect the noises caused by humans in a room or an office space. These solutions also fail to detect human presence if the person is not making any noises (for example a person sitting and silently reading an article). CO 2 sensors were also explored in [START_REF] Nassif | A robust CO2-based demand-controlled ventilation control strategy for multi-zone HVAC systems[END_REF] to measure the change in the amount of CO 2 exhaled by humans in a room. However, it is shown in works like [START_REF] Pedersen | Method for room occupancy detection based on trajectory of indoor climate sensor data[END_REF] that the accuracy of such measurement with regards to human presence is much lower compared to other types of sensors. Another innovative solution aims to detect the Electromagnetic Signals (EM) produced by devices carried by the user like the work in [START_REF] Khoury | Evaluation of position tracking technologies for user localization in indoor construction environments[END_REF] who monitors the Wi-Fi activity of a user. These solutions can be convenient, as they do not require any additional infrastructure, but they also come with a number of limitations. First, occupants have to carry a communication device (like a mobile phone) at all times. In addition, it is well known that mobile phones are battery powered and thus, can go offline at any time causing the system to fail at detecting a presence in the room [START_REF] Khoury | Evaluation of position tracking technologies for user localization in indoor construction environments[END_REF]. Finally, Cameras are also a good way of obtaining fine-grained information about occupancy in a room or an office space like the works in [START_REF] Erickson | POEM: Power-efficient occupancy-based energy management system[END_REF] and [START_REF] Benezeth | Towards a sensor for detecting human presence and characterizing activity[END_REF]. Yet, there is a growing concern about occupants' privacy in office spaces [START_REF] Li | Measuring and monitoring occupancy with an RFID based system for demand-driven HVAC operations[END_REF]. Also, video feeds from cameras transferred through the network create a bottleneck in the network, hence the importance of EC.

These above occupancy measurement methods and others, can be classified according to a number of parameters. A good classification divides the literature works into three main categories [START_REF] Labeodan | Occupancy measurement in commercial office buildings for demand-driven control applications -A survey and detection system evaluation[END_REF]:

• Detection method: Occupancy measurement solutions can be classified according to the method used to detect the occupants in a building or in an office space. This can be an active or a passive detection. Active detection requires the occupant to explicitly perform an action to interact with the monitoring system and mark its presence. This usually involves a device or an object that needs to be carried by the user such as an access card or an RFID tag like the work in [START_REF] Martani | EN-ERNET: Studying the dynamic relationship between building occupancy and energy consumption[END_REF]. Although this method allows for a great level of accuracy in perfect conditions, it is dependent on the occupants' compliance.

On the other hand, passive detection does not require any actions from the user. Most of the solutions mentioned above (EM, CO2, PIR, ultrasonic and cameras) fall into this category, as they are very convenient. However, it is argued in many works [START_REF] Pedersen | Method for room occupancy detection based on trajectory of indoor climate sensor data[END_REF] that the accuracy of such solutions relying on a single source of information can • Detection Function: Occupancy measurement solutions can also be classified according to the function or the purpose of the detection. The function of the detection can range between presence, count, location, movement tracking and activity monitoring. Presence detection provides binary information (true or false) about whether the room is occupied or not [START_REF] Khoury | Evaluation of position tracking technologies for user localization in indoor construction environments[END_REF]. Count measurement on the other hand gives information about the number of persons present in a room, an office space or a building [START_REF] Li | Measuring and monitoring occupancy with an RFID based system for demand-driven HVAC operations[END_REF].

Location detection allows the HVAC system to adjust in specific locations according to where persons are in a building [START_REF] Nassif | A robust CO2-based demand-controlled ventilation control strategy for multi-zone HVAC systems[END_REF]. Movement tracking takes this a step further and provides the history of a particular occupant's movement [START_REF] Klein | Coordinating occupant behavior for building energy and comfort management using multi-agent systems[END_REF]. Finally, activity monitoring is concerned with what the occupant is doing like the work in [START_REF] Dougan | CO2-based demand control ventilation: Do risks outweigh potential rewards?[END_REF], which relies on CO2 exhaled by human presence to determine the level of effort of different individuals. However, there are a lot of privacy concerns about solutions like the above that track occupants' location, movements and activity [START_REF] Li | Measuring and monitoring occupancy with an RFID based system for demand-driven HVAC operations[END_REF].

• Detection Infrastructure: The last classification divides the literature works based on whether they require the installation of explicit infrastructure to operate, or they just rely on existing infrastructure that performs the occupancy measurement as a secondary function [START_REF] Thanayankizil | Softgreen: Towards energy management of green office buildings with soft sensors[END_REF], [START_REF] Christensen | Using existing network infrastructure to estimate building occupancy and control plugged-in devices in user workspaces[END_REF]. CO2, PIR, and ultrasonic sensors are explicit solutions, as they require new sensors to be installed in the office space. On the other hand, solutions that rely on EM measurements or video feeds can be regarded as implicit solutions as they infer occupancy information from sources that are not solely installed for the purpose of this detection. A common trait of all the works discussed in this section is that most of the time they rely on a single source of information. The novelty of this work is the fact that it looks into different measurements sources from low-cost environ-mental sensors and combines them in order to improve the accuracy of the detection. The use of such sensors eliminates all privacy concerns, as these readings do not allow unveiling the identity of the occupants. Another important advantage of our solution is the use of EC to process and aggregate the sensor readings locally, which considerably reduces the amount of data injected in the network.

III. PROPOSED SOLUTION

In this section, we will first go through the system design, explain the testbed and the setup used in this study, then we will cover the approach followed to estimate the occupancy in an office and the steps involved.

A. System Design

For the purpose of this work, we have developed an IoT test bed at University College Dublin (UCD) to detect human presence in a few approved offices. We relied on the cloud IoT platform IBM Bluemix 4 to provision the IoT devices with the packaged code. This platform uses Docker containers 5to package the code which allows for a seamless provision and update of the Edge Devices. It also offers a dashboard that allows a holistic view and an easier interaction with the devices and the data they report. We refer the reader to [START_REF] Gheith | Ibm bluemix mobile cloud services[END_REF] for more information about IBM Bluemix.

The IoT test bed used in this study is illustrated in Figure 1. The test bed comprises of a number of Raspberry Pi's System on Chip (SoC) as Edge Devices. These devices are connected to a wireless router, which in turn is linked to a gateway allowing them to have Internet access and connect to IBM Bluemix. not used for the purpose of this work as the Edge Device was stationary in our case. We also equipped one Raspberry Pi with a Pi Camera in order to assess the accuracy of the detection using the above-mentioned environmental sensors. This was done by manually checking the video recordings and obtaining the baseline real occupancy information, then comparing them against the sensor readings. Figure 2 shows an Edge Device used in this study.

The edge devices were placed as shown in Figure 3 in a test office. The office comprises three desks. The Raspberry Pi equipped with a camera was placed in a way to capture employees coming in and out of the office. Another Raspberry Pi equipped with a Sense Hat was placed on one of the desks to capture environmental (humidity and temperature) data in the office. In the next subsection, we describe the approach and the different methods to probe occupancy information in the office space.

B. Approach

As mentioned in the previous sections, the Sense Hat contains three environmental sensors (Temperature, Humidity and Barometric Pressure), as well as three other inertial sensors (Gyroscope, Compass and Accelerometer). After inspecting a sample dataset of all these sensors' readings, we came to the conclusion that three out of the six sensors did not yield useful enough information for this specific application, as there was barely any variation in the measured values. These sensors are the gyroscope, the accelerometer and the magnetometer. This was expected since these three inertial sensors are designed to capture movements in the edge device. However, this later was stationary in our case. In the environmental sensors category, the Barometric pressure sensor was also dropped as it did yield some variations, but these were long-term trends rather than the instantaneous spikes we are interested in. Based on these elements, we only relied on the humidity and the temperature sensors in our study.

The main finding of this work is the fact that human presence in a closed room affects the behaviour of the humidity and the temperature in different ways. In fact, in a closed, undisturbed environment, temperature and humidity vary as a pair. That is, usually an increase in the temperature is always accompanied with a decrease in humidity, and vice versa [START_REF] Williams | Relationship between the humidity and temperature of inspired gas and the function of the airway mucosa[END_REF]. As a person walks into the room, this equilibrium is disturbed to a certain extent and we observe a different pattern where the changes in temperature and humidity have different amplitudes.

In the following, we will go through the approach and the steps followed to result in the occupancy detection solution proposed in this work. This can be described in the following three steps: (i) data smoothing and de-trending; (ii) pattern observation and data comparison; and finally (iii) occupancy estimation. We will discuss each of these steps and justify their significance and the logic behind them. EWMA with a small enough decay factor allows removing the noise while maintaining the shape of the data.

(i) Data smoothing and de-trending: In this first step, we applied an Exponentially Weighted Moving Average (EWMA) to smooth the data and get rid of the unnecessary noise. EWMA is calculated as follows:

a t = (1 -λ) t-1 i=0 λ i a t-1-i (1)
Where a t is the exponentially weighted sample at time t and λ is the decay parameter. The choice of EWMA against a Simple Moving Average (SMA) is motivated by the fact that we wanted to smooth the data but preserve variations and the spikes observed in the data by giving more weight to more recent data. In other words, an EWMA allows smoothing the data while maintaining the integrity or the shape of the data whereas a SMA not only smooths the data, but it also considerably reduces the magnitude of the spikes observed in the data (or smooth the edges). Figure 4 shows a sample temperature and humidity plot before and after applying the EWMA. After the EWMA is applied, we performed a rolling numerical differentiation of the data using the following formula:

∆(a t ) = a t -a t-w (2)
Where a t is the term at time t and w is the time window of the differentiation. The reason behind this step is the elimination of trends and seasonality. In fact, temperature (and consequently humidity) changes throughout the day in account of external factors such as outdoor temperature, as well as the heating cycle in the room. However, we are only interested in variations caused by human presence and thus, numerical differentiation is the perfect candidate to filtering out the long-term variations while maintaining the integrity of short-term temperature and humidity changes. Figure 5(a) shows the output of differentiated temperature and humidity data. Finally, we calculated the standard deviation of this differentiated data as follows:

σ(a t ) = 1 t -1 t i=1 (a i -ā(w)) 2 (3)
Where ā(w) is a rolling mean with a window w. By definition, the standard deviation is the amount of change from the mean value. In our study, we wanted to quantify the amount of variation in the differentiated data. In other words, this allows us to measure the difference in humidity and temperature variations and draw a clear picture of whether there is a correlation between these two values. Figure 5(b) shows the resulted standard deviation.

(ii) Pattern observation and data comparison: For the sake of simplicity, we will refer to the Standard Deviation of the differentiated data as σ. In this step, we divided the data into two groups: occupied and unoccupied periods.

Real occupancy information was obtained by means of reviewing recorded videos and photos of the test office, recording the time and mapping this information to our humidity and temperature σ values. We plotted samples of occupied periods as well as unoccupied periods and the results are shown in Figure 6. The graphs show an interesting pattern, that is, humidity and temperature σ values follow the same behaviour during unoccupied periods, but diverge significantly during occupied periods. Based on this observation, we wanted to confirm this observation and extract useful occupancy information from it.

In order to do this, we calculated the absolute difference between the humidity and temperature σ values to get a better feel of the convergence and divergence observed using the following formula:

ρ t = σ(T t ) -σ(H t ) (4)
Where σ(T t ) is the Standard Deviation of the differentiated temperature at time t and σ(H t ) is the Standard Deviation of the differentiated humidity at time t. After smoothing this ρ t by applying an EWMA filter from Equation 1, we obtained the graph shown in Figure 7.

From this figure, we start to see a clear pattern where ρ value increases significantly during occupancy periods and drops rapidly when the person leaves the office. On the other hand, ρ remains fairly flat when the room is empty for a long time and is little affected by the sudden spikes in humidity or temperature caused by external factors like the heating system or the outside temperature.

(iii) Occupancy estimation: In this final step, we apply an estimation algorithm based on ρ t calculated in the previous step. The input is simply the differentiation of this value. This is done to quantify how fast this measure is varying and is calculated as follows:

∆(ρ t ) = ρ t -ρ t-w (5)
Where ρ t is the value at time t and w is the time window of the differentiation. The output on the other hand is the estimated occupancy information. The algorithm is intuitive and pretty straightforward and is shown in Algorithm 1. Three parameters are used for the purpose of the estimation and that is the Ascending Velocity Threshold Asc th , the Descending Velocity Threshold Desc th and the Decline Threshold Dec th . The former two parameters are self-explanatory as they are thresholds for how fast the ∆(ρ) (Equation 5) is increasing or decreasing. If ∆(ρ) calculated above is smaller than Desc th , this means that the value is dropping rapidly and the state of the occupancy in the office should be changed to unoccupied. On the other hand, if ∆(ρ) is greater than Asc th , this is interpreted as a rapid increase in this value and thus, the occupancy state should be changed to occupied. The last parameter (Dec th ) on the other hand, which is the decline threshold, is a threshold to determine how long should ∆(ρ) value continuously drop in a moderate amount in order to consider that the office has been cleared and the occupancy status should be changed from occupied to unoccupied.

Algorithm Decline period is 0 10:

else if ∆(ρ t ) > 0: then 11:
Decline period is incremented by 1 12:

if Decline period >= Dec th : then

13:
State is unoccupied end if 18: end while To sum the steps above up, first the raw humidity and temperature measurements are smoothed and de-trended using a series of EWMA, Differentiation, and Standard Deviation. We referred to this as σ. Next, the absolute difference between the humidity value σ(H) and the temperature value σ(T ) is calculated and smoothed using an EWMA filter. We referred to this as ρ. A numerical differentiation of this parameter was performed next and referred to as ∆(ρ). Finally, the intuitive algorithm above is applied to estimate the occupancy in the room.

This method has the advantage of being extremely light and only relies on a relatively short window of past data. This allows such estimation to run on low cost edge devices in real-time without encountering any performance issued. In the following section, we will discuss the results we obtained using this method to estimate occupancy in an office space.

IV. RESULTS

In order to prove the effectiveness of our solution, we used the setup described in Subsection III-A and gathered ten 0 6 / 0 3 / 2 0 1 8 0 7 / 0 3 / 2 0 1 8 0 8 / 0 3 / 2 0 1 8 0 9 / 0 3 / 2 0 1 8 1 0 / 0 3 / 2 0 1 8 1 1 / 0 3 / 2 0 1 8 1 2 / 0 3 / 2 0 1 8 1 3 / 0 3 / 2 0 1 8 1 4 / 0 3 / 2 0 1 8 1 5 / 0 3 / 2 0 1 8 1 6 / 0 3 / 2 0 1 8 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 1 8 : 0 0 0 6 : 0 0 1 2 : 0 0 days worth of humidity and temperature data. This dataset comprises of 860K humidity and temperature measurements taken in 1 second intervals. Our occupancy estimation approach was used and compared against real occupancy information gathered from video recordings. Figure 8 shows the results obtained after performing our occupancy estimation method over a period of ten days. This figure comprises of σ(T ) and σ(H) (Standard Deviation of the differentiated temperature and humidity data respectively, Equation 3), as well as ρ (absolute difference of σ(T ) and σ(H)) and the estimated occupancy information. In order to evaluate these results, we compared the estimated occupancy information with the real occupancy values and the resulting graph is shown in Figure 9. We can see from this figure that there our estimation method performs well relatively with the size of the data. This shows the potential of such an approach in detecting human presence in a room.

In order to give more insight into the results, we selected five evaluation metrics in order to assess the correctness of our estimation results. These metrics are (i) True Positive Rate; (ii) True Negative Rate; (iii) False Positive Rate; (iv) False Negative Rate; and finally (v) the Accuracy of the estimation. True Positive Rate and True Negative Rate are defined as T P R = T P / (T P +F N ) and T N R = T N / (T N +F P ) respectively; where TP, TR, FP and FR are the total number of True Positive, True Negative, False Positive and False Negative samples respectively. False Positive and False Negative Rates are calculated respectively as follows: F P R = 1 -T N R and F N R = 1 -T P R. Finally, the accuracy of the estimation is obtained by ACC = (T P +T N ) / (T P +F P +T N +F N ). We also varied the Dec th parameter and obtained a set of results that are broken down in Table II. By varying the Dec th parameter (which describes how long should ∆(ρ) monotonically descend before the state of the room is changed from occupied to unoccupied), we observe that a higher Dec th increases the True Positive Rate while a lower Dec th increases the True Negative Rate. The accuracy of the estimation is a tradeoff between the True Positive Rate and the True Negative Rate. We should mention that this particular dataset has more instances of unoccupied states and therefore, a small change in the True Negative Rate affects the overall Accuracy greatly while an important change in the True Positive Rate does not affect the overall accuracy in such an important way. We also noted that varying the other parameters (for example the window size w) does not have as a great effect on the accuracy as the Dec th .

V. CONCLUSION

This paper explores an Edge Computing approach to use low-cost, non-intrusive environmental sensors for measuring occupancy in an office space. Humidity and temperature data was combined and used in order to estimate human presence in a test office. The main idea was to leverage the divergence in humidity and temperature variations introduced by human presence in a closed environment such as an office. The results show that such fusion of data (humidity and temperature) can help estimate room occupancy with up to 87% accuracy. This work is a demonstration that combination of different types of sensor readings can yield more accurate occupancy information, and paves the way for more research in the data fusion research applied in the context of Smart Cities. Future work will explore the use of inertial sensor readings and fusion with environmental sensors to improve the accuracy of the estimation.

Fig. 1 .

 1 Fig. 1. IoT testbed used in this study

Fig. 2 .

 2 Fig. 2. Edge device used in this study (Raspberry Pi3 equipped with a Sense Hat daughterboard and a Pi Camera)

Fig. 3 .

 3 Fig. 3. Layout of the test office used in this study and location of Edge Devices

Fig. 4 .

 4 Fig. 4. difference between raw and smoothed humidity and temperature data. EWMA with a small enough decay factor allows removing the noise while maintaining the shape of the data.

  Fig. 5. De-trending using numerical differentiation (a) then quantification of the variation (b) in order to infer patterns of occupied and unoccupied periods.

Fig. 6 .

 6 Fig. 6. Difference in Temperature and Humidity Standard Deviation between occupied (right) and unoccupied (left) periods.

Fig. 7 .

 7 Fig. 7. Absolute difference of Humidity and Temperature Sigma versus occupancy.

Fig. 8 .

 8 Fig.8. Estimated occupancy inferred using the method described in Subsection III-B (Dec th of 8100 seconds).

Fig. 9 .

 9 Fig. 9. Comparison between the estimated occupancy and the real occupancy with a Dec th value of 8100 seconds.

  TableIshows the empirically selected parameters used in our estimation. The decay factor λ of the EWMA is the parameter used in the first step in Subsection III-B above. The window size w is the rolling window used to calculate the numerical differentiation as well as the rolling mean of the Standard Deviation in the same step. Finally, Asc th , Desc th , and Dec th are the parameters described in Algorithm 1.

https://www.raspberrypi.org/products/sense-hat/

https://www.raspberrypi.org/

https://www.raspberrypi.org/products/camera-module-v2/

https://www.ibm.com/cloud/

https://www.docker.com/


Sylvain Bart
email: sylvain1.bart@outlook.fr

Sacha Roudine

Joël Amossé

Christian Mougin

Alexandre R R Péry

Céline Pelosi

How to assess the feeding activity in ecotoxicological laboratory tests using enchytraeids?

Keywords: Enchytraeus albidus, Bait-lamina test, soil ecotoxicology, Pesticide, Risk assessment

The risk assessment of pesticides on soil fauna is an issue to protect agroecosystem sustainability. Enchytraeids are recognized as relevant soil bioindicators of chemical stress in agroecosystems. In laboratory, the reproduction test was found to be sensitive to reveal chemical impacts on enchytraeids. However, it does not allow to assess the impacts on ecological functions in which enchytraeids are involved. The objective of this study was (i) to explore the feasibility of the bait-lamina test with enchytraeids under laboratory conditions, and (ii) to compare its sensitivity with the Enchytraeid Reproduction Test. We exposed individuals of Enchytraeus albidus to two commercial formulations of fungicides widely used in Europe.

The EC50 reproduction for the Swing ® Gold (50 g L -1 epoxiconazole and 133 g L -1 dimoxystrobin) and the Cuprafor micro ® (50% copper oxychloride) were respectively estimated at 1.66 ± 0.93 times the recommended dose and > 496 mg kg -1 of copper. However, no impact was found on the feeding activity of enchytraeids. The bait-lamina test thus appeared less sensitive than the Enchytraeid Reproduction Test to the tested fungicides. Despite that, this test which is achievable under laboratory conditions and allows assessing indirect effects of pesticides, is quick, cheap and easy to perform. It would deserve to be used to explore longerexposure effects through the repeated addition of bait-lamina sticks.

Introduction

Since many decades, the massive use of pesticides in agroecosystems has led to a decrease in biodiversity and soil biological activity [START_REF] Tilman | Forecasting agriculturally driven global environmental change[END_REF][START_REF] Hole | Does organic farming benefit biodiversity?[END_REF].

Enchytraeids are soil annelid Oligochaeta involved in the soil structure dynamics, organic matter decomposition and nutrient cycling [START_REF] Didden | Involvement of Enchytraeidae (Oligochaeta) in soil structure evolution in agricultural fields[END_REF][START_REF] Maraldo | The excretion of ammonium by enchytraeids (Cognettia sphagnetorum)[END_REF]. They are recognized as relevant indicators of soil biological activity, anthropic activities and physicochemical stresses in terrestrial ecosystems [START_REF] Didden | Enchytraeids as indicator organisms for chemical stress in terrestrial ecosystems[END_REF][START_REF] Jänsch | Acute and chronic isopod testing using tropical Porcellionides pruinosus and three model pesticides[END_REF][START_REF] Pelosi | Are Enchytraeidae (Oligochaeta, Annelida) good indicators of agricultural management practices?[END_REF]. Despite their ecological importance and their use in standardized tests (ISO 16387 2014;OECD 220 2016), the toxicity of pesticides to enchytraeids remains poorly documented [START_REF] Römbke | Effects of Organic Pesticides on Enchytraeids (Oligochaeta) in Agroecosystems: Laboratory and Higher-Tier Tests[END_REF]. The assessment of chemical impacts on mortality and reproduction can provide key information on population dynamics that determine the provision of ecological functions. For enchytraeids, reproduction is currently recognized as the most sensitive endpoint [START_REF] Römbke | Effects of Organic Pesticides on Enchytraeids (Oligochaeta) in Agroecosystems: Laboratory and Higher-Tier Tests[END_REF]. In the same time, the effects of pesticides on the ability of enchytraeids to degrade soil organic matter are currently unknown. The baitlamina test can be used to assess the impact of soil contaminants on the feeding activity of soil dwelling organisms in situ (ISO 18311 2016). [START_REF] Kratz | The bait-lamina test: general aspects, applications and perspectives[END_REF] highlighted the potential of such test in ecotoxicological laboratory experiments. The feeding activity could be indirectly linked to an ecological function of soil organisms: the organic matter degradation. [START_REF] Helling | A comparison of feeding activity of collembolan and enchytraeid in laboratory studies using the bait-lamina test[END_REF] assessed the feeding activity of enchytraeids, collembolans and microorganisms with the bait-lamina test in a laboratory experiment and highlighted the high feeding rate of enchytraeids and collembolans compared with the feeding rate of microorganisms. However, as far as we know from the scientific literature, this method has never been used to measure the consequences of pesticide use on the feeding activity by enchytraeids. We thus tested the effects of two commercial formulations of fungicides on the enchytraeid species Enchytraeus albidus (Henle, 1837) in a natural soil in order (i) to assess the feasibility of the bait-lamina test under laboratory conditions as presented in Helling et al. (1998) and (ii) to compare the sensitivity of this test with the Enchytraeid Reproduction Test (ERT).

Material and methods

Soil and pesticides

For a better representativeness of field conditions, a natural soil was preferred over an artificial soil for bait-lamina and reproduction tests. The soil was a Luvisol (FAO soil classification) sampled in a permanent grassland in Versailles, France (48°48'31''N, 2°05'26''E). The grassland has not been treated with pesticides for more than 20 years. The soil was collected from the soil layer 0-20 cm, air-dried, sieved at 2 mm and frozen at -80°C for 48h to exterminate soil macro-meso invertebrates. The main soil physical and chemical properties were as follows (n=7 ± SE): pH: 7.5 ± 0.2, soil bulk density: 1.29; organic matter content: 32.6 ± 1.7 g kg -1 , C/N ratio: 12.7 ± 0.3, sand: 29% ± 1.3, silt: 48% ± 1.5, and clay: 23% ± 0.6 (see [START_REF] Bart | Differences in sensitivity between earthworms and enchytraeids exposed to two commercial fungicides[END_REF] for more details).

We used two commercial formulations of fungicides. The first one was the Swing ® Gold (BASF Agro SAS, composed of dimoxystrobin at 133 g L -1 and epoxiconazole at 50 g L -1 ) with the French RD at 1.5 L ha-1 for wheat crop (E-phy 2017b). Taking into account the same soil bulk density as earlier and the main concentration of this pesticide in the top 10 cm of the soil [START_REF] Mcdonald | Dimoxystrobin sorption and degradation in sandy loam soil: impact of different landscape positions[END_REF][START_REF] Chabauty | Transport of organic contaminants in subsoil horizons and effects of dissolved organic matter related to organic waste recycling practices[END_REF], the Swing ® Gold at the RD was calculated as 1.16 10 -3 mL kg -1 of the dry soil. As [START_REF] Bart | Differences in sensitivity between earthworms and enchytraeids exposed to two commercial fungicides[END_REF] estimated a LC50 for this fungicide of 11 times the RD for E. albidus, the following sublethal concentrations were used in both experiments: 1, 3 and 9 times the RD, named as SG1, SG3 and SG9, respectively. The second fungicide was the Cuprafor micro ® (Quimicas del Valles, 50% copper oxychloride) with the French Recommended Dose (RD) at 10 kg ha -1 for potato crops and vineyards (E-phy 2017a).

Taking into account the soil bulk density (1.29) and the main concentration of copper in the top 5 cm of the soil [START_REF] Couto | Accumulation of copper and zinc fractions in vineyard soil in the mid-western region of Santa Catarina, Brazil[END_REF], the Cuprafor micro ® at the RD was calculated as 15.5 mg kg -1 of the dry soil which correspond to 7.75 mg kg -1 of copper. In an OECD artificial soil, [START_REF] Amorim | Effect of soil properties and aging on the toxicity of copper for Enchytraeus albidus, Enchytraeus luxuriosus, and Folsomia candida[END_REF] estimated the LC50 for E. albidus to be > 320 mg kg -1 of copper. Based on this study, the following sublethal concentrations were used for both bait-lamina and reproduction experiments: 16, 32 and 64 times the RD named as C16, C32 and C64, which correspond to 124, 248 and 496 mg kg -1 of copper, respectively. The dry soil was spiked with aqueous solutions of the fungicides, and the soil moisture was concomitantly adjusted to 75% of the water holding capacity.

Reproduction test

The reproduction test was conducted according to the standard ISO 16387 ( 2014), but by using the previously described natural soil. Ten mature individuals collected from a laboratory culture (INRA Versailles-Grignon) were introduced in one vessel (75 mL) containing 20 g of soil (dry mass equivalent). Soil moisture content was checked and adjusted weekly with tap water. For food supply, 50 mg of finely rolled oats were mixed with the soil at the beginning of the experiment and 25 mg were then added every week until the fourth week.

Five replicates per treatment were performed. The vessels were stored in a climate room (18 ± 0.5°C, 24h darkness). After three weeks, adults were removed from the soil using a binocular microscope and the mortality was assessed. After six weeks, juveniles were fixed with ethanol (99.8% v/v) and colored with 300 µL of Bengal red (1% solution in ethanol). This procedure ensures the observation and counting of juvenile enchytraeids using a binocular microscope (ISO 16387 2014).

Bait-lamina test

The feeding activity of enchytraeids was assessed with the bait-lamina test (ISO 18311 2016) adapted for laboratory conditions [START_REF] Helling | A comparison of feeding activity of collembolan and enchytraeid in laboratory studies using the bait-lamina test[END_REF]. We used PVC sticks (18 cm long, 6 mm width and 1.5 mm thick) purchased from Terra Protecta (GmbH, Berlin, Germany). A stick contained 16 apertures which were 5 mm apart from each other (Fig. 1). As presented in the ISO guideline 18311 (2016), apertures were filled with a mixture of cellulose (70%), crushed wheat bran and sieved at 500 µm (25%) and activated charcoal carbon (5%). replicates were used per treatment, including a control. One stick was added in each tube. After five days of exposure in a climate room (18 ± 0.5 °C, 24 h darkness), the sticks were removed from the soil and fed (i.e., disappearance of at least half of the organic bait material) and not fed apertures were directly counted according to the ISO 18311 ( 2016). The number of fed apertures was used to calculate the feeding rate expressed as bait consumed (%) per stick. The mortality was assessed as in the ERT.

Statistical analysis

All data were analyzed with the statistical software R Core Team. The R package "ezec" (Zhian N Kamvar 2016) was used to estimate the effective concentration that induced 50% decrease of the reproduction (EC50 reproduction). Because normality and homoscedasticity conditions were not satisfied (tested by the Shapiro-Wilk test), non-parametric Wilcoxon tests were used to compare the control treatment to those treated with pesticides in both experiments.

A Kruskal-Wallis test was used to analyze the vertical distribution of bait consumption to test that the feeding activity was homogeneous along the profile.

Results and discussion

The reproduction test

In the control treatment, no enchytraeid mortality was observed and we found on average 68.2 juveniles (Fig. 2). In SG1 and SG3 treatments, corresponding to 1 and 3 times the RD of Swing ® Gold, no mortality was recorded. However, the number of juveniles was significantly lower in the SG3 treatment (1.4 juveniles on average) than in control treatments (Figure 2A). In the SG9 treatment, a mortality of 90% was recorded and no juveniles were found (Fig. 2 A). This mortality rate is higher than expected as [START_REF] Bart | Differences in sensitivity between earthworms and enchytraeids exposed to two commercial fungicides[END_REF] estimated a LC50 of 11 times the RD after 14 days in the same soil and with the same commercial formulation of fungicide. This could be explained by the incubation temperature which was higher in the present study (18°C, close to the 20 ± 2°C recommended by the ISO 16387, 2014) compared to the study of Bart et al. 2017 (i.e. 15°C). For instance, De [START_REF] Silva | Influence of temperature and soil type on the toxicity of three pesticides to Eisenia andrei[END_REF] showed that "the effects of pesticides (chlorpyrifos and carbofuran) on the earthworm Eisenia andrei survival, growth and reproduction may be higher at higher temperature". Actually, a higher temperature may have increased the environmental bioavailability of pesticides [START_REF] Harmsen | Measuring bioavailability: from a scientific approach to standard methods[END_REF] and thus their toxicity towards animals. The high mortality rate could explain the absence of reproduction in the SG9 treatment. Finally, the EC50 reproduction was estimated at 1.66 ± 0.93 times the RD. In the EFSA Scientific Report 46, 1-82 ( 2005), a NOEC value in a reproduction test with Eisenia fetida was estimated at <0.0887 mg kg -1 for the dimoxystrobin in a formulation such as Swing ® Gold, which would correspond to 0.6 times the RD in our experimental conditions. Our results on enchytraeids strongly support the conclusion that this fungicide is harmful to soil oligochaete reproduction.

Fig. 2 Juveniles produced by 10 mature Enchytraeus albidus exposed for 21 days in a control soil and in soils contaminated with Swing Gold® (A) at 1, 3 and 9 times the recommended dose (RD) (abbreviated SG1, SG3 and SG9 respectively), and in soils contaminated with Cuprafor micro® (B) at 16, 32 and 64 times the RD (abbreviated C16, C32 and C64 respectively) which corresponded to 124, 248 and 496 mg kg -1 of copper. Results are expressed in number of juveniles (n=5 ± SE). *** means significant differences between treatments and the control at p-value < 0.001.

Whatever the concentration of the copper fungicide tested, no mortality was observed and the reproduction of E. albidus was not significantly different between treatments (Fig. 2 B). The EC50 reproduction was > 496 mg kg -1 of copper. This value is in accordance with [START_REF] Amorim | Effect of soil properties and aging on the toxicity of copper for Enchytraeus albidus, Enchytraeus luxuriosus, and Folsomia candida[END_REF] who found for Enchytraeus albidus an EC50 reproduction value > 320 mg kg -1 with copper chloride in an OECD standardized soil. At the same time, Amorim and Scott-Fordsmand ( 2012) reported an EC50 reproduction value of 251 mg kg -1 with copper-salt (CuCl2) in a natural sandy soil. Finally, [START_REF] Amorim | Effect of soil properties and aging on the toxicity of copper for Enchytraeus albidus, Enchytraeus luxuriosus, and Folsomia candida[END_REF] found an EC50 reproduction value of 97 mg kg -1 with copper chloride in a LUFA 2.2 standard sandy soil (Speyer, Germany). Thus, copper ecotoxicity towards enchytraeid's reproduction appears to depend on the copper species and the soil used in the experiments that once again drive the bioavailabilty of contaminants to living organisms. The high soil organic matter content in the soil of our experiment (i.e. 32.6 g kg -1 ) may have decreased the copper bioavailability [START_REF] Ma | Chemical fractionation of cadmium, copper, nickel, and zinc in contaminated soils[END_REF] for enchytraeids and thus alleviate its ecotoxicological effects.

Bait-lamina test

In the same line as the ERT performed with the Swing ® Gold, a mortality rate of 92% and no feeding activity was observed in the SG9 treatment (Fig. 3 A). However, no impact of the Swing ® Gold at 3 RD (SG3 treatment) was found on the feeding activity compared with the control. The feeding activity of adult enchytraeids was thus not affected in a short-term by the Swing ® Gold fungicide. The Cuprafo micro ® fungicide induced no mortality and no impact on the feeding activity was recorded whatever the concentration tested (i.e., 16, 32 and 64 times the RD corresponding to 124, 248 and 496 mg kg -1 of copper respectively) (Fig. 3 B). As for the reproduction test, the relatively high soil organic matter content may have decreased the copper bioavailability to enchytraeids, thus explaining why the feeding activity was not affected.

Feasibility, sensitivity and ecological relevance of the bait-lamina test under laboratory conditions Larink (1994) had proposed the bait lamina test as a tool for testing the feeding activity of animals in contaminated soils under natural conditions. After several other studies (e.g., [START_REF] Andre | Bait -lamina assays as a tool to access the effects of metal contamination in the feeding activity of soil invertebrates within a uranium mine area[END_REF][START_REF] Filzek | Metal effects on soil invertebrate feeding: Measurements using the bait lamina method[END_REF][START_REF] Kula | Evaluation of soil ecotoxicity test with functional endpoints for risk assessment of plant protection products: State of the art[END_REF], a guideline was published by the International Standardization Organization (ISO) and recently updated (ISO 18311, 2016).

We tested this method under laboratory conditions and the statistical analysis performed revealed that the feeding activity of enchytraeids, through the bait consumption, was homogeneous along the soil profile in the glass tube. This result validated the experimental design (i.e., vertical distribution of enchytraeids at 3 levels with 4 individuals per level)

proposed by [START_REF] Helling | A comparison of feeding activity of collembolan and enchytraeid in laboratory studies using the bait-lamina test[END_REF]. This bait-lamina test adapted under laboratory conditions was easy to perform, quick and cheap, making it relevant as a tool to be used in risk assessment.

However, our results highlighted that the bait-lamina test was less sensitive than the ERT on a short time step (i.e. 5 days). The test could thus be adapted to properly assess pesticide impacts on an ecological function provided by enchytraeids (i.e. organic matter consumption) in laboratory. Considering the effects observed on the reproduction and thus the potential negative impacts on the population dynamics, a longer period of exposure could be tested to increase the sensitivity and the relevance of the bait-lamina test under laboratory conditions. However, given that after 5 days, the sticks were consumed at 67 ± 8% in the control treatment, a longer exposure will quickly lead to a 100% consumption. A longer exposure would thus imply the successive addition of several sticks in the tube in order to assess the feeding activity over time, thus allowing for a better assessment of the risk linked to the use of pesticides. Furthermore, this test could be proposed for standardization and submitted to a ring test procedure. For this purpose and for more repeatability, the soil could be an OECD soil.

Fig. 1

 1 Fig. 1 Illustration of the experimental device using a glass tube filled with soil, PVC baitlamina stick and 12 mature Enchytraeus albidus.

Fig. 3

 3 Fig. 3 Average feeding activity of 12 mature Enchytraeus albidus exposed for 5 days in a control soil and in soils contaminated with Swing Gold® (A) at 1, 3 and 9 times the recommended dose (RD) (abbreviate SG1, SG3 and SG9 respectively), and in soils contaminated with Cuprafor micro® (B) at 16, 32 and 64 times the RD, abbreviate C16, C32 and C64 respectively which correspond to 124, 248 and 496 mg kg -1 of copper. Results are expressed in bait consumed (%). (n=5 ± SE). *** means significant differences between treatments and the control at p-value < 0.001.

Acknowledgements

We would like to thank Jodie Thenard, Véronique Etiévant, Jean-Pierre Pétraud, Alexis Vincent and Sébastien Breuil for the maintenance of the enchytraeid culture. We thank the two anonymous reviewers for the improvement of the manuscript. This work is supported by the "IDI 2015" project funded by the IDEX Paris-Saclay, ANR-11-IDEX-0003-02.