Modeling Battery Behavior on Sensory Operations for Context-Aware Smartphone Sensing

Energy consumption is a major concern in context-aware smartphone sensing. This paper first studies mobile device-based battery modeling, which adopts the kinetic battery model (KiBaM), under the scope of battery non-linearities with respect to variant loads. Second, this paper models the energy consumption behavior of accelerometers analytically and then provides extensive simulation results and a smartphone application to examine the proposed sensor model. Third, a Markov reward process is integrated to create energy consumption profiles, linking with sensory operations and their effects on battery non-linearity. Energy consumption profiles consist of different pairs of duty cycles and sampling frequencies during sensory operations. Furthermore, the total energy cost by each profile is represented by an accumulated reward in this process. Finally, three different methods are proposed on the evolution of the reward process, to present the linkage between different usage patterns on the accelerometer sensor through a smartphone application and the battery behavior. By doing this, this paper aims at achieving a fine efficiency in power consumption caused by sensory operations, while maintaining the accuracy of smartphone applications based on sensor usages. More importantly, this study intends that modeling the battery non-linearities together with investigating the effects of different usage patterns in sensory operations in terms of the power consumption and the battery discharge may lead to discovering optimal energy reduction strategies to extend the battery lifetime and help a continual improvement in context-aware mobile services.

Keywords: smartphone battery modeling; power efficiency; sensory operation modeling

Introduction
New generation mobile devices with sensing capabilities, such as smartphones and tablets, will constitute a significant part of future mobile technologies. By reconfiguring and repurposing built-in sensors, these mobile devices can provide highly proactive services within the concept of human-centric or participatory sensing, which support computationally pervasive and emerging context-aware mobile applications. However, a major challenge standing up to these sensor-rich devices is resource limitation in terms of power, memory and bandwidth as compared to the capabilities of PCs and servers. In this sense, the design of mobile device-based context-aware middleware needs not only to create abstract models for the representation of the interested phenomena for the application services, but also to exploit the heterogeneous and unobtrusive physical world, as well as providing energy-efficient optimal sensor sensing and actuating solutions.
Due to the ever-increasing computing power and hardware development in mobile devices compared to the slow growth observed in stored capacity of energy densities in the mobile device-based battery technologies, the use of mobile devices is constrained by battery lifetime. Especially, continuously capturing user context through sensors in a context-aware application imposes heavy workloads on computations and hardware, e.g., the processor and relevant hardware peripherals, which, in return, makes the battery drain rapidly. Thereby, topics, such as the extension of battery lifetime, estimation of energy delivery or battery discharge and optimal energy management, have drawn much research interest in mobile computing.
In this sense, the examination of non-linear battery behaviors becomes crucial in terms of creating optimal sensor management systems. The battery lifetime mostly depends on energy consumption rate, discharge profile, i.e., usage pattern and battery non-linearities. At the high energy consumption rate, the effective residual battery capacity degrades and results in having a shorter battery lifetime. However, any precautionary change in the usage pattern could extend the battery lifetime. For instance, decreasing the average energy consumption rate at any point in time could be one of the changes. More importantly, the physical non-linearities in the batteries could recover the lost capacity in cases where less energy is consumed after an aggressive battery discharge. Thereby, topics of battery non-linearities, such as the rate capacity effect and the recovery effect, will be explained in detail.
To this end, this paper examines battery modeling to investigate its behaviors and non-linearities. Then, it continues by modeling the energy consumption of smartphone sensors, and it takes the accelerometer sensor as an example. Both simulation results and smartphone application models are provided to verify the effect of variant sensory operations on the battery discharge and non-linearities. In this way, the linkage between a change in the energy consumption profile of sensor operation and the battery behavior to respond this change is exposed. Then, a reward process is integrated to create a sensor management system. The system aims at benefiting from battery behavior with respect to variant sensor loads forced by smartphone applications to prolong the battery lifetime. Finally, three different sampling methods are proposed on the evolution of the given reward process to achieve energy efficiency while maintaining accurate application services. A smartphone application is implemented to validate the given sensor management system.

