IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID 1

Context-Based Network Estimation for Energy-Efficient Ubiquitous Wireless Connectivity Ahmad Rahmati, Student Member, and Lin Zhong, Member, IEEE

Abstract— Context information brings new opportunities for efficient and effective system resource management of mobile devices. In this work, we focus on the use of context information to achieve energy-efficient, ubiquitous wireless connectivity. Our field-collected data show that the energy cost of network interfaces poses a great challenge to ubiquitous connectivity, despite decent availability of cellular networks. We propose to leverage the complementary strengths of Wi-Fi and cellular interfaces by automatically selecting the more efficient one based on context information. We formulate the selection of wireless interfaces as a statistical decision problem. The challenge is to accurately estimate Wi-Fi network conditions without powering up its network interface. We explore the use of different context information, including time, history, cellular network conditions, and device motion, to statistically estimate Wi-Fi network conditions with negligible overhead. We evaluate several context- based algorithms for the estimation and prediction of current and future network conditions. Simulations using field-collected traces show that our network estimation algorithms can improve the average battery lifetime of a commercial mobile phone for an ECG reporting application by 40%, very close to the estimated theoretical upper bound of 42%. Further, our most effective algorithm can predict Wi-Fi availability for one and ten hours into the future with 95% and 90% accuracy, respectively.

Index Terms— Network Architecture and Design, Local and Wide-Area Networks. —————————— ‹ ——————————

1 INTRODUCTION merging mobile applications in healthcare and mul- energy per MB transfer. Our solution is to employ Wi-Fi timedia demand ubiquitously available wireless net- to improve the energy efficiency of cellular data transfer. Ework connectivity. Despite of the wide deployment of However, unlike cellular networks, Wi-Fi has limited cellular networks and an increasing number of Wi-Fi availability and its network interface needs to remain hot-spots, how close we are to achieving ubiquitous con- powered-off as much as possible due to its overwhelming nectivity in our everyday life is still an open question. In power consumption. The key challenge is to determine if this work, we show the complementary strengths of cellu- attempting a Wi-Fi connection is profitable energywise. lar and Wi-Fi networks and present context-based net- Addressing this challenge requires estimating Wi-Fi net- work estimation to take advantage of their complementa- work conditions without powering on the Wi-Fi interface. ry strengths and provide ubiquitous energy-efficient In this work, we explore the use of context information wireless connectivity. to estimate Wi-Fi network conditions. Such context in- In order to realistically evaluate context-based network formation includes time, history, cellular network condi- estimation for everyday life, we gathered field data about tions, and device motion. We devise effective algorithms cellular and Wi-Fi networks through participants from to learn the conditional probability distribution of Wi-Fi the Rice community in Houston, Texas, a major US urban network conditions, given context information. With the area from September 2006 to February 2007. Our data conditional probability distribution, we formulate wire- showed a bright picture regarding network availability: less data transfer through multiple interfaces as a statis- on average, our participants spent 99% and 49% of their tical decision problem, and validate our solutions through everyday lives under cellular and accessible Wi-Fi net- both trace-based simulation and field trials. Further, we works, respectively. However, the reality about the ener- evaluate the performance of our algorithms for the pre- gy cost and battery lifetime is not as bright. For example, diction of future network conditions. On average, our wireless data transfer for a three-channel ECG reporting most effective algorithm can predict Wi-Fi availability for application will reduce the battery lifetime of a commer- one and ten hours into the future with 95% and 90% accu- cial mobile phone by over 75%. racy, respectively. For the ECG reporting application, our Compared to Wi-Fi, cellular networks require much most effective algorithm improves the battery lifetime of lower power to stay connected but incur much higher a commercial mobile phone by 40%, close to the theoreti- cal upper bound of 42%. Our field validation for the same ———————————————— application showed a 35% improvement in battery life- Ahmad Rahmati and Lin Zhong are with the Department of Electrical and Computer Engineering, Rice University, Houston, TX 77005. E-mail: {rah- time. mati, lzhong}@rice.edu. We have made the following contributions in this work: • We present a reality check of network availability Manuscript received (insert date of submission if desired). Please note that all acknowledgments should be placed at the end of the paper, before the bibliography. xxxx-xxxx/0x/$xx.00 © 200x IEEE

2 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

and the energy cost of ubiquitous connectivity in cording to the GSM Association [4], there are over 2.5 people’s everyday life, and study the use of Wi-Fi billion global mobile phone users as of October 2006, ac- networks to improve the energy efficiency of cellular counting for 40% of the world population. Moreover, 80% networks. We offer a theoretical analysis on data of the world population is covered by cellular networks, transfer through multiple wireless interfaces. Based double that of year 2000. As a result, the deployment of on our power measurements on a commercial mobile cellular data services has the potential to enable an un- phone, we provided the theoretical upper bound of precedented portion of the world population with increa- energy savings. singly ubiquitous wireless Internet access. The effective • We investigate several algorithms to estimate Wi-Fi expansion of cellular network coverage roots in that it is a network conditions using context information. Fur- wireless metro-area technology and each base station ther, we evaluate their performance for the prediction covers a relatively large area. However, the potentially of future network conditions. Estimated network large distance between a mobile phone and its base sta- conditions can be utilized to minimize the energy tion limits the energy efficiency for data transfers. consumption of data transfers. Our measurements Shorter range wireless networks are also increasingly and field evaluation showed that our estimation algo- available, especially in urban, residential, and business rithms can achieve energy savings close to the theo- settings. Wi-Fi, a wireless local-area network (WLAN) retical upper bound. technology, has seen rapid expansion. It has been recently estimated that there are more than 14 million Wi-Fi access The rest of this paper is organized as follows. In Sec- points in US homes [5]. Several major US cities have an- tion 2, we provide the background for our study and in nounced plans to deploy city-wide Wi-Fi networks. Yet, Section 3, we describe our experiments, field studies, and Wi-Fi still has limited availability compared to cellular energy model. In Section 4, we formulate data transfer networks. On the other hand, the relatively short range of through multiple wireless interfaces as a statistical deci- Wi-Fi enables it to achieve a much higher data rate and sion problem, present a theoretical analysis. We present a lower energy per MB data transfer compared to cellular. suite of context-sensitive algorithms to estimate network Therefore, to achieve energy-efficient ubiquitous wireless conditions in Sections 5, and validate them through a real connectivity, it is important to combine the strength of world traces and a field test with a mobile healthcare ap- both networks, as is the focus of this work. plication in Section 6. We present a discussion in Section 7 and address related work in Section 8. Finally, we con- clude in Sections 9. Early results from this work were pre- sented in Context-for-Wireless [1].

