Power Profiling of Context Aware Systems : A Contemporary Analysis and Framework for Power Conservation

With the advent of smart, inexpensive devices and a highly connected world, a need for smart service discovery, delivery, and adaptation has appeared. This interconnection is composed of sensors within devices or placed externally in the surrounding environment. Our research addresses this need through a context aware system, which adapts to the users’ context. Given that the devices are mobile and battery operated, the main challenge in a context awareness approach is power conservation. The devices are composed of small sensors that consume power in the order of a few mW. However, their consumptions increase manifold during data processing. There is a need to conserve power while delivering the requisite functionality of the context aware system. Therefore, this feature is termed as ‘power awareness.’ In this paper, we describe different power awareness techniques and compare them in terms of their conservation effectiveness. In addition, based on the investigations and comparison of the results, a power aware framework is proposed for a context aware system.


Introduction
Context awareness is termed as the awareness of a system to external and internal stimuli gathered through internal and external sensors.Such a system classifies this as an activity to adapt the services present within an environment.A context aware system is typically found in a handheld device, such as a smart phone [1][2][3].Context is simply the description of the current situation as bound by the environment, while context awareness utilizes the context to adapt and change the services present in the environment.The environment becomes smart and delivers better services to the end-user [4].A simple example is the change in orientation of a handheld device from portrait to landscape, based on how a person holds the phone.
Among various issues and challenges of context awareness is the management of battery power [5].Battery power is used by different sensors that generate data.For instance, a device orientation sensor generates orientation data, whereas an accelerometer generates acceleration data.This data is then processed by the context aware system to classify the current context or situation.These sensors typically consume low power in the order of 1-2 mW.However, they consume 180-300 mW when processing is carried out [6,7].This significant increase in consumption requires sufficient power conservation such that the functionality or effectiveness of a context aware system is not reduced.The term 'power conservation' is interchangeably used as 'energy conservation' in the literature.This paper uses the former terminology.Power is related to energy, wherein the use of power over a period of time is considered energy consumption.The reduction in the use of energy for the same task is considered as power conservation.
This paper presents a literature review of different techniques of power conservation that have been proposed by researchers over the years.The literature, in general, considers power and energy to be synonymous.However, this paper follows the convention of power conservation.Furthermore, we discuss the effectiveness of these techniques and present a framework for power conservation.We describe two 2 Wireless Communications and Mobile Computing approaches that can be used to achieve substantial power conservation in context aware systems: (a) network communication-based conservation and (b) context processing-based conservation.
The rest of the paper is organized as follows: Section 2 discusses the related work.Section 3 gives an introduction to context awareness.Section 4 presents an overview of power consumption profiling.In Section 5, first we provide a brief discussion on power awareness and then compare the contemporary power conservation techniques in terms of their capabilities and effectiveness.Section 6 describes the proposed framework for power conservation applicable in context aware systems.Finally, Section 7 provides the concluding remarks.