Related Work
This paper first studies battery modeling under the scope of the battery non-linearities with respect to variant battery discharge profiles. The battery behavior is not consistent with respect to energy required by the device, due to the fact that the energy drawn from the battery is not always equivalent to the energy consumed by the device itself. In this regard, many different approaches have been used to model the battery properties, such as the electro-chemical models [1][2][3], electrical-circuit models [4] and analytical models [5,6]. However, these models provide the same battery lifetime for all load profiles, and they give better results for constant continuous loads, but not for variant or intermittent loads. In this sense, stochastic models [7] are presented to model batteries in an abstract manner by discretization of the battery charge and creation of probabilistic transitions among discharge levels caused by variations in workloads. Other detailed studies on battery modeling can be found in [8][9][10].
In addition, many studies have been put forward to extend battery lifetime in mobile sensing. Accordingly, most works done so far emphasize setting a minimum number of sensors by a mobile application with fixed duty cycles, using different deterministic sampling period schemes and maximizing power efficiency by solely applying less complexity in computations or by changing the transferring methods of data packets [11,12]. However, the impact of different usage patterns on devices needs to be investigated to link the projected effect on the power consumption. Especially, modeling the battery non-linearities together with an understanding of the relation between energy-wise usage patterns and battery depletion may lead to discovering optimal energy reduction strategies in order to help a continual improvement in context-aware mobile services.
Second, this study suggests opportunistic power saving methods at the low-level sensory operations in mobile sensing, so that battery lifetime could be extended. To be able to accomplish that, the energy consumption behavior of smartphone sensors is analytically modeled in this paper. Significantly, a smartphone application is carried out for the accelerometer sensor to investigate this behavior in detail. According to the proposed model, energy consumption profiles are created by assigning different pairs of duty cycles and sampling frequencies in sensory operations. Third, a Markov reward process is integrated to evaluate the energy consumption profiles and to represent the energy cost caused by each profile as an accumulated reward. The accumulated reward is also linked to the battery modeling to make a connection between the energy-wise usage pattern on sensors and battery behavior. Finally, with an understanding of non-linearity observed on the batteries in response to variant sensory operations, a fine efficiency in power consumption is achieved by proposing three different methods on the evolution of the reward process, while employing a human activity recognition (HAR)-based context-aware smartphone application.
The outline of the paper is as follows: Section 3 provides the battery modeling, which is very feasible to project onto mobile device batteries. Section 4 models sensory operations in terms of energy consumption and creates different load profiles during the operations to find out their effects on the total energy cost by taking the smartphone accelerometer sensor as an example. Section 5 makes a connection between battery non-linearity and sensor utilization to analyze battery discharge profiles triggered by energy cost occurring during sensory operations. Finally, Section 6 uses this connection to examine changing sensory operations to achieve a fine achievement in energy efficiency by providing a HAR-based context-aware smartphone application.

