Post on 27-Jul-2015
SelfSelfSelfSelf----Adaptive Battery and Context Aware Mobile Adaptive Battery and Context Aware Mobile Adaptive Battery and Context Aware Mobile Adaptive Battery and Context Aware Mobile Application DevelopmentApplication DevelopmentApplication DevelopmentApplication Development
Soumya Kanti Datta
Research Engineer, EURECOM, France
Email: soumya-kanti.datta@eurecom.fr
10101010thththth IIIInternational Wireless Communicationnternational Wireless Communicationnternational Wireless Communicationnternational Wireless Communication and Mobile and Mobile and Mobile and Mobile
Computing Conference (IWCMCComputing Conference (IWCMCComputing Conference (IWCMCComputing Conference (IWCMC----2014)2014)2014)2014)
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Result
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 2
IntroductionIntroductionIntroductionIntroduction
• High power consumption
– at hardware resources
– By mobile applications
• Battery – a bottleneck for mobile devices and
applications
• Developed ‘Power Monitor’ to understand
– Usage patterns of smart devices
– How applications limit the battery life
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 3
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Result
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 4
Brightness Level in Mobile DevicesBrightness Level in Mobile DevicesBrightness Level in Mobile DevicesBrightness Level in Mobile Devices
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 5
95
24
127
38
20
155
95
107
255 255
102
130
79
10
4534
135
255
125
65
255
96
179
63
144
30 34 30
107102
0
50
100
150
200
250
300
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Bri
gh
tne
ss
User No.
Brightness Level in Smart Devices
Energy Consumption at HardwareEnergy Consumption at HardwareEnergy Consumption at HardwareEnergy Consumption at Hardware
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 6
Battery Consumption at Network InterfacesBattery Consumption at Network InterfacesBattery Consumption at Network InterfacesBattery Consumption at Network Interfaces
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 7
Network Interface Battery Consumption (mA)
Active mode Idle mode
EDGE 300 5
3G 225 2.5 – 3
Wi-Fi 330 12 - 15
Network Network Network Network Usage of UsersUsage of UsersUsage of UsersUsage of Users
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 8
0
50
100
150
200
250
300
350
400
450
1 5 9 13 17 21 25 29
Tra
ffic
User
Total Network Traffic per Day (MB)
Upload
Downld
Lessons LearntLessons LearntLessons LearntLessons Learnt
• Applications keep on consuming power even though battery level is low and status is discharging.
• Many users of the smart devices do not modify the settings so that hardware elements spend less power.
• Thus– Applications should be self-adaptive to react to
battery level, status, context etc.
– Dynamically change the device settings to activate low-power mode
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 9
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Result
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 10
SelfSelfSelfSelf----Adaptive FrameworkAdaptive FrameworkAdaptive FrameworkAdaptive Framework
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 11
Battery and Context MonitorBattery and Context MonitorBattery and Context MonitorBattery and Context Monitor
• Battery monitor
– Battery level, status (AC/USB charging or
discharging)
• Context monitor
– Location (home, office, abroad)
• Statistics
– Battery charging pattern by correlating status
– Location
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 12
Analyser EngineAnalyser EngineAnalyser EngineAnalyser Engine
• Examines
– Current battery level (B) , status (S), occurrence of
next charging opportunity (C) and location (L)
• Triggers one of these profiles
– Light self-adaption
– Medium self-adaption
– Strong self-adaption
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 13
SelfSelfSelfSelf----Adaptive FeaturesAdaptive FeaturesAdaptive FeaturesAdaptive Features
• Hardware resource adaption
– Minimize brightness, turn off GPS
• Software resource adaption
– Use network to get location not GPS
• User feature adaption
– Turn-off secondary features in an application
• Additional optimization
– Distribute CPU intensive tasks
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 14
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Result
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 15
Prototype ImplementationPrototype ImplementationPrototype ImplementationPrototype Implementation
• Two Android apps are developed– One with self-adaptive features and another without that.
• The functionalities are– Display several texts in the screen with default brightness
level being 200.
– Stream videos from a server and enabling background services to download and upload images, video and text files to a server. These are the primary functionalities of the application.
– Display location in a map using both GPS and network based locations to compare and determine the best location. This is a secondary feature in the application.
– Show in-app advertisements.
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 16
Condition for No SelfCondition for No SelfCondition for No SelfCondition for No Self----AdaptionAdaptionAdaptionAdaption
• Battery level lies within 76-100
– 76 < B < 100
• Battery status can be either discharging or charging
– S == discharging or S == charging
• Irrespective of the occurrence of charging opportunity and location information
– C == Anything
– L == Anything
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 17
Conditions for Light SelfConditions for Light SelfConditions for Light SelfConditions for Light Self----AdaptionAdaptionAdaptionAdaption
• Triggered when one of the following is true
• Condition 1
– (51<B<75) and (S == discharging) and (C==anything) and
(L==anything)
• Condition 2
– (11<B<50) and (S == AC charging) and (C==anything) and
(L==anything)
• Condition 3
– (11<B<50) and (S == discharging) and (11<C<30) and
(L!=roaming)
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 18
Light SelfLight SelfLight SelfLight Self----Adaptive FeaturesAdaptive FeaturesAdaptive FeaturesAdaptive Features
• The brightness is set to 125.
• For bulk-data transfer, compress the data before uploading to
a server. The server must decompress the data after receiving
it.
• Check for high speed network before streaming video
contents or transferring bulk data.
• If highly accurate location is not needed then use coarse
location information for the mapping functionality.
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 19
Conditions for Medium SelfConditions for Medium SelfConditions for Medium SelfConditions for Medium Self----AdaptionAdaptionAdaptionAdaption
• Triggered when one of the following is true
• Condition 1
– (10<B<50) and (S == discharging or S == USB charging) and
(C>31) and (L != roaming)
• Condition 2
– (1<B<10) and (S == anything) and (C<10) and (L ==
anything)
• Condition 3
– (51<B<75) and (S == anything) and (C == anything) and (L
== travelling abroad)
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 20
Medium SelfMedium SelfMedium SelfMedium Self----Adaptive FeaturesAdaptive FeaturesAdaptive FeaturesAdaptive Features
• Tone down brightness to 75. This degrades the user experience to some
extent if the user prefers higher brightness level.
• Network operations are preferred to be done on high speed networks like
Wi-Fi/3G. If none of them are available and EDGE has to be used, notify
the user about the same and ask if the user would like to continue to use
EDGE.
• Transferring bulk data over EDGE should be avoided. This is a user feature
adaption in the application.
• Establishing multiple connections to stream HD videos or downloading
high volume data should be avoided.
• For scheduling background updates, inexact timer must be used. In this
case, Android system will couple several network operations together to
conserve battery and bandwidth.
• More features are given in the paper.
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 21
Conditions for Strong SelfConditions for Strong SelfConditions for Strong SelfConditions for Strong Self----AdaptionAdaptionAdaptionAdaption
• Triggered when one of the following is true
• Condition 1
– (B<10) and (S == anything) and (C>31) and (L == anything)
• Condition 2
– (11<B<50) and (S == anything) and (C == anything) and (L
== travelling abroad)
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 22
Strong SelfStrong SelfStrong SelfStrong Self----Adaptive FeaturesAdaptive FeaturesAdaptive FeaturesAdaptive Features
• Reduce brightness to 30 which minimizes the power consumption at display.
• Defer network operations from the application and notify the user about the same. This includes taking backup in remote server, streaming audio or video files and downloading bulk data. This is another user feature adaption done to make the dying battery last longer.
• By default the mapping feature is not offered in this profile as network operations are turned off. But there is an option where the user can override the settings and use only wireless network location to get the location.
• Stop background updates or any less important services.
• Stop computationally expensive parts of the applications.
• Do not show in-app advertisements.
• Avoid using sensors if possible. For example, do not change the view based on rotation of the screen.
• For video playback from the memory, reduce the size of viewing window. For audio playback, reduce the volume.
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 23
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Results
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 24
ResultsResultsResultsResults
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 25
ContentsContentsContentsContents
• Introduction
• Lessons Learnt from Power Monitor
• Self-Adaptive Framework
• Prototype Implementations
• Result
• Conclusion
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 26
ConclusionConclusionConclusionConclusion
• Presented a self-adaptive framework for
Android application development.
• Monitors several parameters, analyzes them
and triggers the appropriate self-adaptive
profile.
• Prototype application and validation through
promising results.
6-Aug-14 Self-Adaptive Battery and Context Aware Mobile Application Development 27