Related Work
A number of researchers have investigated various approaches to model, analyze, and evaluate the efficiency of power consumption and have proposed diverse conservation techniques.This section reviews several closely-related investigations and provides a survey of various power optimization methods, as summarized in Table 1.The available literature can be categorized based on the focus areas.These areas are handheld mobile and cloud-based power optimization, application power optimization, and network communication power optimization.
The device power optimization method considers the device and provides means to conserve battery power within the device.Naik [8] claimed that the size and weight of the handheld mobile devices are the key constraining factors.This opens avenues for software based energy efficiency.The author provided a survey of different software based techniques, including sleep mode support, energy efficient GUI design, and power efficient communication methods.However, this survey neither provides solutions at the device level nor considers context aware systems.Ravindarnath [9] and Arun [10] have independently provided similar surveys for mobile and cloud computing based devices.Li et al. [11] has provided a survey of cloud power optimization based on the tasks given to a cloud system.Mittal [12] has surveyed various power conservation techniques for embedded systems.These embedded systems conserve power as a whole.
Jofri et al. [13] surveyed energy-aware profiling approaches for mobile devices and placed them into five classes and discussed their interrelationships.Power conservation of applications is one of them.Bernal et al. [14] argued that developing a power efficient context aware system is challenging, as it depends on the context sensor configuration.The authors have used an energy profiler to measure the power consumption of context aware applications and have provided recommendations for sensor configuration.Rault et al. [15] have published a survey of energy efficiency in wearable sensors.The authors argued that continuous sampling and communication deplete the battery power fast.They surveyed the existing energy efficient approaches in context aware activity recognition for healthcare applications.Ismail et al. [16] presented a survey of multimedia content adaptation techniques with respect to power consumption.The amount of power utilized in a multimedia content view is high, which can be adjusted based on the device's battery power.The survey neither considered context awareness nor discussed application level fine-tuning for power conservation.Wang et al. [17] argued that energy can be managed efficiently both at the hardware level and at the software level.The authors have selected DBMS for energy profiling and subsequently recommend various conservation measures.
The noisy nature of mobile networks has led to a high network power consumption.This provides a basis for surveys for power optimization in network communication.Brienza et al. [18] have outlined a power efficiency survey for P2P systems.This survey is focused on file distribution and content streaming features of P2P applications.Bolla et al. [19] published a survey of power efficiency in networks.The leading source of power consumption in mobile devices is network communication.However, the authors did not consider the energy overhead involved in mobile processing.Celenlioglu et al. [20] have published a survey of vertical handoff in 3G and WLAN devices.

Context Awareness
The objective of context awareness is to provide better services and applications to the users [21][22][23][24].This includes discovering services among available options within an environment as well as fine-tuning the selected services.Thus, the context describes a complete situation wherein multiple users interact with different services bounded by a common environment [25][26][27][28][29][30].The context process has five phases as shown in Figure 1.The phases are context aggregation, context representation, context history, context inference, and service adaptation [26].

Context Aggregation Module.
Initially, the context is gathered from the sensors present in the environment and on board of the devices.Each sensor provides context values that are then aggregated as the contextual data captured at an instant.The contextual data gathered is raw and may need further processing to convert it into a meaningful form [31,32]. Traditionally, this process is concerned with invoking the external sensors present in the environment as well as collecting data from the internal sensors present on the device.An associated controlled vocabulary is also provided to identify the same context attributes but with different names.

Context Representation Module.
The contextual data is then stored as per the data organization of the context aware system, which is referred to as the current context [33].Among various mechanisms, ontology is the preferred representation technique [34].Ontology is based on eXtensible Markup Language (XML).It has the added advantage of providing a heterogeneous method of storage so that a complete context can be shared across diverse platforms.

Context History Module.
The task of this module is to maintain the history of contexts associated with the appropriate labels.The history is generally maintained as records in an SQL table, which can be converted to No-SQL using

Contents Objects
Focused Techniques [8] Device power optimization Handheld mobile devices Software based energy efficiency [9] Enhancing energy efficient Mobile and cloud computing based devices Energy aware offloading techniques [10] Minimizing energy consumption Mobile cloud computing Effective task scheduling method [11] Cloud power optimization Cloud applications Energy consumption models [12] Power conservation Embedded systems Power management techniques [13] Energy efficiency Mobile devices Energy-aware profilers [14] Power consumption Context aware applications Energy profiler for sensor configuration [15] Energy efficiency Wearable sensors/healthcare application Approaches for context aware activity recognition [16] Power consumption Multimedia Content adaptation techniques [17] Energy profiling Software and hardware level DBMS [18] Power consumption and optimization P2P/Network communication File distribution and content streaming [19] Power efficiency Networks/mobile devices Power consumption in network communication [20] Energy  XML.This history information can be purged to reduce the size as well as to identify the user preferences [35].

Context Inference Module.
Through this module, the activity or situation is classified through a context inference mechanism, and labels are given to current contexts [36].This can include multiple overlapping activities within an environment as well multiple role-based interactions by each user.Here, recommendations for better service discovery and delivery as well as adaptation are made.The context inference mechanism can be designed as rule based or classificationbased [37].The software engineer is thus concerned with selecting and improving known classification algorithms to achieve context awareness.