Smartphone Battery Modeling
A battery consists of electro-chemical cells, which drive electro-chemical reactions in order to convert chemically-stored energy into electrical energy. A cell includes two electrodes, which are an anode and a cathode, and the electrolyte, which separates these electrodes. The electrolyte may be liquid, as in lead-acid batteries, or solid, as in lithium-ion batteries. Lithium-ion batteries are widely used in notebook computers and cellular phones due to their high energy density and light weight.
An ideal battery has a constant voltage throughout a discharge regardless of the rate of the load, where the voltage is expected to drop instantaneously to zero when the battery is fully discharged. Therefore, the theoretical capacity of a battery is in the measure of its maximal charge. However, the specific energy that is delivered by a battery in practice is lower than the theoretically-defined energy of its active materials [13]. This is because the average voltage during the discharge is lower than the theoretical bound; also, the battery is not discharged to zero volts, and all available capacity is not utilized. The ions at the anode diffuse into the cathode when a current is drawn from the battery. If the current drawn is too high, the speed of diffusion is slower than the rate of ions reacted at the cathode. This results in a reduction that occurs at the outer surface of the cathode, and access to the inner ions is impossible. Hence, a drop in the output voltage sourced by the battery is observed. As the intensity of the current drawn increases, the loss of capacity due to the non-uniform deviation in ion concentration becomes significant, and therefore, the cell voltage decreases, which is called the rate capacity effect [14]. At a lower current drawn or when the discharge process occurs in some intermediate or periodic time scale, the ions could have enough time to diffuse into the inner cathode and let the charge recovery process take place. Therefore, the reacted ions at the cathode become uniformly distributed. This non-linearity is called the recovery effect, which depends on the discharge profile and the time length while no load is applied [15].
Let C andĆ be considered as the theoretical and nominal capacity values of a fully-loaded battery. In addition, let x(t) denote the level of available charge and v(t) denote the level of available theoretical capacity of the battery with the conditions of t ∈ [0, T ] and (v(0), x(0)) = (C,Ć).
The kinetic battery model (KiBaM) is the most powerful analytical battery model represented firstly in [16] and widely used in recent studies of [9,17,18]. KiBaM considers the stored charge to be distributed over two wells: the available charge well and the bound charge well, as shown in Figure 1. The bound charge well supplies electrons only to the available charge well; whereas, the available charge well supplies electrons directly to the connected load. The rate of charge flow between two wells depends on the conductance parameter k and the difference in heights of two wells, h 1 and h 2 . The capacity ratio is denoted as parameter c, and it corresponds to the friction of total charge stored in the available charge well. Recall that x(t) denotes the available capacity of the battery and v(t) denotes the total capacity, where x(0) =Ć and v(0) = C >Ć, so y(t) = v(t) − x(t) becomes the bound charge. On the other hand, KiBaM was primarily developed to model lead-acid batteries. Since these type of batteries have a flat discharge profile, there are some shortcomings of KiBaM to model as lithium-ion batteries, which are widely used in today's mobile devices. However, KiBaM could be still examined under some issues, such as battery lifetime, capacity rate and recovery effect [9,18]. To be able to extend the battery model for lithium-ion cells, a solid state diffusion must be added into KiBaM. In the solid state, electro-activated species at the electrodes experience drift motion diffusion in addition to random diffusion [19]. The drift motion can be added into flux as a negative charge, p, i.e., degradation on the conductance parameter k.
During the battery operation, the current drawn due to discharge is denoted by i(t) ≥ 0 with the average discharge rate ofλ = lim t→∞ 1 t t 0 i(s)ds, if the limit exists. Then, the unit change in the charge stored in both wells is given by the following differential equations: with initial conditions of When the battery supplies a continuous discharge, the available charge well would reduce rapidly; the difference of heights in both wells would grow, since there is no time to move the charge from the bounded charge well into the available charge well, and the battery would not last long. However, when the load is removed, a remedy charge flows from the bounded charge well into the available charge well until h 1 and h 2 are balanced. This gives the idea of why the recovery process is taking place when an intermittent charge is applied by variant loads.
By using Equation (1), the total discharge process becomes independent of the charge flow gradient: If a cell is subject to variant loads, then the current drawn would vary with different discharge rates by examining Equation (2) accordingly: • Case 1: The constant discharge, Λ(t) = λt, where v λ (t) = C −λt on the bivariate dynamic system of (v λ (t), x λ (t)): • Case 2: The periodic regularly-spaced pulsed discharge, Λ(t) = λr t/r j=1 δ jr , where δ and λr denote pulses and the released charge during the two consecutive pulses in r > 0 time intervals on the system of (v (r) (t), x (r) (t)): with the evaluation of geometric sum; C (r) gives the bursting points of discharge profile due to periodically-drawn load. Figure 2 shows an example investigating KiBaM behavior under different load profiles and also at fixed system parameters. The load profiles are characterized by mixture pairs of sampling frequency, f s , and duty cycling on the load. Thereby, the load is defined by λ = 2f s where f s = {50, 100} Hz and r = n∆t where n = {1/2, 3/4, 1}. For instance, if n = 1, this means the load has a constant discharge profile, i.e., 100% duty cycling, whereas if n ∈ {1/2, 3/4}, this means duty cycling values of {50%, 75%} are applied on the load. In addition, the same power consumption rate per unit time is considered during discharge. On the other hand, the battery parameters for KiBaM are chosen as in C = 1400 mAh, c = 0.625, p = 0.1 and k = 4.5 E −5 (1/s). These parameters can differ from one battery to another. However, with this example, it is intended to see how a battery discharges differently with respect to variant load profiles. Figure 2 is normalized to the time point where the total discharge is expected according to the full depletion in C where f s = 100 Hz and 100% for the duty cycle. According to the results, obtaining a depletion time of less than one means that the battery seems as if it were depleted even though it still has charge in storage. In contrast, the battery lifetime is extended when the depletion time is greater than one. As a conclusion, two hypotheses can be made from the example. First, the constant aggressive loading by Equation (3) affects the discharge profile severely and yields to depletion of the device battery faster, even if the battery still has a sufficient stored charge. The second hypothesis by Equation (4) is that the battery recovery effect takes place when load gets lighter. The effect increases the available charge well and prolongs the battery lifetime.

