Modeling and Analysis of the Performance for Bluetooth Low Energy

For the Bluetooth Low Energy (BLE) connection events, a 2-dimensional Markov chain-based model is proposed in this letter, to compute and analyze the duration, duty cycle, power consumption and the maximum throughput. A general application of peer-to-peer bidirectional data transmission is described in this model, by taking the influence of data transmission states of both the central and peripheral devices on connection event state into account. The impacts of connection parameters, closing rules of connection events and channel quality on the performance are also analyzed. Experimental results show that the proposed model can accurately calculate the terms of average connection event duration, average energy consumption and the maximum throughput of both the central and peripheral devices.


I. INTRODUCTION
B LUETOOTH Low Energy (BLE), as a representative of short range wireless technology, is widely used in various edge scenarios of the Internet of Things, such as healthcare [1], industry [2], smart homes [3], etc.However, different application scenarios put forward different requirements for the performances, such as throughput and energy consumption.Therefore, it is of significance to develop a theoretical model to evaluate these different aspects of performance for BLE.
Compared to the classic Bluetooth BR (Basic Rate) and EDR (Enhanced Data Rate) modes, the Bluetooth Core specification [4] defines three features to optimize BLE's low power characteristics: the addition of GFSK modulation mode reduces peak power; the number of channels is reduced to 40 instead of 79 in BR/EDR, with 3 specific channels for neighbor discovery and connection establishment to improve efficiency; optimized connection and sleep mechanism to replace idle time in BR/EDR with sleep state.Reference [5] reviews the principle of BLE technology and summarizes the characteristics of the two main data transmission modes in BLE, i.e., advertising and connection.Compared with unidirectional advertising, the connection link, is mainly employed in the bidirectional data transmission scenarios, since it is much more stable and reliable.The authors are with the School of Electronics and Information, Northwestern Polytechnical University, Xi'an, Shaanxi 710072, China (e-mail: xu_hao@mail.nwpu.edu.cn;zhjyan@nwpu.edu.cn;libo.npu@nwpu.edu.cn;yangmao@nwpu.edu.cn).
Digital Object Identifier 10.1109/LCOMM.2024.3352545 Several theoretical models are developed in the open literature for the BLE connections events to capture key performance metrics, such as the maximum throughput or the energy consumption.Gomez et al. develop a theoretical model to analyze the maximum throughput of BLE in [6], based on the maximum transmission times in connection events.Dian and Vahidnia optimize the model of [6] and analyze the influence of master's resource scheduling algorithm on the maximum throughput in [7].However, the key part of models in [6] and [7], the probability of i data packet deliveries in a connection event containing k round trips, P {i|k}, is relatively complex and not conducive to understanding and solving.Lee et al. propose a model for the energy consumption of maintaining connections and find the interval with the lowest energy consumption of maintaining connections [8].Gomez et al. measure energy consumption within connection events at different connection intervals in [9], but not consider the effects of maintaining connections or channel conditions.In addition, to the best knowledge of the authors, there is no theoretical model capable of analyzing both the maximum throughput and energy consumption for BLE connection, simultaneously.
Motivated by these observations, we aim to theoretically investigate different aspects of BLE connection performance.The main contributions of this letter are summarized as follows.Firstly, we propose a 2-dimensional Markov chain-based model for connection events.Secondly, based on the Markov chain model, we derive not only the maximum throughput, but also the duty cycle of the connection events, and further the energy consumption of BLE connections.Finally, the comparison with the simulation results shows that the theoretical analysis coincides well with the simulation results.

A. BLE Connection Operation Overview
Before entering the connection state, the devices must complete the connection establishment process.The Peripheral in the connection periodically initiates connectable advertising events, while the Center in the connection listens to the channel and notifies the Peripheral of the parameters in the connection by sending a connection request packet after receiving the connectable advertisement.
Fig. 1 shows two consecutive connection events.As shown in Fig. 1, the start time of a connection event is referred to as the anchor point.Additionally, the interval between two consecutive anchors, known as the connection interval, is defined by the Center in the connection request packet.During a connection event, the Center and Periphery transmit packets in turn, and each packet also includes the acknowledgement information.
It can be seen that the amount of time occupied by a series of connection events is related to three parameters, namely the connection event anchor point, connection interval, and the duration of connection event.The anchor points of the other connection events can be calculated based on that of the first one.Therefore, the anchor point and the connection interval remain constant once the connection is established.However, the duration of the connection event, which is not specified in the Bluetooth core specification, is determined by the closing rule of the connection event.The closing rules of connection events in the latest Bluetooth core specification v5.4 [4] can be summarized as follows: • The Access Address field of the packet header transmitted by the Center or Peripheral is incorrect.• The Center or Peripheral receives two consecutive packets with invalid CRC (meaning incorrect packet reception).• No packet is present in either the Center or Peripheral's queue.The queue status is notified via the MoreData (MD) field of header.• Scheduling conflict.Scheduling conflicts refer to other events carried out by BLE devices using time division, such as advertising and scanning.Since advertising and scanning are usually used only for the connection establishment process, this letter will focus on the connection events.