Service Adaptation Module.
Finally, by this module, the services are contacted and adapted as per the recommendations of the inference phase.This has two aspects: (a) service discovery and delivery: this is concerned with finding and selecting better services for the user and (b) service adaptation: this deals with changing the parameters of a selected service as per the current context.The service could be an external web service that can be invoked upon the change in the state of the current context.The selection of web service may employ certain criteria for QoS-based web service selection [38,39].

Power Consumption Profiling
Power conservation optimization is a challenging area that requires novel approaches to solve the underlying issues.Power is a vital resource for battery-operated systems.Recent technological advancements have paved the way for miniaturization in terms of size and weight of such systems.However, power consumption remains to be a dominant issue in the design process.Both aspects of a system, i.e., software and hardware, are to be considered in evaluating the true power consumption.Typically, the hardware part is considered to be more resource hungry.Very little attention is

Requires detailed specifications
Suitable for device vendors at design times

Device level
Easy to implement Appropriate way Usage patterns need to be identified usually given on software development where the operating algorithms and programming styles may influence the overall power consumption of the system [40].
Apart from the hardware, limited considerations have been given to optimization of software applications [41][42][43].For power optimization, it is necessary to correctly assess the power usage of the software components of a system.A number of approaches have been presented in the literature that focus on profiling the techniques in order to optimize the power consumption of the software applications [42][43][44][45][46][47].Abkenar et al. [48] have employed a mechanism to effectively measure the consumption during a group activity recognition by monitoring the battery drain of a mobile device.
Thermal aspects are also of high interest while profiling the power consumption, as these can offer useful insights.Marcu et al. [49] used thermal profiling and defined benchmarks to identify the impact of the CPU work load (i.e., the executed applications) using the thermal response of the CPU cores.However, this approach is not generic enough, as it is only applicable to a specific test-bed.Profiling is not a trivial task as it involves identifying miniature-level functional relationships and associated power consumption among the complex processes.Duan et al. [50] proposed a power estimation model for mobile devices that considers the interconnected relationship among the three layers, i.e., the hardware, the operating system, and the application under execution.To get the maximum device uptime, optimum resource utilization, in terms of battery energy, is crucial.Hence, true power profiling is the only critical success factor in accurate lifetime prediction.
Prior to understanding energy profiling, the power consumption states used by the devices for power management need to be determined.A brief overview of the power consumption states is presented in the following section, and different power profiling techniques are compared in Table 2  (i) Active (Working): In this state, the device is fully functional and is processing the user's tasks.Power consumption in this state depends on the usage scenario and involvement of various components that are associated with the task.These components can be the internal sensors present on the device.
(ii) Idle (Low Power): When there are no running tasks, the device is switched to idle mode and the core components as well as the associated peripheral components are switched to minimum energy levels.Only the basic functionality of a mobile device is available, e.g., sending and receiving messages or phone call.
(iii) Suspend (Sleep): In suspend mode, all unused components are switched-off to save the power.Only the core components are kept alive at predefined minimum energy levels.Only a minimal amount of activity is allowed with which the device can perform the essential tasks.

Power Consumption Profiling Methods.
Generally two methods are considered for power consumption profiling: (a) model-based and (b) real measurement-based [51].These methods are discussed below: (i) Model-Based: In model-based method, a model is built to analyze the power consumption of the events in the system.Then, through a series of measurements, the power consumption for each of the system's component is determined, and the model is calibrated based on the measured data.Thus, the power consumption for the whole system can be evaluated by monitoring the rendering of the events through profiling.This method is easy to implement.However, the model's accuracy is a key factor in a true evaluation of the power consumption.(ii) Real Measurement-Based: In a real measurementbased method, the power consumption of the system is measured in real-time.The power consumption profile of the system is generated after harmonizing the power data with the system events.This scheme is useful to predict the dynamic power consumption of the system.However, it requires a higher degree of synchronization between both entities, i.e., power records and event records.Another concern while tracking the system events is that it creates a high overhead.Due to this reason, most of the power consumption profiling techniques, as proposed by the researchers to date, focus on the process-level power consumption.