2 BACKGROUND In addition to traditional applications, such as email and web browsing, emerging applications in mobile healthcare, multimedia, and Web 2.0 have created an in- satiable appetite for ubiquitous wireless data. Emerging mobile healthcare applications seek to collect health in- Figure 1. An HTC Wizard with the sensor board in its battery formation via body-worn or implanted sensors, and de- compartment (left) and an opened battery for power measure- liver health-promoting messages in situ and throughout ment (right) people’s everyday life. Many mobile healthcare applica- tions depend on ubiquitous wireless connectivity from a 3 EXPERIMENTAL PLATFORM mobile device to report health data and deliver messages in time. More importantly, they require a broad range of In order to realistically evaluate context-based network data size and allowable transfer latencies [2, 3]. The in- estimation for everyday life, we have gathered network creasing information capturing and processing capabili- data from a number of mobile users over six months, and ties of mobile devices, especially mobile phones, enables obtained the energy profiles of wireless interfaces on mul- users to produce and consume multimedia data in a per- tiple mobile phones through measurement. In this sec- vasive fashion. The desire to document our life and share tion, we present our experiments setup and findings. our experience has created multimedia content for Web 3.1 Field Data Collection and Participants 2.0 applications, e.g. video blogging and YouTube. Com- pared with mobile healthcare applications, multimedia We have developed and installed logging software on contents impose a much larger data size but may tolerate 11 HTC Wizard Pocket PC phones to records network larger latencies. The need for energy efficient ubiquitous characteristics with minimal intrusion to normal phone connectivity that can address a broad range of data size operation. At the time of the study (Fall 2006 – Winter and latency requirements has never been as urgent as it is 2007), the Wizard was one of the most feature-rich com- today. mercial Pocket PC phones. The Wizard is commercially Indeed, cellular networks are becoming universal. Ac- available under a variety of brands, including T-Mobile

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 3

Table 1. Average measured additional energy costs for various cellular and Wi-Fi activities Device Cellular (EDGE) Wi-Fi Em Et (J/MB) Ee Em (J/min) Et (J/MB) (J/min) Download Upload (J) PSM No PSM Download Upload

HTC Wizard 1.2 – 6 40 – 50 95 – 125 5 19 61 5 – 7 7 – 11 HTC Tornado 1.2 – 2 100 – 150 170 – 300 10 6 53 4 – 6 5 – 7 HP iPAQ hw6925 1 – 2 130 – 160 220 - 330 13 4 46 5 – 14 6 – 15

MDA and Cingular 8125. It is a 5.0 GSM the preferred network in the rest of the paper. Yet, on phone with integrated 802.11b and is capable of EDGE average, our participants are covered by preferred and/or data connectivity. It has a battery capacity of 1250mAh at unencrypted networks for 77% of their daily lives. While 3.7 volts. not all unencrypted access points are accessible, Nichol- Our logging software, Tower Logger, measures net- son et al. showed that over 46% of all unencrypted access work availability, signal levels, and context information. points in residential areas were accessible [8]. It records the cell tower ID, signal strength, and channel of the currently-associated GSM cell and those of up to 6 3.2 Energy Cost for Data Transfers other visible cells every 30 seconds. It also records the 3.2.1 Energy Model unique Basic Service Set Identifier (BSSID), signal strength and the security property of all visible Wi-Fi In order to develop an energy model for wireless data access points. With an extra sensor board, Tower Logger transfers on the phone, we measured its power consump- can also record motion information of the phone. We de- tion under different signal conditions. The phone requires veloped the sensor board based on the Rice Orbit sensor the battery in place to power up; therefore we have to platform [6], which can be placed in the phone battery leave the battery inside for measurements. To eliminate compartment with a cover from a larger battery (Figure 1) interference from the battery charging circuitry, we and directly powered by the phone battery. The sensor measured the power transferred from the battery to the board continuously samples an on-board three-axis acce- phone while the charger was disconnected, instead of lerometer at 32Hz per channel. The data is buffered by measuring the power supplied by the charger. To achieve the sensor board and collected by the phone every 30 this, we placed a 0.1-ohm resistor in series with the seconds. Ground pin (Figure 1). The phone power consumption 14 volunteers from the Rice campus participated in our can then be calculated by measuring the input voltage to data gathering. They carried around our experimental the phone and the voltage drop on the resistor. We used phones for at least three weeks and could opt to use their the Measurement Computing USB-1608FS data acquisi- own SIM card on the phone. We requested all partici- tion device with a sampling rate of 1 KHz for our mea- pants to carry the phone as they would carry their own surements. phone. We interviewed each participant regularly to doc- Furthermore, we observed cellular and Wi-Fi signal ument any significant diversion from their daily activi- strength affects data transfer speeds and success rates. To ties, for example, travels and forgetting to carry the accurately account for them, we developed another log- phone. Tower Logger was installed on the phones of all ging application, Rate Logger, to measure Wi-Fi and cel- 14 participants. Three participants, P1, P2, and P3, were lular data rates and signal strength every five minutes for given phones equipped with the sensor board. two of our participants, as sampling tools, for approx- Unlike war-drives or spatial coverage measurements, imately one month. We utilized this information for the such as in [5, 7], we measured personal coverage: the sig- development of an energy model, assuming a constant nal strength seen in a person’s daily life. More informa- network condition throughout a single transfer. The as- tion and detailed findings regarding the participants and sumption is reasonable if the transfer time is short. We their traces can be found in [1]. can also apply our model to a long transfer by splitting it Our first observation is that cellular network availabili- into multiple short transfers. Further details regarding the ty is extremely high (99.1%). On average for all our partic- energy model are reported in [1]. ipants, cellular signal strength is above -94 dBm (three or We model the additional system energy cost for estab- four bars) for more than 75% of time. This is not surpris- lishing a connection and transferring n megabytes data as ing for a major urban area like Houston. Nevertheless, while weak signal strength may be acceptable for voice = + ⋅ EtnEeE (1) communications, it is not true with data communications. where Ee is the energy cost for connection establishment On second observation is that on average, our partici- and Et is the energy per MB transfer. To account for poss- pants spent 49% of their daily lives under preferred Wi-Fi ible transfer failures, we assume a failed transfer will networks. We define preferred networks as those that the simply be retransmitted under the same network condi- participants were known to have access to. We will use

4 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

64 min 64 min 64 min 10% 32 min 32 min 32 min 10% 16 min 16 min 16 min 30% 60% 10% 8 min 8 min 8 min 50% 110% 15% 4 min 4 min 4 min

2 min 2 min 2 min Transfer interval Transfer interval Transfer

Transfer interval Transfer 160% Transfer Interval Transfer interval 70% Transfer Interval 1 min 1 min 1 min 20% 30 sec 30 sec 30 sec