B. Connected Event Model Based on Markov Chains
Considering that the basic operation of the connection event is an alternating transmission between the Center and Peripheral, we first make 5 assumptions before performing the performance analysis of BLE connections as follows.
1) The packet length is fixed and denoted as L P acket , which consists of the packet payload length L P ayload , the access address length L AA , and the packet header length L Header .Thus, the packet length L P acket can be represented as L P acket = L AA + L Header + L P ayload .Suppose that the transmission rate of the physical layer is V , then the time required for transmitting a data packet is 2) The time duration of a connection event is divided into several time slots with length T Slot , which is equal to the packet transmission time T P acket plus the minimum interval between frames T _IF S, specified by the Bluetooth specification, i.e., T Slot = T P acket + T _IF S. Thus one connection event can be subdivided into several alternate Center/Peripheral transmission slots.
3) The data traffic of the Center and Peripheral is saturated.4) The bit error rate on each channel is fixed as BER.
5) The connection subrate function is disabled and no link loss occurs.Let Γ AA denote the probability that the packet with the correct access address field is received, and Γ S denote the probability that a packet with correct payload is received, respectively.Then, we have If both the access address and payload are transmitted correctly, it is a correct transmission.Otherwise, if the access address is transmitted correctly but the payload field has errors, it is called an error transmission.Otherwise, if packet's access address field contains errors during transmission (no matter of the payload), it is referred to as a lost transmission.The probabilities of correct, error and lost transmissions can be represented by P s , P e and P l , respectively, i.e., Let CI represent the connection interval, and R represent the maximum number of slots in a connection event.Since the transmission slots of the two devices appear interleaved and packets carry both data and acknowledgement, R should be even and thus, Then the set of all transmission slots within a connection event can be denoted as S t = {1, 2, 3, . . ., R}.Furthermore, the sets of slots transmitted by Central and Peripheral respectively can be denoted as S c = {1, 3, 5, . . ., R − 1} and S p = {2, 4, 6, . . ., R}, where R is given in (6).It is obvious that S c ∪ S p = S t and S c ∩ S p = ∅.
To represent the possible states of the system, we observe the status of each time slot within the connection events and then classify them into three distinct groups.
• Non-lost transmission state T t i,j , t ∈ S t , means that there exists a connection between the Center and Peripheral at time slot t, and the numbers of consecutive error of the bidirectional data transmissions are i and j, respectively.Recall that when there are two consecutive packets with invalid CRC the closing rule of the connection event is meet, and thus we have i, j ∈ {0, 1, 2}.
• Lost transmission state T t l means that the owner of the slot t has made a determination that the connection is lost.If t ∈ S c , the owner is Center, otherwise the owner is Peripheral.
• Sleep state SL t means the communication pair are sleeping at slot t.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Then the connection event of the BLE system can be modeled as a 2-dimensional discrete time Markov chain.The overall state transition diagram without transition probability is shown in Fig. 2, while Fig. 3 presents the state transition diagram with transition probability.The details of Fig. 2 and Fig. 3 are referred to Sec.III-A.

III. PERFORMANCE ANALYSIS
In this section, we analyze the steady distribution of the system.Then the maximum throughput, duration of connection events, duty cycle and energy consumption of BLE are analyzed according to the limiting probability of each state.

A. Flow-Balance Equations
We denote by π (X) the stationary state probability of the system state X.In the stationary state, π (X) represents the probability of observing the system in state X.
In particular, let vector π(t), t ∈ S t , denote the probability that the system is in slot t in the stationary state of the system.Such as, for slot 1 π(1) = [π T 1 0,0 , π T 1 1,0 , π T 1 l ], and for slot 2 Let σ(t) represents the sum of the limiting probabilities of all states in row t of Fig. 2. At any instant, the probability of the system occupying any slot is equal.Therefore, σ(t) can be determined according to the following criteria The steady state probability of any state is equal to the sum of the steady state probability of all its previous states multiplied by the transition probability.
Thus, as shown in Fig. 3a and Fig. 3b, for the state of the Center transmission slots after slot 1, that is, t c ∈ S c − {1}, We can easily get their previous state and transition probability to get the following flow-balance equations Similarly, as shown in Fig. 3a and Fig. 3d, for the state of the Peripheral transmission slots, that is, As shown in Fig. 3c, for the state of slot 1, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
By solving equations of ( 7)-( 10), the limiting probabilities of each state can be numerically obtained.

B. Analysis of the Maximum Throughput
The maximum throughput refers to the effective number of bits successfully transmitted per unit time when the device's traffic reaches its saturation point.To analyze the maximum throughput of the device, we need to focus on the T tp 0,0 (t p ∈ S p ) states marked in orange.These states indicate that a packet was successfully delivered in the previous Center transmission slot, and the Peripheral replied with an acknowledgment frame in that slot, representing a successful transmission of the Center transmit packet.Therefore, the maximum throughput of the Center can be expressed as Similarly, the states marked in blue corresponds to T tc 0,0 (t c ∈ S c − {1}), which is identified as a valid data transfer by the Peripheral.The maximum throughput of the Peripheral can be expressed as follows