Power Consumption Profiling
Finesse.The finesse of power consumption profiling is broadly based on either coarsegrained or fine-grained methods.The coarse-grained method considers the overall device, while the fine-grained method considers only the processes on the device.The power consumption profiling methods can be applied either at the component level or the device level [52].
(i) Component Level method: Under this method, the power consumption for each component of the system is measured independently.By summing up the power consumption values for different components, the total power consumption of the system can be measured.This method produces more accurate results.However, it requires detailed specifications of both the hardware and the software for a particular component.The device vendors can benefit from this approach, as they have detailed specifications and can possibly implement this at the design stage.(ii) Device Level method: This method, to be more appropriate, can be termed as the device usage scenario, as it measures the power consumption of a device for different use-cases [53].This method is easy to implement, and is widely used in power consumption profiling.For this method, two considerations need to be considered.Firstly, the number of required test runs need to be optimized to achieve coherence in results.Secondly, the usage patterns need to be identified in order to synchronize the power consumption with the use-cases.An example of possible usage scenarios in mobile devices where a user can use any number of applications concurrently is shown in Figure 3.

Power Awareness
Among the issues within context awareness, power conservation is of prime importance.Since a context aware system can be mobile, and it relies on the internal sensors present on the device as well as the external sensors present in the environment, there is a need to conserve power.Furthermore, the context recognition is itself a power-consuming task.Once the context is gathered, it must be processed, and processing consumes power [54].
Depending on the classification approach, the algorithms employed have different power profiles.For example, some algorithms, such as artificial neural network (ANN) and genetic algorithm (GA), train prior to classification and have higher training times.Algorithms, such as K-Means and K nearest neighbors (KNN), have zero training but maximum classification times [55].The design of algorithms allows the scientists to calculate the time and space complexity only.Currently, no convention exists to measure the power conservation of an algorithm.Context aware applications consume power in three phases: context aggregation, context processing, and context adaptation.
Power awareness is a mechanism through which a context aware system can optimize itself to conserve power while providing acceptable functionality.Researchers have proposed various techniques to effectively conserve the power of a context processing mobile device as discussed in this section.Most of these recommended techniques are based on the power consumption profile of a mobile device.Without power consumption, the power conservation technique is useless.

Contemporary Power Conservation Techniques.
In the following sections, various techniques to monitor the power are discussed.These techniques are primarily based on investigations performed by different researchers.

Threshold-Based Conservation.
This technique is a simple rule where a threshold is preset for power conservation, e.g., the activation of power saving mode at 15% battery power.This technique, on a whole, is applied to mobile devices.In the power saving mode, the data connections are cutoff.This results in longer battery life-at the cost of context awareness.
Threshold-based conservation, though being the simplest, has the lowest intelligence as the threshold is preset in factory configurations.This mechanism does not adjust the power conservation to the application and is used at the device level.

Demand-Based
Conservation.An improvement over the threshold-based technique is to adaptively adjust the threshold based on the demand.The system must now proactively predict the demand and conserve when the demand is low.This is possible at the operating system (OS) or at the device level, where the system predicts the overall demand and adjusts the threshold.The power awareness at the OS level can be termed as 'battery-aware' as it considers the discharge management by the complete system rather than the applications [56].This technique is implemented as a rule based system (RBS) using mapping and is limited to finetuning at the application level [57,58].
Elmalaki et al. have pointed out that using the OS layers for sensor communication as well ascontext processing would consume less power as the layers (and subsequently the number of lines in the code) are reduced [59].The researchers further placed the context awareness layers within the Android framework of a smart phone.The operating system must perform power consumption profiling on all applications, i.e., at the device level.
Moghimi et al. approached the problem by creating a Fuzzy RBS based power manager [60].The power manager is responsible for inferring the rate of sensor access.For example, if the smart phone is idle then the update rate could be reduced to an hourly basis.
Fei et al. have proposed the use of software based dynamic power management as a trade-off between power conservation and an application's Quality of Service (QoS) parameters [61].They have identified the power requirement to be a measure of the quality of applications.
A demand-based conservation technique cuts off all processing when the threshold is reached just like the threshold-based conservation.Therefore, it lacks fine-tuning at the application level.The implementation as a rule based system, though simple, has its challenges due to increases in the rule space.The system must measure the current conservation through software-hardware interfaces, which may be propriety [62].