Modeling Sensory Operation for Energy Consumption
By knowing how constant and intermittent loads affect battery depletion, sensor operations will be modeled in this section by introducing different sensor settings using variant sampling frequencies and duty cycles. The linkage between battery behavior and variant sensor operations by this model is supported and validated with simulations and experiments from a real smartphone application.
Assume that the operation of mobile device-based sensors is modeled by some certain time parameters, such as wake-up/initialization/termination time, t w , total time per sampling, t s , total time for operation cycle, t c , and total time throughout sensor run, t r . In addition, Ω s and Ω i are given as constant default sensor properties for power consumption to make a sampling and to run idle, respectively [20]. Mobile device sensors, such as accelerometer and the microphone, could be ruledby this generalized model, since they do not follow dedicated protocols to run, like GPS, Wi-Fi and Bluetooth do.
DC stands for the duty cycle that indicates an active sensory operation (i.e., the time interval in which actual sensor samplings are being made) within t cycle . Thus, the number of sampling occurrences is found by N s = DCt c /T s where 0 ≤ DC ≤ 1, and T s is the sampling period (i.e., inversely proportional to the sampling frequency, 1/f s ) that defines a waiting time between two consecutive sensor samplings.
Then, a total energy consumption throughout a sensor's run is approximated by Equation (5), while ignoring power consumption wasted during the initialization and termination phases of the sensor.
It would be hard to quantify and analyze the power efficiency actually achieved based on the provided battery model if we used sensors, such as Wi-Fi, 3G cellular connectivity or GPS, which apply certain design decisions, such as data transmission policies waiting for a specific medium to send and receive. Due to the reasons of suitability to easily match the derived cases for the battery discharge process, having a better realization and integration for energy consumption modeling that aims at using different sampling frequencies and duty cycles on sensory operations and general utilization in many smartphone applications, the accelerometer sensor is chosen for the implementation of a real-time application and simulations in the upcoming sections.