15 sec 15 sec 15 sec 0 0 0 100 200 300 400 500 600 700 800 900 100 200 300 400 500 600 700 800 900 100 200 300 400 500 600 700 800 900 1000 1000 1000 DataData ssize iz e (KB) DataData size (KB) DataData size (KB)(KB) (a) Average among all participants (b) Simulated 80% Wi-Fi availability (c) Simulated 20% Wi-Fi availability Figure 2. Potential phone battery lifetime gain achieved by optimally selecting between Cellular and Wi-Fi, for various transfer sizes and intervals, for measured and simulated Wi-Fi availability tion. Then, when S is the transfer success rate, the energy values are shown with and without 802.11 MAC Power- cost is approximately Saving Mode (PSM), using the “maximum battery” set- ting on the phones, if available. We must note that the n EeE ⋅+= Et (2) mobile device must stay connected to an access point to S use PSM. The range for each value is based on best and worst signal strength. It is interesting that the maximum Table 1 provides the additional energy cost we have power saving setting on the HTC Wizard only provided a measured for various activities in cellular and Wi-Fi net- 3.5% reduction in Em, compared to the default (balanced) work interfaces on the HTC Wizard in addition to the HP setting. iPAQ hw6925, a Pocket PC phone with built-in GPS, and Our measurements in Table 1 clearly show that cellular the HTC Tornado, a commercially available and Wi-Fi network interfaces have complementary ener- under various brands, e.g., T-Mobile SDA. gy profiles: the cellular interface can cost an order of 3.2.2 Implications magnitude more than the Wi-Fi interface to transfer data (Et), but cost an order of magnitude less energy to main- While cellular network interfaces on mobile phones are tain the connection (Em). It is important to note that be- usually always on and connected, Wi-Fi interfaces are cause the cellular network interface on mobile phones is typically turned off due to limited availability and high usually left on for incoming calls, Em should be regarded power consumption, as we will see later. Checking for as zero for data applications using the cellular interface. Wi-Fi availability and establishing a connection consumes Since Wi-Fi consumes significant power even in PSM, considerable energy. The energy cost is closely related to and Wi-Fi availability is low (therefore, PSM cannot al- the time required to either connect to an access point, or ways be used), it is usually more energy-efficient to pow- timeout assuming Wi-Fi is unavailable. We have meas- er off the Wi-Fi interface and then re-establish the connec- ured the additional energy cost for the whole connection tion when necessary. For example, on the HTC Wizard, it process (E ) to be on average 5J on the Wizard. If the e is more energy-efficient to power off the Wi-Fi interface if phone is not associated to an access point after a specific it has to be idle for more than 15 seconds. Checking for timeout period, we assume there is no accessible Wi-Fi Wi-Fi availability and establishing a connection consume network. We have found 5 seconds a reasonable timeout considerable energy too, Ee. This large energy overhead for the association process. Using a 5 second association makes Wi-Fi inefficient for small data transfers. While timeout, the energy cost for an unsuccessful attempt is newer Wi-Fi implementations on mobile devices have also about 5J for the HTC Wizard. Since we assume the been shown to be more energy-efficient [9], they still have phone is always connected to the cellular network, its Ee a complementary energy profile to updated cellular inter- is zero. faces because of difference in their targeted ranges and The additional energy cost for a wireless activity refers application modalities. to the extra energy consumption as compared to that if Indeed, neither cellular nor Wi-Fi alone can provide ac- the activity is absent in an idle device. The values are av- ceptable battery lifetime for future mobile applications erages from multiple measurements. Et denotes the addi- requiring ubiquitous connectivity [1]. This motivates our tional energy cost for transferring 1MB data. We have proposal to combine their complementary strengths for ignored the effects of TCP and HTTP connection estab- achieving energy-efficient ubiquitous connectivity. lishment, round trip latency (RTT), and TCP slow start, because the energy cost of data transfer is much larger. Em denotes the energy cost for maintaining an idle con- 4. DATA TRANSFER ON MULTIPLE INTERFACES nection for a minute, compared to that when the corres- We next present the problem formulation for data ponding network interface is powered off. For Wi-Fi, the transfer through multiple wireless interfaces, and using

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 5

20 10 50 18 9 45 16 8 40 14 7 35 12 6 30 10 5 25 8 4 20 6 Cellular 3 Cellular 15 Cellular Naïve Naïve Naïve Transfer energy (J) Transfer energy (J) Transfer energy (J) 4 2 10 Simple Simple Simple 2 1 5 Ideal Ideal Ideal 0 0 0 0 20 40 60 80 100 120 140 160 180 200 0 102030405060708090100 0 50 100 150 200 250 300 350 400 450 500 Data size (KB) Data size (KB) Data size (KB) (a) Average among all participants (b) Simulated 80% Wi-Fi availability (c) Simulated 20% Wi-Fi availability Figure 3. Data transfer energy vs. data size

