Developing a Relationship between Time, Distance, and Alert Thresholds James Han jhan31903@gmail.com Abstract — This paper explores a novel way to measure the distance between two bluetooth devices for a certain amount of time by converting RSSI values into power, then accumulating the power through time by summing each value. I. I NTRODUCTION My project develops a relationship between time, distance, and alert thresholds to try to quantify and determine what is considered “too close for too long” at certain distances. The conventional threshold is 6 feet for 10 minutes. To quantify this, I converted all the RSSI values received for 6ft and 10 minutes, and converted them to power in mW, using the following equation: Converting from dBm to power allowed me to add up all the power accumulated throughout the 10 minutes for each RSSI value, since RSSI values were typically negative for all trials. By accumulating the power for 6 feet and 10 minutes, I was able to develop an “accumulated power threshold” for each of the 6 feet trials and average them out. For each distance shorter than 6 feet, then, I can see at what point in time when receiving RSSI signals that the accumulated power for that distance surpasses the threshold made at 6 feet for 10 minutes. This will allow piPACT to use my model to determine what is considered too close for too long, depending on the distance between the two people/bluetooth devices. My project can lead to a deeper understanding of the relationship between virus transmission, distance, and time between the two people involved. For example, PACT can use my model, or a more developer version of it, to determine when two people are 3 feet apart, if they are together for longer than, say 30 seconds, is “too close for too long" and execute the following necessary protocols for alerting them. This project involved the use of 2 raspberry pi 4s. There were many assumptions made when doing this project, since I was not able to create an ideal testing environment due to restrictions on WiFi connection and power supply. This experiment was entirely done indoors. I assumed that both of the bluetooth transmitting raspberry pis worked identically, and ideally in each trial. I also assumed that signals would not be affected or minimally affected by the environment. I did not address the effect of these variables on my test results, rather I assumed ideal conditions. II. H YPOTHESIS /H YPOTHESES My hypothesis is the following: I can use the idea of accumulated power to measure thresholds for the “too close for too long” protocol, and use these thresholds to determine what sets off the protocol at different distances for different times. This will allow me to develop an accurate quantifiable model, not just an estimation, for what constitutes “too close for too long” at distances other than 6 feet. • piPACT can use my model to determine the precise relationship between time together and distance, and if to set off the protocols. • I need to investigate the accumulated powers for distances of 6ft and closer, ideally one foot apart, for 10 minutes. • I need to gather a lot of trials so as to retrieve the most accurate results. To do this I will average out the accumulated powers for each trial at each distance. • In a piPACT seminar, the Instructor said that there has not been such model to determine what constitutes too close for too long at distances other than 6 feet. I tried to develop a model using quantifiable data rather than estimations. III. E XPERIMENTS AND D ATA C OLLECTIONS I did three sets of experiments. The first set served to determine the accumulated power thresholds for 6 feet apart at 10 minutes, the conventional time and distance to set off the “too close for too long” protocol. I The second set was more data collection. I collected data at 5 feet apart, all the way to 1 feet apart, at intervals of 1 foot. The third set of data collection was to examine why the three feet and 5 feet sets of data were producing unexpected results. They were mainly for error analysis. I. E XAMPLE E XPERIMENT O VERVIEW Exp. # Hypothesis Reason Repetitions 1 Effect of distance and time on protocol execution Determining thresholds for 6 feet apart for 10 minutes 10 1 A. Plan and Execution I set up the two raspberry pis on my bed, one on a bedpost and one on a stack of sheets and pillows, with the pi being on top of a book to level the pi out with the other pi. The scanner pi was on the wooden bed frame, and the advertiser pi was on the book. I used a measuring tape to determine the distance between the pis, and I moved the stack with the advertiser pi around to set the varying distances between the pis. I tried making the distance as exact as possible to the distance I was experimenting with at the time. To produce reliable results, I repeated each trial multiple times and then averaged out the accumulated powers for each trial in order to get the best possible measurements. I was not able to overcome to effect of other variables on my results, such as signal reflections. I had to do my experiment indoors due to restrictions on WiFi connection to my raspberry pis. B. Data Relevance The data I collected supports my hypothesis because these exact distances and times that I measured can be used to develop the model of my hypothesis. For example, I would need RSSI measurements of my pis at 3 feet apart for 10 minutes in order to determine when the accumulated power at this distance would surpass the threshold made at 6 feet apart. From the point at which the accumulated power surpasses the threshold, I would be able to pinpoint the exact time at which the accumulated power passes the threshold and therefore what is considered “too close for too long” at that specific distance. C. Examples Here is a graph of accumulated power for 1 feet, 2 feet, 3 feet, 4 feet, 5 feet and 6 feet apart over 10 minutes. We will be tinkering with this graph to figure out when exactly at each distance breaks the accumulated power threshold at 6 feet apart for 10 minutes (see Figure 1). Figure 1 : The x-axis is the scan number, with approximately ~450 scans happening for each 10 minute interval that was measured for each of the distances. The y- axis is the accumulated power in mW. IV. A NALYSIS AND A LGORITHMS After converting each received RSSI value and converting it to power, I averaged the power at each scan interval for all trials for a given distance. Then, with the calculated power at each scan interval, I measured the accumulated power at each scan interval. For 6 feet and 10 minutes, the averaged a c c u m u l a t e d p o w e r t h r e s h o l d t u r n e d o u t t o b e ~0.003315839266 mW. This value represents how the sum of the RSSI converted into power at each scan interval over the period of 10 minutes. Now, all I need to do is do the same process for each distance, and see where the accumulated power would surpass the calculated threshold of ~0.003 mW. As you can see in Figure 1, the point at which the maximum 6 feet value is very low on the graphs of the other distances. To scale the data better in order to see exactly where the intersections happened between the maximum accumulated power for 6 feet and the other distances, I scaled the data into a logarithmic graph in order to see the differences better. This graph can be seen in figure 2. 2 Effect of distance and time on protocol execution Gathering experimental data for different distances ( 5 feet, 4 feet, 3 feet, 2 feet, 1 foot ) 5 times for each distance 3 Effect of distance and time on protocol execution Error Analysis, getting unexpected results 5 more times for 3 feet and 5 feet Exp. # Hypothesis Reason Repetitions 2 Figure 2: this graph is figure 1, with each y value turning into 10 * log(y). As you can see, we can see where the maximum y value for 6 feet would intersect for the other distances much better. Some errors I would like to address would be the graphs for 5 feet and 3 feet. As you can see, the 5 feet line is lower than the 6 feet graph, when theoretically this would not be the case, since RSSI values would be higher at the 5 feet in comparison to RSSI values for 6 feet. Also, the 3 feet RSSI values are very small and fluctuate greatly. This might have happened due to experimental errors that I could not control. The graph seems to resemble noise. After realizing these errors, I did 5 more trials for both 5 feet and 3 feet, however I got the about the same results for both distances. V. C ONCLUSIONS With the data that I collected, I was able to find the hypothesis true to a certain extent. Due to the errors that I received at 3 feet and 5 feet, I was unable to make exact predictions at those distances. Here is what I was able to make for the other distances. These values are the times at which the accumulated power for each distances would surpass accumulated power at 6 feet for 10 minutes. • At 4 feet, it takes 1 minute and 28 seconds for the accumulated power to surpass ~0.0033. • At 2 feet, it takes 14 seconds for the accumulated power to surpass ~0.0033. • At 1 feet, it takes 6 seconds for the accumulated power to surpass ~0.0033. I expected for the relationship to be more linear. For example, at 4 feet, I expected the accumulated power to surpass the 6 feet threshold after a much lengthier time, however from the accumulated power values, I found out the opposite. I found that at varying distances, the accumulated power reaches the 6 feet and 10 minutes threshold at a much quicker rate than expected. I am also depending on the huge assumption that virus transmission occurs in proportion to the accumulated power, since accumulated power would increase if the distance between to people, or pis in my experiment, would decrease. Before, I said that my hypothesis was true to a certain extent because I was able to develop a model at which the “too close for too long” protocol would be executed at distances other than 6 feet. However, I am not sure whether this supports that accumulated power is a good way to measure the relationship between time, distance, and the protocol execution. My experiment serves to show a novel way to determine how close two devices were together for how long: through measuring accumulated power. Since RSSI values are typically negative, by converting the RSSI values to a positive number that increases if the received signal is stronger and summing them. If the accumulated power increases greatly at a quick rate, that is indication that two bluetooth devices are in close proximity to each other, and have been for a long time. Through this experiment I was able to learn how to use raspberry pis and their bluetooth functions, as well as many different aspects of signal strengths variations and factors that affect RSSI. I learned that there are huge variances in RSSI values depending on the distance between two devices. For example, at 3 feet, the RSSI values were very low, even if theoretically they should be higher at 3 feet compared to 4 feet. However, this was not the case. I discovered that due to these high varying RSSI values, I could not quantify accurately at which point the accumulated power would surpass the threshold made at 6 feet for 10 minutes. These results would have made no sense, since typically at a closer distance, the time at which the protocol would execute would be shorter. VI. N EXT S TEPS In order to refine my hypothesis and experiments, I would need to create a more ideal testing environment. Some examples would be to create an indoor space with minimal signal reflections, identical raspberry pis, and ideal environmental conditions. I would also do hundreds of more trials in order to get more accurate and precise results, since my experiment is one where more data means a better chance of having a more generalized model that fits better to what is expected. To utilize this research for the benefit of the PACT protocol, I would need to delve deeper into how power relates to distance and time, as well as if this is a good way to develop a relationship between the time and distance to predict what constitutes “too close for too long.” This model can be used in situations where if two people are standing next to each other at distances closer than 6 feet, we would not fire the protocol unless they were in that proximity for longer than what the model predicts surpasses the accumulated power threshold for 6 feet at 10 minutes. R EFERENCES 1. https://en.wikipedia.org/wiki/DBm 2. https://www.cnbc.com/2020/05/22/dr-anthony-fauci-says-staying- closed-for-too-long-could-cause-irreparable-damage.html 3. https://nj1015.com/keep-your-distance-how-close-is-too-close-for- coronavirus/ 4. https://www.fs.fed.us/emc/nepa/ecr2008/sessions/materials/18/ Modeling%20&%20System%20Handout.pdf 5. https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd41.htm 3