Ble Parameter Optimization For Iot Applications: Andreina Liendo, Dominique Morche, Roberto Guizzetti, Franck Rousseau
Ble Parameter Optimization For Iot Applications: Andreina Liendo, Dominique Morche, Roberto Guizzetti, Franck Rousseau
Email: [email protected]
¶ STMicroelectronics, 38920 Crolles, France
Email: [email protected]
Abstract—Bluetooth Low Energy (BLE) has been designed as and energy consumption. DL is the time it takes for a device
a power efficient protocol for small portable and autonomous to discover or to be discovered, in other words the time to
devices, showing its efficiency for connecting these devices with establish a communication.
smartphones to periodically and frequently exchange data, like
heart rate or notifications. Additionally, BLE is present in almost Table I: BLE Neighbor Discovery parameters
every smartphone, turning it into perfect ubiquitous remote
control for smart homes, buildings or cities. Nevertheless, there Name Notation Value according to the standard
is still room to improve BLE performance for typical IoT use
Scan Interval TSI ≤ 10.24 s
cases where battery lifetime should reach several years. In
Scan Window TSW ≤ TSI
this paper we propose an extension to a model for evaluating Advertising Interval TAI 20 (or 100) ms ≤ TAI ≤ 10.24 s
BLE performance, latency and energy consumption, in order to integer multiple of 0.625 ms
provide realistic results based on various scenario conditions. In Advertising Delay ρ pseudo-random value in [0, 10] ms
addition, we propose a parameter optimization of the BLE Neigh- Advertising Event TAE = TAI + ρ
bor Discovery process, in order to obtain the best performance Adv. Indication interval TAW ≤ 10 ms (low duty cycle)
possible depending on the constraints of specific use cases. Our
results on two typical IoT test-cases show that advertiser battery
lifetime can be increased up to ≈ 89× (9.55 days to 2.32 years) BLE is suitable for a very wide range of application
for a first case, and ≈ 281× (9.55 months to 7.36 years) for a scenarios, but to maximize the lifetime of the devices while
second case. guaranteeing the user experience expected for a given appli-
Index Terms—Internet of Things; Bluetooth Low Energy; cation, it is necessary to find a suitable set of parameters that
Neighbor Discovery; Discovery Latency; Energy Consumption; are specific to the type of communication patterns being used
Battery Lifetime; Testbed; Measurements.
and the constraints specific to the application. In this work,
we propose a method to find optimal sets of parameters to
I. I NTRODUCTION
minimize the energy consumption for a wide range of BLE
BLE has two communication modes according to its spec- applications, thus maximizing battery lifetime.
ification: Neighbor Discovery or ND and Connected Mode In previous work [2]–[6] authors have proposed models
or CM. ND is the first phase, where two devices discover for energy consumption during ND from the advertiser’s per-
each other to establish a link. CM is the second phase, where spective and considering that the scanner is already listening
devices can exchange data over their connection, which is when the advertiser starts advertising. These models are based
teared down once the session is over. While in ND, the on quantitative models of the physical layer via BLE SoC
central device is the scanner and the peripheral device is the measurements of current consumption [2], and probabilistic
advertiser. When reaching CM, the central device becomes the models of the Link Layer of the protocol [3]–[6]. For certain
master and peripheral the slave. During ND, communication use cases the role of the devices might be reversed, for example
is asynchronous and devices transit through 4 of the 5 BLE in the case where there are fixed advertisers and scanners are
states [1]: standby, scanning and initiating for passing by. In this situation, the advertiser is waiting for a
scanners, or standby and advertising for advertisers, scanner, which is not taken into account in existing models.
using only the 3 advertising channels. When in CM, a device In this paper, we present an extension and optimization of
transits through connection and standby using the 37 the model proposed by Kindt et al. [4] in Section III. Then we
data channels. The time spent in CM depends on the size propose a method for parameter optimization in Section IV.
of the data and/or the duration of the session, whereas the The objective is to obtain the best BLE performance possible
time a BLE transceiver will spend transmitting, receiving or during ND, with respect to two important metrics: Discovery
in standby mode during ND is determined by the parameters Latency (DL) and energy consumption. Based on our parame-
given in Table I. The values assigned to these parameters ter optimization, we give DL, energy consumption and battery
determine two important and interdependent characteristics of lifetime results for two IoT use cases in Section VI. These
the ND phase for BLE devices that have a huge impact on results are compared with performance obtained when using
user experience and device lifetime: Discovery Latency (DL) configurations recommended by the Bluetooth SIG Profiles
[7]. DL model and parameter optimization, are validated via suitable when the scanner behaves as the peripheral device
testbed experiments in Section V. at the application level.
We extend and optimize this model to estimate BLE perfor-
II. O PTIMIZING BLE FOR A WIDE RANGE OF SCENARIOS mance, DL and energy consumption, regardless of the role of
the devices. In addition, we propose a parameter optimization
The BLE standard supports a wide range of parameter method based on this model, in order to obtain the lowest
values for ND. The choice of these parameters directly af- BLE energy consumption possible, while taking into account
fect the performances of BLE devices. Therefore, it is of use case requirements such as maximum acceptable Discovery
capital importance to use an optimal parameter configuration Latency. Finally, we evaluate the Bluetooth SIG Profiles for
in order to ensure a fair tradeoff between DL and energy some typical IoT use cases and compare with the results we
consumption. According to the BLE specification, before find with our new model. We present the results in terms of
establishing a connection, the scanner must first listen to the battery lifetime based on the battery model presented in our
advertising channel during the ND in order to synchronize other work [8].
with the advertiser. The scanner/master is the initiator and is
responsible for establishing a connection with one or several Table II: Recommended Advertising Interval, Scan Interval
advertisers/slaves. Once in Connected Mode, or CM, master and Scan Window Values (Table 5.1 and 5.2 in [9])
and slave will periodically exchange application data. From the
Advertising/Scan Duration Parameter Value
point of view of BLE communication, the scanner/master is the
central device whereas the advertiser is the peripheral which is First 30 seconds (fast connection) Adv. Interval 20 ms to 30 ms
After 30 seconds (reduced power) Adv. Interval 1 s to 2.5 s
typically at the sensor side. However, for certain use cases, the
First 30 seconds (fast connection) Scan Interval 30 ms to 60 ms
scanner may play the peripheral role at the application level. Scan Window 30 ms
Applications based on proximity sensing are an example After 30 seconds (reduced power) Scan Interval 1.28 s
where the advertiser is configured to broadcast data to adver- – Option 1 Scan Window 11.25 ms
After 30 seconds (reduced power) Scan Interval 2.56 s
tise periodically. Multiple scanners in range can receive data – Option 2 Scan Window 11.25 ms
without the need for a connection establishment. From the
application level point of view, the advertiser and the scanner
would play the central and the peripheral role respectively, and III. M ODEL OPTIMIZATION
furthermore, the scanner is at the user side, meaning that for We based our work on the more complete and precise model
such use cases, DL and energy consumption criticality are at available in the literature [4]. The model considers that the
the scanner side. This shows that efforts to improve perfor- advertiser starts at a given phase offset called φ after t = 0,
mance should be focused on one side or another, depending moment at which the scanner starts scanning on channel 37 as
on constraints that are imposed by the use case. shown in Figure 1a. In order to determine scanner performance
The Bluetooth SIG has given a list of profiles [7] intended to when constrained DL and energy consumption is at the scanner
provide efficient configurations for BLE devices for different side, we propose to consider the case where the advertiser
applications, such as collecting sensor information, health, starts advertising at a given phase offset φ before t = 0.
sports and fitness, environmental sensing and proximity. These In other words, in this case, the scanner starts scanning at
profiles define the behavior for both central and peripheral a random time within one advertising cycle as illustrated in
devices, and they include recommended scanner/advertiser Figure 1b.
configurations to ensure optimal DL and energy consumption Algorithm 1 from [4], is used to estimate the advertiser DL.
during ND. There are 24 profiles in total, where the same It is the elapsed time between the start of the first advertising
configuration is recommended for 10 different profiles and event, until the start of the advertising event received by the
it is depicted in Table II, 4 profiles recommend different scanner. The duration of an advertising event successfully
configurations, 6 profiles state that devices should be config- received by the scanner tadvEvnt (ch) is added to obtain the
ured with consideration for user expectations of connection total advertiser DL. It depends on the channel over which
establishment, and the rest state that connection establishment reception takes place, which is estimated at line 9.
requirements are defined by a higher layer specification. The condition to consider a successful reception is that the
To the best of our knowledge, there is no performance evalu- starting point of an advertiser event n falls into a region within
ation using these profiles and there is no evaluation considering a scanner interval called effective scanning window which
the scanner as a peripheral device with constrained DL and goes from tsemin(k) to tsemax(k). The effective scanning
energy consumption. The analytical model proposed by Kindt window is different for each of the advertising channels and
et al. [4] can be used to determine the right configuration depends on four parameters: scanning interval TSI , scanning
depending on application constraints. But results from this window TSW , duration of an advertising packet transmission
kind of model are very general and might require very long Tapk and the duration of hopping to the next channel tch (see
computation time. Getting results from Algorithm 1 can take Figure 1, where TAW = Tapk + tch ). The effective scanning
from minutes to several hours when evaluating configurations window is estimated as seen in Table III, where tearly is the
that uses large parameters. Furthermore, this model is not time with respect to each advertising channel from which, if
Scanning Cycle
Advertiser Scanner
Scanning Event
ch.37
ch.38
ch.39
ch.37
ch.38
ch.39
ch.37
ch.38
ch.39
Φ TAI TAI time
𝜌 𝜌
t=0
AdvertisingCycle
Advertiser
TAW
Advertising Event(TAE)
ch.37
ch.38
ch.39
ch.37
ch.38
ch.39
ch.37
ch.38
ch.39
TAI 𝜌 TAI time
Scanner
Scanning Event
t=0
an advertising event n begins, the packet can be succesfully function (PDF) of the start of an advertising event over time
received even if tearly is not within the scanning window. t (which depends on both n and φ) is required. The shape of
tlate is the time with respect to each advertising channel the distribution depends on n. For more detail on the shape
from which, if an advertisign event n begins, the packet can’t of the distribution we refer the reader to the paper [4].
be successfully received, even if tlate is within the scanning Then the consumed charge in Coulombs during DL can be
window. For more details we refer the reader to the paper [4]. calculated knowing the current and voltage of the circuit for
The probability of an advertising event having started each event. The current and voltage vary from one manufac-
between tsemin(k) and tsemax(k) is called Phit , it is turer to the other and are extracted from quantitative models of
calculated at line 10 of Algorithm 1, where n and k are the physical layer which are based on SoC measurements [2].
the current evaluated advertiser and scanner events which are Finally, knowing the charge and DL, energy consumed during
considered according to lines 13 and 6 respectively. P cM is DL can be estimated. Quantitative models of physical layer in
the probability that the nth advertising events don’t lead to our work are based on TI CC2540 and ST BlueNRG current
a successful reception (cumulative miss probability). With in- consumption measurements extracted from technical literature
creasing values of n, the probability that one of the advertising [10], [11].
events is received successfully, grows. Thus, P cM shrinks
with growing n. The algorithm terminates if (1 − P cM ) is Table III: Effective Scanning Window
smaller than a lower bound = 0.9999. The expected DL for Ch tearly tlate
a given φ offset is calculated at line 11. It is considered for
37 0 Tapk
the expected value of ρ to be 5ms and the error is neglected. 38 Tapk + tch 2Tapk + tch
Then the average DL for a given TSI , TSW , TAI configuration 39 2Tapk + 2tch 3Tapk + 2tch
is obtained [4] by integrating the expected DL results over all Ch tsemin(k) tsemax(k)
possible values of φ. A numerical integration is then performed 37 0 (k − 1)TSI + TSW − tlate
by multiplying the results with ∆ and computing the sum of 38 (k − 1)TSI − tearly (k − 1)TSI + TSW − tlate
these values. 39 (k − 1)TSI − tearly (k − 1)TSI + TSW − tlate
communication between the two BLE devices. One task runs 4 Testbed median
Simulation mean
over TAI with a given step, repeating every measurement a Tai (ms)
configurable number of times (100 in this case). While running Figure 2: Advertiser Discovery Latency with Algorithm 1
the experiments we capture all the timestamped Bluetooth
traffic with tshark for further analysis, mainly extracting the
discovery latency. Docker images containing all the software 40
Testbed q5-95
Testbed q25-75
Testbed mean
Average Discovery Latency (s)
to run the exact same experiment will be made available. Testbed median
Simulation mean
30
B. Experimental Results 20
B. Medical telemetry system use case critical latency. We provide results for DL, energy consump-
tion and battery lifetime for two typical IoT test cases: retail
We now analyze a medical telemetry use case where an in-
store and medical telemetry. We show that we can obtain huge
body implanted pacemaker uses BLE to connect to a mobile
gains compared to SIG Profiles recommended configurations
device or other access point supporting BLE, to transmit
and provide multi-year lifetime instead of a few days or weeks.
information to a medical institution. The implanted sensor
operates on a 225 mAh coin cell battery and plays the beacon R EFERENCES
or peripheral role (advertiser), so the challenge is to extend [1] Bluetooth SIG. Specification of the Bluetooth System. 02 December
battery lifetime as long as possible, as it has to remain active 2014. Core Version 4.2. [Online]. Available: https://www.bluetooth.
permanently. A connection is required to collect data from com/specifications/bluetooth-core-specification/legacy-specifications
[2] S. Kamath and J. Lindh, “Measuring Bluetooth Low Energy Consump-
the pacemaker to the smartphone or other mobile device via tion,” Texas Instruments, Tech. Rep. Application Note AN092, 2010.
BLE. The key parameters to be evaluated are the connection [3] J. Liu, C. Chen, and Y. Ma, “Modeling neighbor discovery in bluetooth
time on the user side and its energy consumption during ND. low energy networks,” IEEE communications letters, vol. 16, no. 9, pp.
1439–1441, 2012.
The scanner is active when sending data to the hospital is [4] P. Kindt, D. Yunge, R. Diemer, and S. Chakraborty, “Precise
required, whose frequency can range from every 3 months Energy Modeling for the Bluetooth Low Energy Protocol,” CoRR, vol.
to every 12 months [15]. The scanner is in range at the abs/1403.2919, 2014. [Online]. Available: http://arxiv.org/abs/1403.2919
[5] K. Cho, W. Park, M. Hong, G. Park, W. Cho, J. Seo, and K. Han,
moment of connection. We base the parameter optimization “Analysis of latency performance of Bluetooth low energy (BLE)
and performance evaluation on Algorithm 1, since the adver- networks,” Sensors, vol. 15, no. 1, pp. 59–78, 2014.
tiser plays the peripheral role at the application level and has [6] W. S. Jeon, M. H. Dwijaksara, and D. G. Jeong, “Performance Analysis
of Neighbor Discovery Process in Bluetooth Low-Energy Networks,”
constrained DL and energy consumption. We suppose ideal IEEE Transactions on Vehicular Technology, vol. 66, no. 2, pp. 1865–
channel conditions. 1871, 2017.
Table VIII shows DL, energy consumption and lifetime [7] Bluetooth SIG. Adopted Bluetooth Profiles, Services, Protocols
and Transports. 2018. [Online]. Available: https://www.bluetooth.com/
results. With our proposition, advertiser lifetime can be 281 specifications/gatt
times higher than with the SIG Profile when using ST Blu- [8] A. Liendo, D. Morche, R. Guizzetti, and F. Rousseau, “Efficient Blue-
eNRG, reaching a lifetime of 7 years and 4 months with an tooth Low Energy Operation for Low Duty Cycle Applications,” in IEEE
International Conference on Communications, 2018.
average advertiser DL of ≈ 4 s, which is considered a good [9] Bluetooth SIG. Proximity Profile specification. 14 July 2015. Version
user experience for this use case. The SIG Profile provides 1.0.1. [Online]. Available: https://www.bluetooth.com/specifications/gatt
a lifetime of 9.5 days. This proves that BLE is a suitable [10] J. Liu and C. Chen, “Energy analysis of neighbor discovery in Bluetooth
Low Energy networks,” Nokia.(nd), 2012.
technology for this kind of applications when using an optimal [11] STMicroelectronics. BlueNRG Current Consumption Estimation
configuration. Lifetime on the scanner side improvement is Tool. 2017. Version 1.4. [Online]. Available: http://www.st.com/
not achieved with the proposed configuration as extending the en/embedded-software/stsw-bnrg001.html
[12] Université Grenoble Alpes, Grenoble INP / UJF. WalT - Wireless
advertiser lifetime is the priority. Testbed. 2013-2014. [Online]. Available: http://walt.forge.imag.fr/
[13] R. Knoblauch, M. Pietrucha, and M. Nitzburg, “Field studies of pedes-
VII. C ONCLUSIONS trian walking speed and start-up time,” Transportation Research Record:
Journal of the Transportation Research Board, no. 1538, pp. 27–38,
We have extended an existing model [4] and proposed 1996.
a novel parameter optimization method to compute optimal [14] R. W. Bohannon, “Comfortable and maximum walking speed of adults
parameters for BLE devices depending on application require- aged 20—79 years: reference values and determinants,” Age and ageing,
vol. 26, no. 1, pp. 15–19, 1997.
ments. This model as well as the parameter optimization are [15] H. Burri and D. Senouf, “Remote monitoring and follow-up of pace-
validated experimentally. We show that BLE is suitable for a makers and implantable cardioverter defibrillators,” Europace, vol. 11,
wide range of IoT applications if parameters are chosen with no. 6, pp. 701–709, 2009.
care. We obtain the appropriate TSI −TSW −TAI configuration
that guarantees a Discovery Latency which satisfies specific
requirements for any use case, such as maximum acceptable