10 10 10 Ideal vs. 9 9 Ideal vs. 9 Ideal vs. Cellular Cellular Cellular 8 8 8 Simple vs Simple vs Simple vs 7 Cellular 7 Cellular 7 Cellular 6 Ideal vs. 6 Ideal vs. 6 Ideal vs. Simple Simple Simple 5 5 5 4 4 4 3 3 3 2 2 2 1 1 1 Energy saving per transfer per (J) saving Energy transfer per (J) saving Energy Energy saving pertransferEnergy (J) 0 0 0 0 50 100 150 200 250 300 0 40 80 120 160 200 0 100 200 300 400 500 600 700 800 Data size (KB) Data size (KB) Data size (KB) (a) Average among all participants (b) Simulated 80% Wi-Fi availability (c) Simulated 20% Wi-Fi availability Figure 4. Data transfer energy saving vs. data size our field-collected traces and energy profiles, we theoreti- n r E )( +⋅= EeCEt (3) cally analyze the energy-saving potential of selecting be- ,availablea r aa a CS aa )( tween Wi-Fi and cellular interfaces.

4.1 Problem Description If network a is unavailable, the energy cost of attempt- Based on our data traces, we assume that a mobile sys- ing an unsuccessful transfer would be the energy re- tem is always connected through a low-power high- quired to check for a connection: availability primary wireless network, which offers a E = Ee lower data rate and consumes higher energy per MB a, aeunavailabl (4) transfer. For mobile phones, the primary network is the cellular network (in our case, GSM/EDGE). We assume Since the interface for the primary network is always that alternative wireless networks may be available at on, there is no energy cost for connection establishment. limited locations or times. They offer higher data rates Therefore, the energy cost to transfer the data through the and consume lower energy per MB transfer. However, primary interface is simple they cost extra, usually significant, power to stay con- nected and incur significant energy and time overheads n r (5) E p r ⋅= CEt pp )( for connection establishment. For the HTC Wizard and CS )( many modern mobile handsets, one additional network is pp

Wi-Fi. Let Pa denote the probability that the alternative net- The problem that we propose to solve is: work a is available. The expected energy saving of at- If the device needs to transfer n MB of data with minim- tempting to use network a is al energy consumption, should it search for an alterna-

tive network to transfer the data? = ⋅ − EEPE ()1 ⋅−− EP (6) To solve this problem, we need to calculate the ex- , ( ,availabeapapa ) aa , eunavailabl pected energy saving for attempting to use an alternative or network, a, instead of the primary network, p, to transfer r r r ⎛ CEt )( CEt )( ⎞ data. Assuming network a is available with condition C , nPE ⋅⋅= ⎜ pp − aa ⎟ − Ee (7) , apa ⎜ r r ⎟ a the expected energy cost for establishing a connection and ⎝ CS pp )( CS aa )( ⎠ transferring n MB of data through it can be estimated with Equation (2) as Our algorithm for selecting the network interface for

6 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

1 data transfer works as follows. The system calculates Ea,p for every data transfer. If Ea,p is negative, the system trans- 0.9

fers the data through the primary network. Otherwise, it availability

Fi will attempt to connect using interface a. In the case of ‐ 0.8 Wi

multiple alternative interfaces, the system can choose the autocorreletaion) same 0.7 of network with the most expected energy saving by calcu- lating E for all alternative networks. a,p 0.6 In our study, the primary network is cellular and the (normalized Probability only alternative network is Wi-Fi. The only network con- 0.5 01234 dition we consider is signal strength, denoted by Cp and Time (days) Ca, for cellular and Wi-Fi networks, respectively. We as- sume the data size, n, is provided through the software Figure 5. Network conditions are related at the same time of day in different days attempting the transfer. Cellular signal strength, Cp, is available without any extra energy cost. Therefore, the bility P(WiFi|Context), of Wi-Fi availability given the ob- key to calculating Ea,p using (7) is Ca and Pa. Before we served Context. We study various sources of context in- address how to estimate Ca and Pa, we next offer the theo- formation for such estimation and employ the collected retical upper bound for energy savings by using multiple traces to evaluate our solutions through simulation. For wireless interfaces for data transfer, assuming Ca and Pa each simulation and each participant, we use half of the are available with an insignificant energy cost. trace for training, if necessary, and the rest for evaluation. 4.2 Potential Energy Savings 5.1 Naïve and Simple Solutions To determine the maximum potential energy benefit of A naïve solution is to have the system attempt a Wi-Fi using multiple wireless interfaces, we examine the ideal connection for every data transfer, regardless of data size case where Ca and Pa are available without an extra ener- and expected network conditions. Obviously, for small gy cost. Pa is equal to 1 if a Wi-Fi connection is available data sizes, the high connection establishment energy (Ee) and 0 otherwise. Analysis of the ideal case will give the can easily cancel out the energy saving from the actual theoretical upper bound in energy savings achievable by data transfer. estimating Ca and Pa. The Simple Solution uses minimal context information. Using the network traces and the energy data for the It employs each user’s all time average for Ca and Pa, to HTC Wizard, we calculate the average battery lifetime of decide whether to attempt a Wi-Fi connection. We use it an otherwise idle phone using cellular-only transfer and as the baseline, along with the theoretical upper bound that of one using the ideal case of data transfer through from Section 4.1, for evaluating other algorithms in be- multiple wireless interfaces. Figure 2 (a) shows the aver- low. Figure 3 and Figure 4 show the average data transfer age battery lifetime gain for different data rates and trans- energy and energy savings vs. data size using our meas- fer intervals. We can see the use of multiple wireless in- ured traces and hypothetical 20% and 80% Wi-Fi availa- terfaces has a large impact for larger data sizes and/or bilities, respectively. It is clear that the Simple Solution longer transfer intervals. Moreover, Wi-Fi network avail- provides substantial energy saving for larger data sizes ability is a major factor too. The average Wi-Fi availability and higher Wi-Fi network availability. However, the dif- in our field-collected traces is 49%. In Figure 2, we show ference between the ideal case and the Simple Solution is the battery lifetime gains for hypothetical 20% and 80% substantial for smaller data sizes and/or lower Wi-Fi cov- Wi-Fi availabilities, assuming average Wi-Fi signal erage. In these cases, accurate network condition estima- strength from the traces. Figure 2 (b) and (c) clearly show tion is critical. We next propose several advanced algo- that the effectiveness of using multiple wireless interfac- rithms for network condition estimation for this sake. es, compared to a cellular-only policy, is improved with increased Wi-Fi availability. 5.2 Hysteretic Estimation People often stay at a certain location for a rather long time, therefore we expect that network conditions be re- 5 CONTEXT-BASED NETWORK ESTIMATION lated in time. This forms the basis for Hysteretic Estima- In Section 4.2, we calculated the theoretical upper tion for which, the context information is previously bound of energy savings achievable by the judicious use measured network conditions (Ca and Pa). We use them of multiple wireless interfaces, assuming the system until we either have a new measurement or a predeter- knows network conditions, Ca and Pa, for free. In reality, mined timeout runs out, after which we will re-measure measuring Wi-Fi network conditions incurs the connec- network conditions upon the next data transfer. Obvious- tion establishment energy cost, Een. In this section we ly, Hysteretic Estimation is more effective for shorter data present and evaluate different methods for the system to transfer intervals, where network conditions are more estimate Ca and Pa without powering on the Wi-Fi inter- likely to remain valid. The performance of this algorithm face, and compare their energy savings with the theoreti- depends on the predetermined timeout value and how cal upper bound. Mathematically, we can formulate the often network conditions change. The timeout can be estimation problem as estimating the conditional proba- adaptively tuned by the system based on the success rate

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 7

1 1

0.8 0.8 rate rate

0.6 0.6 positive

positive 0.4 0.4 Cell ID

True Combination True .5 hr prediction Hysteretic 0.2 1 hr prediction 0.2 2 hr prediction Cell ID 0 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

False positive rate False positive rate

Figure 6. ROC curve for Cell ID Estimation of current Figure 8. ROC curve for the combination of Hysteretic Es- and future network availability timation and Cell ID Estimation

1 1

0.8 0.8 rate rate

0.6 0.6 positive positive

0.4 0.4 Fingerprinting True

True Combination .5 hr prediction 0.2 1 hr prediction 0.2 Acceleration 2 hr prediction Cell ID 0 0 00.20.40.60.81 00.20.40.60.81

False positive rate False positive rate

Figure 7. ROC curve for Fingerprinting Estimation of Figure 9. ROC curve for the combination of Acceleration current and future network availability Estimation and Cell ID Estimation of its previous estimations. We have tested a simple ver- as context information and estimate P(WiFi|time of day). sion of this algorithm with a constant 25-minute timeout. We divide days into 24 one-hour timeslots and compute It has the advantage of not requiring training. Figure 12 the all time average Wi-Fi availability and signal strength shows, on average among all our participants, the accura- for each timeslot, as Phist and Chist, respectively, when we cy of Hysteretic Estimation vs. time for Wi-Fi availability, are in the same timeslot. i.e. the probability of having the same Wi-Fi availability after a specific time. 5.4 Cellular Tower Estimation Network conditions are highly correlated to geograph- 5.3 TimeOfDay Estimation ical location. While a GPS can provide very accurate loca- People often spend days in predictable fashion, e.g., at tion information, its energy cost is too high for our pur- work at home, commuting, etc. Figure 5 shows the prob- pose, as our measurement showed in Section 3.2.1. Fur- ability of having the same Wi-Fi availability after a specif- thermore, GPS systems only work outdoors. There has ic period of time spanning over several days. It confirms been considerable research on using visible cell tower IDs that network conditions at the same time of different days for localization [7, 10]. Localization requires knowing the are statistically related. We would expect to observe a location of existing cell towers, e.g. by means of GPS. In similar correlation for the same days in different weeks contrast, we directly train our algorithm and estimate Wi- had our logging period been longer. Fi network conditions visible GSM cell towers and with- For TimeOfDay Estimation, referred to as History Es- out positioning. We study the use of visible cellular tow- timation in our previous work [1], we use the time of day ers as the context for estimating P(WiFi|Context).

8 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

1 Data transfer 0.99 availability

Fi ‐ 0.98 Wi

Are previous same 0.97 Use Cell ID or

of network conditions no valid? (Hysteretic Fingerprinting 0.96 or Acceleration) to decide Probability 0.95 yes 1 10 100 1000 10000 100000

Movement in 30 second period Data transfer Figure 10. Probability of having the same Wi-Fi availability after 30 seconds decreases with increased movement intensity Figure 11. Flowchart for combining different estimation algorithms 5.4.1 Cell ID Estimation For Cell ID, we calculate P(WiFi|visible cell towers) as a

1 weighted sum of the probability of Wi-Fi availability for when each cell tower is visible, or P(WiFi|i), where i uni- 0.9 quely identifies a cell tower. This can be easily recorded availability

Fi from previous measurements. We also store ni, the num- ‐ 0.8 Wi ber of previous measurements used for calculating of P(WiFi|i), and Ccell,i, the average Wi-Fi signal strength 0.7 when Wi-Fi is available and tower i is visible We then estimate Wi-Fi availability, P(WiFi|visible cel-

accuracy Fingerprinting prediction

0.6 lular stations), or Pcell for short, as the weighed mean of Cell ID prediction Hysteretic (knowing current conditions) P(WiFi|i) among all visible cell towers. 0.5

Prediction 0 60 120 180 240 300 360 420 480 540 600 ∑ i ⋅ iWiFiPw )|( ∈Vi Time (minutes) Pcell = ∑ wi ∈Vi Figure 12. Prediction accuracy of different algorithms. For 4 Hysteresis, we assume current conditions are known. ⋅= ()iWiFiPnw − 5.0)|()log( (8) i i as the simple mean of signal strengths when Wi-Fi was The weights, wi, are empirical and consist of two parts. available under a specific fingerprint. The ROC curve for log(ni) gives more weight to towers that have been seen Wi-Fi availability using Fingerprinting Estimation is more often. In other words, the more samples we have of shown in Figure 7. Our results show that, on average any tower, the more we trust its estimation. The exponent among all our participants, fingerprinting is the most ef- 4 (Pcell,i – 0.5) gives larger weight to towers that have fective estimation method. However, we must note that P(WiFi|i) close to 0 or 1. In other words, the more certain compared to Cell ID, Fingerprinting requires considera- estimation is, the more we trust it. bly more memory to store training data and requires We calculate the Cell ID estimated Wi-Fi signal, Ccell, as prior training at each location to be effective. the simple mean of Ccell,i among all visible cell towers. A receiver operating characteristic (ROC) curve shows the 5.5 Acceleration Estimation relationship between the fraction of true positives and For P1, P2, and P3, we have recorded three-axis accele- false positives. The ROC curve for Wi-Fi availability using ration of their mobile phones. While there has been exten- Cell ID Estimation is shown in Figure 6. sive research on extracting user context information and physical activity from acceleration sensors [2], we use the 5.4.2 Fingerprinting Estimation acceleration data in a very simple fashion. We have ob- For Fingerprinting Estimation, we use an ordered set of served the recorded acceleration values for a stationary up to seven visible cell towers reported by the phone (i.e. phone are virtually constant. However, they constantly the fingerprint) as the context, and calculate change when the phone is moving, often carried or han- P(WiFi|ordered set of visible cell towers). Similar methods dled by the user. In turn, wireless network conditions are have been used for localization based on Wi-Fi access expected to remain relatively constant if the phone hasn’t points [11] and cellular base stations [12]. moved much. Therefore, we compute the movement in- We calculate the Fingerprinting estimated Wi-Fi signal tensity, m, as:

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 9

mance improvement of the combination of Fingerprinting current (11) with Hysteretic Estimation was minimal and not visible m ∑ [x y z )()()( +Δ+Δ+Δ= ctAtAtA ] = resett on ROC curves, as it is already extremely good. where ΔΑx(t), ΔAy(t), and ΔAz(t), are the change in acce- 5.7 Predicting Future Network Conditions leration along the three axes, measured at 32 Hz. c is a Our above mentioned algorithms were designed and eva- small positive constant to account for drift, or slow rate luated to estimate current Wi-Fi network conditions. Yet, changes in wireless conditions. m is reset to zero every time network conditions are measured. It then accumu- some applications may be able to delay data transfer in lates as time passes by. Figure 10 shows the average order to utilize better network conditions. In this case, a probability of having the same Wi-Fi availability after 30 prediction of future network conditions is necessary in seconds versus m for all our participants with accelera- addition to a cost function is necessary to account for the tion logging. Our Acceleration Estimation assumes net- delay and power savings for each particular application. work conditions are unchanged and uses previous meas- While defining and solving the cost-benefit function for ured network conditions if the movement intensity, m, is particular application is outside the scope of this work, below a predetermined threshold. Similar to Hysteretic we evaluate the performance of several of our algorithms Estimation, Acceleration Estimation is more effective for for the purpose of predicting future conditions: shorter data transfer intervals, where previous network Hysteretic Estimation can estimate the possibility of hav- conditions are more likely to remain valid. The perfor- ing the same network availability of a previous measure- mance of this algorithm depends on the predetermined ment for a future time, according to their time distance. values and how much the user actually moves around. The Cell ID and Fingerprinting algorithms determine Wi- The predetermined values can be adaptively tuned by the Fi network conditions irrespective of its previously meas- software based on the success rate of its previous estima- ured condition. Therefore, by training them while shifting tion. We have tested a simple version of this algorithm back cellular and time-of-day observations by ∆, we can with a constant threshold and c. It has the advantage of utilize them for predicting network conditions in time ∆ not requiring training. into the future. The average prediction accuracy among Some commercial phones today are already equipped all our participants for the Fingerprinting, Cell ID, and with accelerometers, e.g., the Nokia 3220 and 5500, the Hysteresis algorithms is compared in Figure 12. For Hys- Sharp V603SH, and the Apple iPhone. Accelerometers can teresis, we assume current conditions are known, other- be made ultra-low power. For example, the Kionix wise the time difference of the last measurement should KXM52 three-axis accelerometer on our sensor board con- be added to the prediction time. We can see that, in par- sumes less than 0.35 J/h for a 32 Hz sampling rate. As ticular, Fingerprinting performs very well for future net- large displacements typically do not happen instanta- work availability prediction. The ROC curve for Wi-Fi neously, we expect the energy consumption of the accele- availability prediction 30, 60, and 120 minutes into the rometer can be further reduced by reducing its measure- future using the Cell ID and Fingerprinting algorithms ment duty cycle, e.g. recording two seconds every ten are shown in Figure 6 and Figure 7, respectively. seconds.

5.6 Combination Algorithms 6. REAL-LIFE PERFORMANCE EVALUATION One challenge we face is how to combination different estimation algorithms. The key is to combine them based 6.1 Trace Based Evaluation on their individual strengths. Hysteretic and Acceleration In this section, we show how the performance of each Estimation algorithms are best suited to accurately de- network condition estimation algorithm translates into termine whether we should expect a change in network real-life energy savings We use the field-collected traces conditions. On the other hand, the Cell ID and the Fin- to calculate the energy consumption of each algorithm for gerprinting algorithms determine network conditions a typical ECG reporting application with data transfers of irrespective of its previously measured condition. There- 270 KB every 5 minute, a data rate of a typical three chan- fore, we combine them as follows: nel ECG (each sampled at 200Hz with 12-bit resolution We first use either Hysteretic or Acceleration Estima- [3], without compression). For each algorithm, we com- tion to determine if we should expect a change in network pare its energy saving beyond that of the Simple Solution, conditions. If no change is expected, we will use the pre- in terms of percentage of that by ideal case. For example, viously measured network conditions. If a change is ex- if the average energy cost for a data transfer is 23 J for one pected, we will use Cell ID or Fingerprinting Estimation of our estimation algorithms, and 30 J and 20 J for the to calculate network conditions, as shown in Figure 11. Simple Solution and the ideal case, respectively, the effec- Figure 8 and Figure 9 show the ROC curve for the tiveness of the estimation algorithm is: combination of Cell ID Estimation and either Hysteretic − 2330 or Acceleration Estimation, respectively. We can see that = %70 − 2030 while each of the estimation algorithms did well alone, the key for further improved performance is combining The results for all estimation algorithms except Accele- them according to their individual strengths. The perfor- ration Estimation are shown in Figure 13. We can see that

10 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

Hysteretic TimeOfDay Cell ID CellID + Hysteretic Fingerprinting Fingerprinting + Hysteretic 100% 90% 80% 100%)