A Simulation Model
A sensory operation can be modeled as a one-burst process, also called ON-OFF sensory operation. This process is a special case of Markov-modulated Poisson processes. This special case is called the interrupted Poisson process (IPP) and has two states, ON and OFF, as shown in Figure 3. According to the process, the traffic is Poisson with a probability distribution of {F (t) = 1 − e −λt }, but the traffic is generated at deterministic intervals in the ON state with a constant rate λ on and a length of mean time, i.e., transition time, 1/w on . In contrast, there is no traffic in the OFF state, and the intensity of residency in this state is given by w of f . The traffic in the IPP can be seen as a discrete event simulator for samplings in sensory operations. Thus, the intensity rates become λ on = f s, w Note that experiments in the upcoming section are carried out by implementing a context-aware application on a Blackberry RIM Storm II 9550 smartphone. Storm II consists of a three-axis accelerometer named ADXL346 from Analog Devices (see Table 1 and [21] for technical details). From the table, only drain current value I DD is an effective modeling parameter to determine power consumption through the sampling channel under a stable drain voltage V DD , since the power is formulated as P = V × I in physics. By using the IPP sensor modeling together with the data obtained through Table 1 and Equation (5) with a parameter of t c = 2 s, the power consumption ratio in the sensor drain per each operation cycle under variant DC and f s values is shown in Table 2. According to the results, the smartphone accelerometer sensor consumes 4.45-times more power per each operation cycle in the most aggressive sampling mode in comparison with the least aggressive sampling mode.

An Application Model
The accelerometer sensor needs to be modeled in order to examine the power efficiency achieved under different sampling and duty cycling strategies. By using Equations (1) and (5), the power consumption model within each t c can be considered as in: where: • (x, y) are bivariate dynamic battery system parameters that define capacity values stored inside the bound charge well and the available charge well in KiBaM. • L s and L i are denoted as the discharged load when sensor samplings are being made and the sensor is idle, respectively.
-If DC = 1, then the sensor makes samplings continuously. This means the effect of L i can be ignored due to the constant discharge profile. Recall that the model follows Equations (3).
-If DC ∈ [0, 1), then the sensor makes samplings in defined intervals. In this case, the effect of L i cannot be ignored, so that the model follows Equations (4).
• R s and R i are battery recovery effects in KiBaM to define the remedy charge flowing from the bound charge well to the available charge well when sensor samplings are being made and the sensor is idle respectively. • L b stands for the background load occurring instantly within smartphone operation. For instance, while experiment applications are running, the device is left in stand-by mode and only connected to a 3G network. There is no other system functionality being executed by the user while the sensor operates.
The application runs until the initially fully-charged one-year-old 1400-mAh smartphone battery depletes. Only one constant pair of sampling frequency and duty cycle is applied as operation parameters to the accelerometer sensor at each application run. Sampling intervals are modeled as I i = n/f s where n and f s are an integer value and sampling frequency, respectively. I i defines a waiting time between two consecutive sensor samplings; n = {1, 2, 4, 8} and f s = 100 Hz are taken. On the other hand, values of {0.5, 0.75, 1} are taken for DC. t c is also taken as 1 s.
Results are shown in Figure 4. Note that the Blackberry Java 7.1. SDK only helps to reveal the remaining battery status. According to the results, applying a more aggressive sampling methodology causes the battery to deplete more quickly. In addition, the lower value of DC makes the battery recover effect more significant and, thus, prolongs the battery lifetime.
According to Equation (5), energy consumption per time of 1/f s max , (= 1/100), under different sampling frequency is modeled as in: Θ n * 12.5Hz = n * Ω sample + (n max − n) * Ω idle (7) Then, Equation (7) together with Equation (6) turn into: where r s , r i and l n are considered to have a stable energy consumption rate per unit time.

Comparison: Simulation vs. Application
Since parameters r s and r i cannot be verified through smartphone programming, to compare energy consumption between the analytical model and the application, the following inequality needs to be approximately satisfied: The effect of r s and r i becomes more significant when DC = 1. Hence, The inequalities with a small error margin prove a valid connection between the analytical model and the application in terms of the power efficiency achieved. Relevant error would stem from computational workload on the processor and non-linear functionality of the battery. With the help of these facts, the accelerometer sensor is analytically modeled with sufficient success. This information reveals that many sensors whose operation method is similar to the accelerometer, such as the microphone, gyroscope, pulse meter and so forth, can be modeled in a similar way.