Cloud-Based
Conservation.Some researchers have proposed the use of cloud as an alternative to using local architecture for context awareness [6,63].This mechanism effectively conserves power by not using the local system for processing and awareness-oriented tasks.A broker is implemented as a centralized middleware, which performs context processing over the cloud if the threshold is reached.However, energy profiling for cloud environments is another challenge.A number of researchers have proposed various approaches to address this issue [64,65].In our work, we consider power profiling for mobile devices only and leave the cloud environment for future work.
This technique does not use the local resources for context processing.Thus, it conserves power by utilizing the cloud.The challenge is to adaptively establish a threshold after which the computations are sent over the cloud.In effect, this technique is a load balancer.The power consumption profile has higher power consumption cost for cloud communication as compared to the power consumption cost of context processing.The mobile devices only use the internal sensors and communicate with the external sensors present in the environment as well as the cloud.

Context Change-Detection Based Conservation.
The context is classified by continuous monitoring of the contextual data in a context aware system.This data is acquired from internal and external sensors as discussed in Section 3. [66].The sensors are continuously monitored but the context processing is suspended until a change is detected.The context processing is now carried out proactively if the change in sensor data results in change of context.This technique though fine-tunes conservation at the application level requires a method to predict the change in the context a priori.An associated history manager must be provided in the context aware module of the complete system.

Statistics-Based Conservation. Sathan et al. have pro-
posed the use of statistics to predict when to poll sensors [67].The effect of continuous sensing is a constant drain on the battery.If the change in sensor can be predicted, the sensors can be invoked in a noncontinuous manner.The context processing time is also reduced.An innovation is to provide a sensor layer between the sensor and the context gathering module.The sensor layer could easily predict the sensor change based on the history of accesses.
Yuryur proposed a lightweight online and unsupervised mechanism to classify the context using the accelerometer data [7].To conserve power, a Markov reward process is used to profile the power consumption.Yuryur has identified that a 1 mW accelerometer consumes 370 mW power when the context is being processed.The reward process monitors the power consumption as triggered by a change in the sensor data.
This technique requires a priori information to effectively predict when to poll the sensors, and when to process the context if continuous data is provided from the sensors.If the classification of the context is carried out as a predictive algorithm, it would support the power awareness task.Otherwise the system would use two different learning algorithms, i.e., one for classification of the context and other for sensor polling [35,37].

Selective Sensor Access-Based Conservation.
The context classification tasks require data from the sensors present in the environment as discussed in Section 3. The sensors correspond to variables, which are provided to the context aware system.Hermann et al. argued that the classification of all context situations does not require the use of all variables.For instance, to identify the activity being performed in a cafeteria might require the location and time values but may not need the outside barometric pressure value for correct classification [68].The researchers propose the use of selective sensors for the classification purposes.If an accurate classification cannot be achieved, then further sensors can also be invoked.The context aware system then starts, suspends, and changes the sampling rate of the sensors according to the user's known context.
This technique demands a minimum list of sensors that must be used for classification of the context.The number of sensors, both internal and external, may be large.In addition, not all of them need to be invoked for a target context.The list must be made adaptive to include unknown contexts having different minimal list of sensors.