=

70% 60%

(ideal 50% 40% 30% 20% 10%

Effectiveness 0% P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 Average

Participant Figure 13. Effectiveness of estimation algorithms for all participants for minimizing energy consumption

100% Finally, as previously discussed, the data transfer in- terval impacts the efficiency of Hysteretic and Accelera- 80% tion Estimation algorithms. To highlight the impact, we

100%) present the performance of those algorithms for P1, P2,

=

60% and P3 in Figure 16. The data size for each transfer is 270 KB for all three intervals. As expected, their performance is (Ideal higher for shorter transfer intervals, when network conditions 40% are more likely to remain valid. In this section, we presented and evaluated several al- 20% Cell ID

Effectiveness gorithms for estimating C and P with various context Fingerprinting a a information. We showed that they have very good per- 0% formance when Wi-Fi estimation is important, i.e., lower 0.1 1 10 100 Wi-Fi availability. Moreover, our algorithms have com- Straight line distance from home to work (Km) plementary strength. For example, Hysteretic Estimation Figure 14. For participants with longer commutes, the work well for shorter transfer intervals and for partici- effectiveness of Cell ID increases while the effectiveness of pants with high Wi-Fi availability. TimeOfDay Estimation Fingerprinting decreases. works very well for participants with regular hours and locations of Wi-Fi availability. We also observed that the performance of Cell ID Estimation is improved with in- on average, fingerprinting is the most effective estimation creased mobility, which is opposite of Fingerprinting. method. However, fingerprinting requires prior training Finally, combining different estimation algorithms can at every specific location. In addition, Fingerprinting and further improve performance. Cell ID require detailed cell tower information. On the Our goal is by no means to devise the best possible es- other hand, Hysteretic, TimeOfDay, and Acceleration timation algorithm. Instead, our main focus is to demon- estimation can work on devices with Wi-Fi but without strate how readily available context information, such as GSM interfaces, e.g. the iPod Touch. time and cell tower ID, can be used to estimate Wi-Fi Detailed analysis of the performance of our estimation network conditions. We have kept our algorithms simple algorithms provides interesting findings. First, we can and have limited the number of parameters in them. clearly see that combining multiple heterogeneous sources of Therefore, we expect their overhead to be negligible, and context information provides enhanced performance. that they would generalize well [13], instead of only hav- Second, on average among all the participants, as ing good results for our own traces. shown in Figure 14, in contrast to Fingerprinting Estima- tion. Cell ID Estimation performs better with increased com- 6.2 Field Validation mute distance, indicated by the straight line distance be- To validate the effectiveness of context-based network tween their homes and workplaces. This is expected, estimation, we have implemented it for a mobile ECG since while the visible cell towers change minimally at reporting application, which collects ECG data from short distances, their fingerprints can change greatly. body-worn wireless (e.g. ) sensors and periodi- Third, as shown in Figure 15, on average among all the cally reports it to an Internet server. Since the focus of this participants in our reality check, the performance of our work is on data transfer between the mobile device and estimation algorithms is better with moderate or low Wi-Fi the Internet server, we assume ECG data is already avail- availability. Indeed, when Wi-Fi availability is high, the able on the phone. We use the same data rate and interval Simple Solution is already very close to the ideal case. as in Section 6.1, 270 KB every 5 minutes.

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 11

We have developed the ECG reporting software that 100% automatically runs on the phone every 5 minutes. Our Fingerprinting software has two modes of operation. In cellular-only 80%

mode, it transfers data only using cellular. In context- 100%) CellID + = based interface selection mode, it uses our Hysteretic al- 60% Hysteretic (Ideal

gorithm, a constant 25 minute timeout, to estimate net- Cell ID work conditions and decide whether to power up the Wi- 40% Fi adapter and attempt a Wi-Fi transfer. We chose Hyste- Hysteretic retic Estimation because it has relatively good perfor- 20% Effectiveness mance without training or extra hardware and our simu- TimeOfDay lation in Section 6.1 showed that it is effective when trans- 0% fer intervals are short. If the connection fails, is dropped, 20% 40% 60% 80% 100% Wi‐Fi availability or no response is received from the server, the transfer is Figure 15. Our estimation algorithms performed better considered unsuccessful and our software will attempt a when Wi-Fi availability is moderate and low resend. Whenever a Wi-Fi resend fails, our software will resort to cellular.

We installed our ECG reporting software on two HTC 100% Wizard phones and gave them to participants P1 and P2, who used the phones as their primary mobile phones 80%

during our experiments. We ran six experiments for each 100%)