C. Analysis of Duration and Duty Cycle
Let Q (t) denote the probability of the connection event closing exactly after slot t.In other words, the probability that the system is active at slot t, and sleeping at slot t + 1.Therefore, the probability distribution function of the duration of the connection event is as follows Let E [Q] denote the mean connection event duration expressed in slots.It can be expressed as The mean duration of connection event, E [D], is equal to E [Q] × T slot .Therefore, the duty cycle of the connection event, Ψ, can be expressed as From the analysis in this subsection, the duration of a connection event is a random variable.According to [10], the conflict among connection events is one of the focuses in the study of scheduling algorithms for multi-connection networks.Therefore, the distribution of duration can be considered to characterize the overlapping probability or level between connections when analyzing multi-connection networks.

D. Analysis of the Energy Consumption
The average power in a BLE connection consists of three parts, i.e., active, sleeping, and recovery, given as where P active is the power when transmitting or receiving data packets, P sleep is the power in sleep states, and E recover is the energy to re-establish the link after a supervised timeout.ST is the average interval between supervision timeout events.P active , P sleep and E recover are constants which can be calculated from [4] and [11].
According to [8], ST can be expressed as where T ST represents the link supervision timeout value, P L represents the probability that a connection event does not have a packet transmission interaction, and N represents the number of connection events during T ST .P L and N can be written as P L = 1 − P s , N = T ST CI .

IV. RESULT ANALYSIS
We simulated 100,000 connection events using NS3 discrete event simulation to observe the maximum throughput and duty cycle with different connection intervals under various bit error rates.The experiment covers a bit error rate range of 0 to 10 −3 , which falls within the BLE core specification's receiver sensitivity range for each parameter set.Finally, we compared the simulation results with the theoretical calculations.
Table I shows the settings of other parameters.The values used for L AA and L Header are set according to the Bluetooth core specification.To measure the maximum throughput of BLE, we set the payload size to 255 bytes, which is the maximum allowed by the core specification.
Fig. 4 illustrates the comparison between the analytical model and the simulation results.As shown in Fig. 4, the analytical model can accurately calculate the maximum BLE throughput.In cases where there are no bit errors, the throughput of Center and Peripheral will reach their highest value and remain unchanged regardless of the increased connection interval.However, in conditions of higher bit error rates, the BLE throughput decreases rapidly as the interval increases.This is because packet errors cause a premature close to Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.connection events, limiting the amount of time available for data transmission.
Fig. 5 shows the duty cycle curve of the connection event relative to the connection interval.Through comparing the theoretical calculations with the simulation results, we can confirm the accuracy of our analytical model.Regarding Fig. 5, it becomes evident that the duty cycle approaches 1 under error-free channel conditions.However, for the cases of much higher bit error rate, the duty cycle of the connection event decreases as the connection interval increases.This is attributed to the premature termination of the connection events due to error or lost transmission of the data packets.Fig. 6 shows the curve of power consumption as a function of connection interval for different bit error rates.As shown in Fig. 6, when the bit error rate is low, the power consumption of the link decreases with the increase of the connection interval.This is because the reduced duty cycle results in less time for normal transmission.However, when the bit error rate is high, the power consumption initially decreases and then increases.This is due to the high probability of invalid connection addresses at this time, and the increase in the connection interval leads to a higher frequency of link supervision timeouts.As a result, the connection re-establish process consumes excessive energy.In particular, the jagged changes in the curves result from the rounding operation when analyzing the average time interval between supervised timeout events.

V. CONCLUSION
This letter proposes a performance analysis model for BLE based on 2-dimensional Markov chain.Through this model, the maximum throughput, the distribution of connection event duration and the mean duty cycle for peer-to-peer bidirectional data transmission are derived.Based on the mean duty cycle of connection, the energy consumption analysis model is improved.Furthermore, the impact of connection interval and channel quality on these metrics is analyzed, and the distribution of connection event's duration is proposed as a way to characterize the multi-connection overlap problem.The accuracy of the analytical model is verified by comparison with simulation results.

Manuscript received 8
November 2023; accepted 3 January 2024.Date of publication 10 January 2024; date of current version 12 March 2024.This work was supported in part by the National Natural Science Foundations of CHINA (Grant No. 61771392, No. 61771390, No. 61871322).The associate editor coordinating the review of this letter and approving it for publication was M. J. Khabbaz.(Hao Xu and Zhongjiang Yan are co-first authors.)(Corresponding author: Zhongjiang Yan.)

Fig. 1 .
Fig. 1.Example of two consecutive connection events that contains two round trips(i.e., Data-Data transactions).

Fig. 4 .
Fig. 4. Maximum throughput of a BLE connection for various connection interval and bits error rate (BER) values: Analysis(anal.) vs. Simulation(sim).

Fig. 5 .
Fig. 5. Duty cycle of a BLE connection for various connection interval and bits error rate (BER) values: Analysis(anal.) vs. Simulation(sim).

Fig. 6 .
Fig. 6.Power consumption for various connection interval and bits error rate (BER) values.