Source Code Optimization-Based Conservation.
In addition to active power conservation techniques presented in above sections, researchers have suggested that source code optimization is another key approach for power conservation.This technique is based on the concept of power aware software development and considers both the programming languages as well as the associated compilers.
Compiler-based optimizations were given little considerations as it has meagre effect in power consumption optimization on the software.Several methods can be identified from the literature that target power conservation by finetuning the compilers in terms of instruction rearrangements, optimized use of memory banks, and reduction of the operands in an instruction to a minimum [69][70][71][72].
Apart from compiler optimizations, methods such as loop unrolling, software pipelining, recursion elimination, and algorithm evaluation may also prove to be power aware.
However, their effectiveness need to be evaluated under a given problem-set [73].Further, power conservation for the software depends on coding styles, selection of language constructs, choice of algorithms, and selection of data types.Capra et al. compared a number of open source software for power consumption in terms of design and functional aspects and also examined the effects of the application development environments' usage on power conservation [74].
Hao et al. proposed a technique for energy consumption in mobile devices based on instruction-level energy modeling.Many researchers have proposed models for energy consumption either for some specific components, or for all components of a mobile device [75].
Tsao et al. focused on I/O functions in mobile devices and analyzed the energy consumption of I/O events [76].All these factors exhibit an association with the source codebased power conservation techniques.
Source code optimization-based conservation is carried out during compile time.Developers create less lines of code that yield the same outcome allowing less power consumption during processing.This technique is cumbersome as the development effort is increased many folds.

Comparison of Contemporary Techniques.
In order to compare the representative contemporary techniques comprehensively, we develop a framework that consists of the following attributes: (i) Intelligence: A technique exhibits intelligence if it has a learning mechanism or at least is better than a simple threshold-based systems.The comparison does not consider the algorithm used for power awareness.(ii) Adaptive threshold: This refers to establishing a dynamic threshold that can be changed as opposed to factory configurations.This requires a better intelligence to adaptively select when to change the power state of a device.Adaptive threshold is a smarter version of the threshold-based conservation technique.
(iii) Network communication power conservation: The context aware system communicates with external sensors present in the environment mostly through wireless links.Wireless links being noisy lead to multiple retries for communication, and thus power is wasted.A technique heavily dependent on the network needs to conserve power for network communication.(iv) On-device context Processing: Whether the context classification or context processing is carried out on a mobile device or some other middleware is used.
A cloud-based technique uses the external servers while all other methods utilize the device for context processing.(v) Cut-off all applications: This refers to a device level conservation method, and does not adapt to application level adjustments.Cutting off all applications effectively halts the context aware processing as well as all other processing in favor of the basic or minimal tasks on the device.
(vi) Rule based system: This method refers to using simple rules for power conservation where rules are prewritten in the applications as well as in the device.A rule based system is efficient in classification, but it is resource-heavy due to the need for large rule space.The designers have suggested rule based systems for small rule spaces.
(vii) Load balancing: This is primarily used where external processing is utilized as in the case of cloud-based conservation.The system thus balances the load of context processing on the device as well as on the external middleware.
(viii) Use of history: History is used for predictive conservation as well as to identify a priori information.A history module is part of the context aware system as discussed in Section 3. Using history information for power awareness is considered in this facet.
Based on the aforementioned attributes, a comparative matrix for contemporary power conservation techniques is presented in Table 3.The goal of the comparison is to identify supportive and non-supportive criterion for each technique.
A detailed comparison is presented in Table 4, where factors, such as advantages, disadvantages, requirements/suitability, and technical aspects, are included.We hope the comparison will provide useful insights for each conservation technique.

Framework for Power Awareness in Context Aware Systems
In this section, we present the proposed framework for power awareness and describe its characteristics.The motivation behind building such a framework is to provide power optimization in context aware systems in a power aware fashion.The proposed framework is illustrated in Figure 4. Awareness is achieved once the power consumption is modeled.The power conservation can then be enhanced.Power conservation can be achieved in processing, storage, and communication phases that comprise a context aware system.

Power Consumption
Model.This section discusses how power is consumed and utilized in every module of a context aware system.This will allow us to better understand the power requirements and to propose conservation tactics at different levels.

Power Consumption in Context Aggregation Module.
The context aggregation module is responsible for communicating with internal sensors as well as external sensors present in the environment as discussed in Section 3. The power consumption of external and internal sensors is of the order of a few mW.However, the processing consumes much more power [6].For external sensors, the power is also consumed during network communication.Being wireless nodes, the number of retries due to noisy channels and dense networks is large.Hence, a number of retries in communication can increase the power consumption many fold.This module does not perform any processing, and simply organizes the current context as an attribute-value tuple.Denoting the power consumption by the sensors as   , the power consumption by the network as   , the number of retries as , and the number of sensors as n, the power consumption of context aggregation module   is given by (1).For all internal sensors, the power consumption by the network is zero. (1)