= participant, half of them in cellular only mode and the 60% (Ideal other half using context-based interface selection. We measured the battery lifetime as the operational time be- 40% tween when the phone is disconnected from its charger Cell ID + Acceleration Cell ID + Hysteretic

(with a fully charged battery) and when the phone auto- Effectiveness 20% Acceleration matically shuts itself off due to low battery, with no Hysteretic charging in between. The battery lifetimes for cellular 0% only mode and context-based interface selection mode are 0 5 10 15 20 25 Transfer interval (minutes) shown in Table 2. The average battery lifetime gain was Figure 16. Hysteretic and Acceleration Estimation perform 35%. better with shorter transfer intervals For comparison, the average battery lifetime gain si- mulated using the field-collected traces was 29% for the Simple Solution, 37% for Hysteretic Estimation, 39% for area. The long range radio communication between the the combined History, Cell Tower ID and Hysteretic Es- mobile phone and its base station will still have high timation, 40% for Fingerprinting, and 42% for the ideal energy per MB requirement compared to shorter range upper bound. wireless technologies, such as the current and future wireless LAN technologies. On the other hand, although 7. DISCUSSION Wi-Fi hotspots are on the rise, their availability will still remain well below cellular networks due to their short Our reality check and studies of context based network range. Therefore, we expect the availability and range vs. estimation are limited in our participants, who were affi- energy tradeoff behind different wireless interfaces to liated with Rice University and spent a significant portion remain valid in the foreseeable future. Emerging technol- of their everyday life under the Rice campus Wi-Fi cover- ogies, such as WiMAX, can be yet another network inter- age. Moreover, the majority of our field-collected traces face to select from. were from Houston, a major metropolitan area. Cellular In our work, we assumed that cellular and Wi-Fi net- networks in rural or suburb areas can have different cha- works are separate. An integration of cellular and Wi-Fi racteristics. Therefore, we expect our participants might networks will create additional opportunities in estimat- have led to a much brighter picture for ubiquitous con- ing Wi-Fi network condition and availability. Due to E911 nectivity than what is available for the general popula- requirements, cellular network providers are already tion. Nonetheless, with the increasing availability of Wi-Fi aware of approximate location of their subscriber phones. and expanding deployment of cellular networks, we be- Therefore, they could potentially send prior known Wi-Fi lieve our participants represent the trend in the develop- availability data, based on location, to subscribers. This ment of ubiquitous wireless connectivity. could be especially appealing as many cellular providers We studied the use of Wi-Fi and cellular networks, but also offer Wi-Fi hotspots, including the four major US the approach of selecting between multiple network inter- providers, AT&T, Sprint, T-Mobile, and Verizon. Never- faces to achieve energy-efficient ubiquitous connectivity theless, our network estimation methods can still be use- is general. While newer cellular technologies such as 3G ful to improve the accuracy of Wi-Fi estimation. will support higher data rates, they are still metro-area It is important to note that using context information to networks and each base station covers a relatively large

12 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

establishment, which will lead to energy savings too. Vir- Table 2. Phone battery lifetime during our field test gil is complementary to our approach and can be readily Participant Experiment Cellular only Context-for- incorporated to improve the connection establishment in (h) Wireless (h) multi-interface data transfer. Related to our reality check, P1 1 12.3 16.2 Bychkovsky et al. [5] presented Wi-Fi access point data 2 20.3 20.4 collected by war-drives to evaluate the possibility of a 3 17.5 21.5 large-scale Wi-Fi network made up by volunteered home Average 16.7 19.4 Wi-Fi hotspots. Intel Place Lab [7, 10] also collected exten- P2 1 13.2 21.6 sive network data on GSM cellular networks for the sake 2 15.0 21.4 of positioning. These works provide a reality check of the 3 14.4 23.6 spatial network availability. On the contrary, our reality Average 14.2 22.2 check was targeted at the personal coverage of wireless Average 15.4 20.8 networks, i.e., how networks are available throughout people’s daily life.

Place Lab [7, 10] is also related to our endeavor on es- timating Wi-Fi network conditions. With positioning ac- estimate wireless network conditions (Context-for- curacy around 100m, Place Lab can indeed provide im- Wireless) is a mechanism. We used context information to portant clues for Wi-Fi network condition, which is high- estimate current and future network conditions. Based on ly position-related. However, Place Lab requires a pre- the prediction, system policies can be devised to prefetch mapping of GSM towers (base stations) with GPS. In- wireless data if the network is predicted to degrade, or to stead, our estimation methods seek to learn the direct buffer data transfers while respecting latency require- relations between Wi-Fi network conditions and context ments if the network is predicted to improve. information, including cellular network conditions, thus eliminating the need for mapping. In Turducken [19], the 8. RELATED WORK authors used a Wi-Fi detector to reduce Wi-Fi connection Our use of multiple wireless interfaces for data transfer attempts that fail. However, a Wi-Fi detector can only resonates with a considerable body of work employing a detect the existence of Wi-Fi signal; it cannot determine secondary low-power wireless interface for improving whether it is from an accessible network. Furthermore, Wi-Fi energy efficiency. For example, Wake-on-wireless the energy cost and benefit of the Wi-Fi detector were not [12] uses a low-power radio interface to transmit control addressed. The authors of [20] used GPS-based move- information so that Wi-Fi can stay powered-off most of ment prediction to reduce wireless communication ener- the time. Coolspots [14] employs Bluetooth to improve gy between two mobile nodes. They targeted at a specific power efficiency of Wi-Fi. Nevertheless, these works and application scenario with a single wireless network. More others [15, 16] target at improving Wi-Fi energy efficiency importantly, GPS only works outdoors and its energy cost and are restricted by limited Wi-Fi availability. On the is too high for our purpose, as showed in Section 3.2.1. contrary, our approach utilizes Wi-Fi to improve the effi- Our work estimates current and future Wi-Fi condi- ciency of cellular networks and provide energy-efficient tions based on context information and past Wi-Fi condi- ubiquitous connectivity. Armstrong et al. also found that tions. In contrast, the authors of [21] focus on predicting Wi-Fi is more energy-efficient for transfers of large data detailed Wi-Fi conditions, including available bandwidth, sizes and subsequently selected the wireless interface tens of seconds into the future using current Wi-Fi condi- based on the data size [17]. However, they assumed that tions, location information, and a mobility model. Yet, as Wi-Fi is always available and sought to reduce the energy our measurements indicate, measuring current Wi-Fi cost of data transfer without considering that of establish- conditions incurs a considerable energy cost. Future net- ing or maintaining a Wi-Fi connection, which is nontrivial work condition prediction enable the postponing of data as our work demonstrated. Moreover, while they only transfers for more favorable conditions. For example, the showed that Wi-Fi is more energy-efficient when the data authors of [22] employ data prefetching when more ener- size is larger than 30KB, we provided more detailed ener- gy-efficient networks are available, in order to lower the gy profiles for Wi-Fi and cellular network interfaces with overall energy cost. These works are complementary to an analytical model. Integrating Wi-Fi and cellular net- Context-for-Wireless. works and seamlessly switching between through coop- While we have used context information to assist in se- eration between networks on various layers has also been lecting the most efficient wireless interface for data trans- widely studied. For example, Always Best Connected [18] fers, context information can be used to manage a variety seeks to achieve best performance and coverage. On the of other system resources, such as battery energy and contrary, our solutions work at the application layer and power consumption [23-25]. We believe that our ap- do not require cooperation between Wi-Fi and cellular proach for determining network conditions from context networks. information can be applied to other system resources as Related to our use of Wi-Fi, Virgil [8] automatically well, especially those which are location dependent. discovers and selects access points with faster connection

RAHMATI ET AL.: CONTEXT-FOR-WIRELESS: WIRELESS NETWORK CONDITION ESTIMATION FOR DATA MANAGEMENT 13

9. CONCLUSION Context based network estimation exemplifies how we can employ context information for better system re- The driving vision of our work is to leverage the com- source management. It also highlights three fundamental plementary strength of multiple available wireless net- research concerns in system resource management with works for energy-efficient ubiquitous connectivity. We context information. First, energy efficiency: Acquiring achieve this by estimating network condition using con- context information incurs extra energy consumption but text information. also brings new opportunities to improve system energy Using findings from our recent field study, we showed efficiency. Second, system sensitivity: Current solutions that the energy cost of ubiquitous network connectivity is for context-awareness are typically ad hoc. Yet, systemat- overwhelming. Our field measurements presented a chal- ic, integrated system support is necessary for efficient and lenging picture for emerging mobile applications that rely effective context acquisition. Third, human factors: Sys- on ubiquitous connectivity: Our experiment showed that tem resource management can benefit from important the data transfer required for mobile ECG reporting re- context information regarding human users. However, it duced the battery lifetime of our mobile phone to an av- must remain user friendly. Future research should inves- erage of 15.4 hours. We also showed that Wi-Fi and cellu- tigate these three factors in a systematic manner to lar network interfaces (802.11b and GSM/EDGE in our achieve the ultimate goal of enabling previously impossi- study) have energy profiles with complementary ble services on mobile embedded systems. strengths. Therefore, we proposed to leverage increasing- ly available Wi-Fi networks to improve the data transfer energy efficiency of cellular networks. Our theoretical ACKNOWLEDGMENT analysis showed that judiciously choosing between net- This work was supported in part by NSF awards work interfaces can considerably improve battery lifetime CNS/CSR-EHS 0720825, CNS/NeTS-WN 0721894, and TI under a broad range of application requirements, while Leadership University Fund. We would like to thank our careless use of Wi-Fi can backfire. anonymous reviewers whose comments helped improve We formulated data transfer through multiple wireless this paper, and in particular one for suggesting the use of interfaces as a statistical decision problem and explored cellular fingerprints as context information. Last but not various contextual clues to learn the conditional probabil- least, we thank the volunteers who participated in our ity distribution of Wi-Fi network conditions in order to data collection and field validation. solve it. We showed that while individual algorithms per- form significantly better than our baseline, combining REFERENCES different algorithms based on their individual strengths can improve performance further. Our best algorithms [1] Rahmati, A. and Zhong, L. Context-for-Wireless: Context- Sensitive Energy-Efficient Wireless Data Transfer. Proc. Int. can achieve battery lifetime improvement close to the Conf. Mobile Systems, Applications and Services (MobiSys), theoretical limit, without additional hardware on phones. 2007. 165-178. Furthermore, our evaluation shows the effectiveness of [2] Bouten, C.V.C., Koekkoek, K.T.M., Verduin, M., Kodde, R. our context-based algorithms for the prediction of future and Janssen, J.D. A Triaxial Accelerometer and Portable network conditions. In particular Fingerprinting, can, on Data Processing Unit for the Assessment of Daily Physical average, predict Wi-Fi availability for one and ten hours Activity. IEEE Trans. Biomedical Engineering, 1997, 44 (3). into the future with 95% and 90% accuracy, respectively. 136-147. [3] Hamilton, P.S. and Tompkins, W.J. Estimation of Rate- We also explored the use of a three-axis accelerometer Distortion Bounds for Compression of Ambulatory ECGs. to sense motion and movement using an additional sen- Proc. Int. Conf. Engineering in Medicine and Biology sor board. Today, such a sensor is appearing in an in- Society, 1989, 2. 763-764. creasing number of phones. Our results show little differ- [4] Universal Access Report, GSM Association 2006. ence between Acceleration and Hysteretic Estimation. We [5] Bychkovsky, V., Hull, B., Miu, A., Balakrishnan, H. and believe more sophisticated algorithms are required to Madden, S. A Measurement Study of Vehicular Internet infer change in location from accelerometer readings. Access Using In Situ Wi-Fi Networks. Proc. Int. Conf. Furthermore, our evaluation shows the effectiveness of Mobile Computing and Networking (MobiCom), 2006. 50- our context-based algorithms for the prediction of future 61. [6] Rice Orbit Platform, Rice Efficient Computing Group network conditions. In particular Fingerprinting, can, on http://www.ruf.rice.edu/~mobile/orbit. average, predict Wi-Fi availability for one and ten hours [7] LaMarca, A., Chawathe, Y., Consolvo, S., Hightower, J., into the future with 95% and 90% accuracy, respectively. Smith, I., Scott, J., Sohn, T., Howard, J., Hughes, J. and We validated our solutions using data collected from Potter, F. Place Lab: Device Positioning Using Radio the everyday lives of a number of participants as well as Beacons in the Wild. Proc. Int. Conf. Pervasive Computing using field trials. By judiciously choosing a wireless inter- (Pervasive), 2005. 116-133. face using Context-for-Wireless, with our most simple [8] Nicholson, A.J., Chawathe, Y., Chen, M.Y., Noble, B.D. and algorithm, Hysteretic Estimation, we were able to im- Wetherall, D. Improved Access Point Selection. Proc. Int. prove the average battery lifetime by 35% in field trials Conf. Mobile Systems, Applications and Services (MobiSys), 2006. 233-245. with real phone usage. Yet more sophisticated algorithms, some described in this work, will produce even more op- portunities for the solutions presented in this paper.

14 IEEE TRANSACTIONS ON MOBILE COMPUTING, MANUSCRIPT ID

[9] Eronen, P. TCP Wake-Up: Reducing Keep-Alive Traffic in Consumption in Wireless Communication. IEEE Trans. Mobile IPv4 and IPsec NAT Traversal Nokia Tech Report, Mobile Computing, 2006, 5 (2). 157-169. 2008. [21] Nicholson, A.J. and Noble, B.D. BreadCrumbs: Forecasting [10] Chen, M.Y., Sohn, T., Chmelev, D., Haehnel, D., Hightower, Mobile Connectivity. Proc. Int. Conf. Mobile Computing and J., Hughes, J., LaMarca, A., Potter, F., Smith, I. and Networking (MobiCom), 2008. 46-57. Varshavsky, A. Practical Metropolitan-Scale Positioning for [22] Gitzenis, S. and Bambos, N. Joint Transmitter Power Control GSM Phones. Proc. Int. Conf. Ubiquitous Computing and Mobile Cache Management in Wireless Computing. (UbiComp), 2006. 157-169. IEEE Trans. Mobile Computing, 2008, 7 (4). 498-512. [11] Bahl, P. and Padmanabhan, V.N., RADAR: an in-building [23] Banerjee, N., Rahmati, A., Corner, M.D., Rollins, S. and RF-based user location and tracking system. in INFOCOM Zhong, L. Users and Batteries: Interactions and Adaptive 2000. Nineteenth Annual Joint Conference of the IEEE Energy Management in Mobile Systems. Proc. Int Conf. Computer and Communications Societies. Proceedings. Ubiquitous Computing (Ubicomp), 2007. 217-234. IEEE, (2000), 775-784 vol.772. [24] Rahmati, A. and Zhong, L. Human-battery interaction on [12] Shih, E., Bahl, P. and Sinclair, M.J. Wake on Wireless: An mobile phones. Pervasive and Mobile Computing, 2009, 5 Event Driven Energy Saving Strategy for Battery Operated (5). 465-477. Devices. Proc. Int. Conf. Mobile Computing and Networking [25] Ravi, N., Scott, J., Han, L. and Iftode, L. Context-aware (MobiCom), 2002. 160-171. Battery Management for Mobile Phones. Proc. Int. Conf. on [13] Hastie, T., Tibshirani, R. and Friedman, J.H. The Elements of Pervasive Computing and Communications (PerCom), 2008. Statistical Learning: Data Mining, Inference, and Prediction. 224-233. Springer, 2001. [14] Pering, T., Agarwal, Y., Gupta, R. and Want, R. CoolSpots: Reducing the Power Consumption of Wireless Mobile Ahmad Rahmati received his B.S. degree in Computer Engineering Devices with Multiple Radio Interfaces. Proc. Int. Conf. from Sharif University of Technology, Tehran, Iran in 2004. He re- Mobile Systems, Applications and Services (MobiSys), 2006. ceived his M.S. degree in Electrical and Computer Engineering from Rice University, Houston, TX in 2008, where he is currently pursuing 220-232. his Ph.D. He was a research intern at AT&T Labs-Research and [15] Agarwal, Y., Chandra, R., Wolman, A., Bahl, P., Chin, K. Motorola Labs in the summers of 2006 and 2008, respectively. He and Gupta, R. Wireless wakeups revisited: energy received the best paper award from ACM MobileHCI 2007. His re- management for voip over wi-fi . Proc. 5th Int. search interests include the design and applications of mobile and Conf. on Mobile Systems, Applications and Services embedded systems, system power analysis and optimization, and (MobiSys), 2007. 179-191. human-computer interaction. [16] Chiasserini, C.F., Rao, R.R. and di Elettronica, D. Improving Energy Saving in Wireless Systems by Using Dynamic Lin Zhong received his B.S. and M.S. from Tsinghua University in Power Management. IEEE Trans. Wireless Communications 1998 and 2000, respectively. He received his Ph.D. from Princeton 2003, 2 (5). 1090-1100. University in September, 2005. He was with NEC Labs, America, for the summer of 2003 and with Microsoft Research for the summers of [17] Armstrong, T., Trescases, O., Amza, C. and de Lara, E. 2004 and 2005. He joined the Department of Electrical & Computer Efficient and Transparent Dynamic Content Updates for Engineering, Rice University as an assistant professor in September, Mobile Clients. Proc. Int. Conf. Mobile Systems, 2005. He received the AT&T Asian-Pacific Leadership Award in 2001 Applications and Services (MobiSys), 2006. 56-68. and the Harold W. Dodds Princeton University Honorific Fellowship [18] Gustafsson, E. and Jonsson, A. Always Best Connected. for 2004-2005. He coauthored a paper that is selected as one of the IEEE Wireless Communications, 2003, 10 (1). 49-55. 30 most influential papers in the first 10 years of Design, Automation [19] Sorber, J., Banerjee, N., Corner, M.D. and Rollins, S. & Test in Europe conferences. He and his students received the best Turducken: Hierarchical Power Management for Mobile paper awards from ACM MobileHCI 2007 and IEEE PerCom 2009. His research interests include mobile & embedded system design, Devices. Proc. Int. Conf Mobile Systems, Applications, and human-computer interaction, and nanoelectronics. His research has Services (MobiSys), 2005. 261-274. been funded by National Science Foundation, Motorola Labs, Nokia, [20] Chakraborty, S., Dong, Y., Yau, D.K.Y. and Lui, J.C.S. On Texas Instruments, and Microsoft Research. the Effectiveness of Movement Prediction to Reduce Energy