Modeling Smartphone Sensory Operations
This section presumes ongoing sensory operations in a smartphone application, and their effects on the battery depletion can be modeled as a semi-Markov reward process. The changes in sensory operation in terms of sampling frequency and duty cycling makes it semi-Markovian, since the time spent in any sensor setting and its transition to another sensor setting is random, which will be based on the accuracy ratio defined in the next section. Reward is associated with the proposed KiBaM battery model-based power consumption or affected battery depletion by an active sensor setting.
Assume that a set of DC and a set of f s are given by {1, 0.75, 0.5} and {100, 50, 25, 12.5} Hz, respectively. In addition, let us define a state space S that lies over these two datasets as in Let us also define a power consumption rate, ψ, for each state and assume that it may vary in time. Hence, a total accumulated power consumption, v, while residing in state i from time s to t is introduced by the difference equation of: with the probability distribution of F V (t, v) = P r{V (t) ≤ v}. According to KiBaM, ψ could be two different types. The first type represents an actual power consumption rate, ψ i,1 , consumed by sensory operation settings defined by state i; whereas, the second type, ψ i,2 , belongs to degradation in maximum battery capacity, i.e., the recovery effect that makes a remedy charge flow migrate from the bound charge well into the available charge well. By evaluating Equations (1) and (9) together, KiBaM equations are correlated with the accumulated power consumptions by: 1 (s, t), v i,2 (s, t)) where h 2 > h 1 > 0 and v i,1 (s, 0) = v i,2 (s, 0) = 0.
The joint distribution of the accumulated battery discharge during state i becomes: .C}, since the battery always has a predefined capacity C that is distributed by a fraction factor c over two wells in KiBaM. Therefore, by using Equations (10) and (11), the battery gets empty when V 1 (t) ≥Ć + V 2 (t): where v x ≤ C −Ć.
If v i,x = C −Ć when the battery gets empty, it gives a clue that a constant high load has been applied to the battery, and this makes the recovery effect not take place.
The first power consumption rate, ψ i,1 , for each state can be obtained by using Equation (5), Tables 1 and 2. The power consumption at each f s is proportional to flowing drain current, I DD , under a stable drain voltage supply. Thus, ψ i,1 can be defined as in: On the other hand, the second power consumption rate, ψ i,2 , can be derived from Equations (1), (3) and (4) if a state l transits into another state i at time s: where t ≥ s and ψ l,1 > ψ i,1 , since the recovery effect takes place whenever a lower load is proceeded.
To this end, assume that a semi-Markov chain represents the evolution of changing sensory operation methods. The chain consists of a finite state space S = {1, ..., N}, the state transition density matrix q ∈ Q and the state transition matrix p ∈ P . q represents jump or transition rates from user state i to user state j at time t. Whenever i = j, this means that the current user state remains unchanged, or, i.e., a dummy transition occurs. Furthermore, p il (s, t) = P r(S(t) = l | S(s) = i) where i, l ∈ S, and t ≥ s represents a user state transition probability matrix, which accepts the relation of lim t↓s ∂p il (s, t)/∂t = q il (s). The chain can revisit a user state at different system times, and also, not every user state needs to be visited. Hence, there is no requirement that user state transition probabilities must be symmetric (p il = p li ), or a specific state might remain in the same in the succession of time (p ii = 0).
In addition, a reward structure can be attached to this on-going chain, and it can be thought of as a random variable associated with the state occupancies and transitions. The reward can be seen as power consumption per unit time while a mobile device battery is discharging; thereby, it is denoted by the same ψ, and S is then redefined as the battery discharge profiles/states. As a result, the total reward, i.e., total power consumption, depends on the total visiting time in a state i. Then, it can be said that the reward ψ i belonging to state i is proportional to the aggregation of Equations (13) and (14).
Finally, the general evolution of a semi-Markov reward process to describe power consumption caused by sensory operations is attached to Equation (12) and given by: where the left-hand side, V , represents the expected present value of all received rewards from time s to t given that process enters into state i at time s. Whereas, the first element of the right-hand side represents the aggregation of rewards earned both at the previous time, the second element of the right-hand side is the reward obtained from either continuity in the same state or transition to another state.