Power Consumption in Context Representation Module.
The raw current context as acquired by context aggregation module is then processed and represented in a hierarchical and platform independent mechanism [53].This also involves some processing to convert raw context to a meaningful form.
As an example, the temperature in Celsius is to be listed as 'Warm' or 'Cold.' Denoting the power consumed in converting a single value to the appropriate form as  V and the power consumed in processing low level task as   , there are n sensors and the power consumed by the representation module   is given by 6.1.3.Power Consumption in Context History Module.The current context and the previously known states associated with the classification state are kept in a data store.Thus, the consumed power information is accessed into the history.For the systems where predictive or statistical power awareness is not carried out and the history is absent, the power consumed is thus zero.Denoting the power consumed in a single record access of history as   and the number of records as , the power consumed by the context history module  ℎ is given by    If the power consumed by the service is  V , the power consumed by the network for each external service is   , the number of retries is t, and the number of services is V, the power consumed by the service adaptation module   is given by

Results and Discussions
In this section, we describe experimental setup used for evaluation of proposed framework then provide our observations as well as corresponding results.The tests are conducted on Dell Latitude E5430 and Samsung R450R4V machines.The tests simulates context data gathering, storage, and processing.The power consumption is measured as change in battery level.Object-oriented Java program using NetBeans version 8.2 is developed that measures the battery level through Java Native Access (JNA) library.The test results are summarized in Table 5, which shows the power consumption in percentage (%) and time elapsed in nanoseconds for context aware system.The power consumption is measured as the change in battery level of a test machine.The relationship between power consumption and time of execution is shown in    6) and (7), as well as Figures 5 and 6, conform that the increase in activity that includes communication and processing causes a linear increase in power consumption.This observation conforms to the proposed framework in Section 6.1.

Conclusion
This paper presents a comparison of various contemporary power awareness techniques within the scope of context aware systems.Different techniques to achieve power awareness are classified in this work.The review also includes power consumption profiling to identify how power consumption can be measured.Several recommendations for power conservation are also provided that will help in identifying areas of improvement within a context aware system.A framework is also presented which models the power consumption at different stages of a context aware system.The results conform to the framework which shows that the power consumption is a linear function of execution time.This can then be optimized using network communication conservation and context processing conservation.

Figure 1 :
Figure 1: System architectural of a context aware system. .

Figure 3 :
Figure 3: Usage scenarios for power consumption at the device level.

Figure 5 :
Figure 5: Linear least square line for battery consumption and time elapsed on machine no. 1.

Figures 5 and 6 .
Figures 5 and 6.The linear least square line has been calculated and is shown in V = 8.589 −12 ×  + 0.25930

Figure 6 :
Figure 6: Linear least square line for battery consumption and time elapsed on machine no. 2.

Table 1 :
Surveys for power optimization.

Table 2 :
Comparison of power profiling techniques.
Denoting the power consumed during training as   and the power consumed during classification as   , the

Table 3 :
Comparative matrix for power conservation techniques.

Table 4 :
Comparative overview of contemporary power conservation techniques.
Figure 4: Framework for power awareness in context aware systems.powerconsumedbycontext inference module   is given by  =   +  (4) The context representation module and the context inference module both consume power as part of the context processing.This is dependent on the hardware as well as the OS support.The cloud-based conservation techniques have low context processing as it is carried out over the cloud.The context processing is also algorithm dependent where the size of the data set increases the classification or training time and thus consumes more power.
6.2.1.Network Communication-Based Conservation.The major usage of this method is in network communication, which is required in the context aggregation module and the service adaptation module.It is evident from (1) and (5) that the channel may result in a number of retries, which not only consumes energy but also takes more time.It should be pointed out that the cloud-based conservation techniques have more network utilization than the rest.6.2.2.Context Processing-Based Conservation.

Table 5 :
Test results of power consumption and time elapsed for different machines.