Performance Evaluation
A human activity recognition (HAR)-based context-aware application is examined to investigate the power efficiency caused by the sensor utilization with respect to the recognition accuracy in the interested context. Our previous works [22,23] are adopted for context recognition by using the smartphone accelerometer, and accordingly, some user postures, such as sitting, standing, walking and running, are chosen as interested context. A Blackberry RIM Storm II 9550 smartphone with a fully-charged 1400-mAh battery is used for experiments. Sensor settings and the associated reward process were already explained in the previous section. In this section, a set of rules is applied by introducing an action space for this process, and methods are proposed for the transitions among sensor settings through the evolution of the underlying process.
For performance analysis, a similar user activity profile is performed by applying two proposed sensory sampling methods differently on a HAR-based context-aware application with a sufficient number of experiment repetitions (over 20 experiments for each sensor management method with variant users). Accordingly, a user profile begins with sitting and then standing each for 30 s (used for calibration); then, it transits into another posture randomly at the end of the following visiting times of {5, 10, 30, 60, 100, 300} s. The adopted recognition algorithm uses the smartphone accelerometer and recognizes the defined postural activities with a period of one second. In the first one-minute runtime, the accelerometer sampling parameters are set to {DC = 100%, f s = 100 Hz}. Then, sensory sampling parameters are adaptively changed by our following proposed methods.
An action state space, a = {decrease = 1, preserve = 2, increase = 3} ∈ A, is defined to regulate sensory operations, i.e., to decrease, preserve and increase power consumptions, respectively, while maintaining the application accuracy in context awareness. A 10% threshold value is defined for the accuracy margin to represent the tolerance where false recognitions are observed. Depending on the ratio of false recognitions, actions are applied. This ratio is calculated every 10 s. If the ratio of false recognitions occurring within the recent 10-s of application time is lower than the specified margin, then Action 2 is taken to preserve the same setup for the applied sensory operations. In addition, if the ratio hangs in the same margin at least for a sufficient time t suf f , which is set to 20 s for the experiments, then Action 1 is taken to reduce power consumption by estimating that the observed postural activity is expected to stay on hold. In contrast, if the ratio of false recognitions is higher than the specified margin, then Action 3 is taken to increase the power consumption in sensory operations by making more aggressive samplings. Thereby, a fine balance between the power consumption caused by the sensory operations and the application accuracy is attempted.
There are three different state transition methods applied for the Markov reward process defined by Equation (15). The methods control power consumption by changing DC and/or f s according to the recognition accuracy observed in postural activities. Relevant adjustments are regulated by the action set of a.

Method 1
This method tries to change DC in the first place, rather than changing f s , and proposes how to wander over the defined space S according to actions a by:

Method 2
This method, in contrast to Method 1, makes the adjustments in f s in the first place. Then, the relevant state transitions over S become:

Method 3
State transitions are executed according to the ascending order of power consumption rates shown in Table 2. Hence, both DC and f s could be changed simultaneously by this method as in: Each method given by Equations (16)-(18) is applied differently to the semi-Markov reward process for the similar user activity profile within the same experimental setups in order to analyze the power efficiency or battery life extension achieved by the smartphone accelerometer, shown in Figure 5, while keeping overall 10% accuracy loss.
During the first one-minute period, the aggressive sampling method is applied, which results in the highest recognition accuracy. After, state transitions are regulated by our proposed methods together with actions according to the ongoing user activity profile; therefore, we observe an accuracy decrease. The ups and downs depicted in Figure 5 show the increase of power consumption to compensate the worsening of application accuracy and the decrease of power consumption to make an opportunistic sensory operation adjustment, due to the stability observed in the application accuracy. On the other hand, a drastic decrease can be seen in the accuracy ratio initially, due to the changing sensor settings by adjusting a lower number of sensory samplings to infer the user activities; the accuracy ratio then increases, since a better adaptation is achieved by the user activity recognition algorithm when time progresses. Among the three proposed methods, a comparison can be found as "Method 3 > Method 1 > Method 2" in terms of the power consumption ratio. Accordingly, the sampling at slower frequencies consumes higher power than the sampling at lower duty cycles. However, this shows the opposite trend in terms of the recognition accuracy. This is because sampling at slower frequencies still obtains information about user activity, where the sampling at lower duty cycles cannot. On the other hand, Method 3 has the highest efficiency in the power consumption, since it switches sensory operation modestly, while achieving a fine recognition accuracy. In general, the tradeoff solutions achieve overall 50% enhancement in power consumption caused by the physical sensor work on the battery discharge, with respect to the overall 10% decrease in the accuracy ratio for user state recognitions. In addition, Figure 5 is scaled to the amount of battery discharge based on elapsed time, where the same experiment is carried out for the most aggressive sampling strategy.

Discussions
Since the use of smart devices is constrained by their limited battery lifetime and the slow growth in energy density provided by battery technologies, this drives the need for accurately modeling power consumption profiles. As studied in this paper, modeling the battery through KiBaM and associating it with existing hardware to achieve efficiency in power consumption can be classified under power optimization models based on mathematical estimation and the hardware operation/specific domain for mobile sensing. The diversity in architectural designs within smart devices and their components along with the differences in usage patterns present a challenge to profile the actual energy consumption. Therefore, many other existing research efforts are already been made to model power consumption profiles for smart phone use. Traditional methods [24] use external equipments, such as power meters, to model energy estimation based on measurements of device operation in different activity modes. In contrast, some studies, classified under system executing modeling [25,26], remove the necessity of using extra equipment by runtime monitoring to track key underlying operating system parameters and hardware components. They first determine a measurable power cost of using a specific device component and characterize its effect on battery drain over a unit of time. Then, they collect power consumption-related data through use of applications and break this data down into pre-measured component base statistics collected in applications in order to create a proper energy model. The final step aggregates all of the data collected by use of different applications and components and generates power cost coefficients to anticipate online power consumption or battery drain for future smartphone operations. Furthermore, this approach allows one to emulate the power consumption of mobile software architectures for optimization and leads to creating model-driven testing and auto-generated code, as well as specifying domain-specific modeling, by selecting a set of hardware components that satisfy both functional and nonfunctional requirements, while minimizing overall power consumption. However, in this paper, we intend to model the battery and application domain-specific sensor use to examine variant energy loads acquired by sensor operation and their effects on battery depletion and possible energy savings.

Conclusions
This paper investigates mobile device-based battery behavior with respect to variant sensory operations in a smartphone application. In this manner, the paper studies the battery non-linearities by examining an effective battery model, called KiBaM, for various battery discharge profiles. The paper also models sensory operations by providing the smartphone accelerometer as an example to analyze the linkage between battery discharge and power consumption caused by the sensor. With the understanding of non-linearity observed on the batteries with respect to variant operation methods in sensors, a fine efficiency in power consumption is achieved. Thereby, a Markov reward process is integrated to create energy consumption profiles in sensory operations and to represent the total energy cost by each profile as an accumulated reward. Finally, three different sensor employment methods are proposed on the evolution of the reward process while employing a human activity recognition (HAR)-based context-aware smartphone application. It is shown that with the integration of the battery non-linearities into the diverse operation methods in sensors, a fine power consumption balance is achieved while employing context-aware services in resource-constrained mobile devices.

Acknowledgments
This work is financially sponsored by the National Natural Science Foundation of China