1. Introduction
The IoT (Internet of Things) and Internet of everything (IoE) technologies are revolutionizing the world into modernity [
1]. The connected objects impact the entire world and emphasize new consistent communication aspects that will enable smooth connectivity between objects and humans. The short-range technologies have provided low power and short distance communications as they rely on small-order communication protocols standards. For instance, Bluetooth [
2], Wi-Fi, Z-Wave, ZigBee and 6LoWPAN [
3,
4]. However, these technologies remain constrained as they can not afford long-range connectivity with low energy consumption, which is a tremendous requirement for new IoT applications. Many constraints have been encountered, such as defective efficiency in terms of energy consumption, latency, scalability, and network equipment costs. Afterward, these critical requirements have encouraged the research community to design a new and effective alternative to provide long-range connectivity and low power communications. Consequently, Low Power Wide Area Networks (LPWAN) have been raised as a practical alternative to short-range and low power communications [
5]. Besides, LPWAN networks are regarded as a new generation of IoT that relies on new communication techniques to guarantee long transmission ranges and lifespan requirements.
LPWAN technologies have emerged in two categories; cellular and non-cellular [
6]. The configuration of these networks is structured to achieve widespread communications and scalable coverage in miscellaneous IoT fields in different environments types and application classes. Within this context, many long-range communication paradigms have been adopted in IoT applications such as Sigfox [
7], INGENU [
8], Weightless SIG [
9], DASH7 [
10] and Long Range (LoRa) [
11]. However, LoRa has been much attention in IoT field. It operates in the unlicensed industrial-scientific-medical (ISM) frequency bands [
12]. The IoT-based LoRa network connects end nodes (EDs) to their gateway (GW) through direct communications. These EDs are typically battery-based. Therefore, it is paramount to accurately assess the IoT-based LoRa system’s energy model. Accordingly, determining the optimal LoRa communication parameters has been challenging for IoT networks.
In LoRa networks, the transmitted information should undergo several processing steps (e.g., whitening, channel encoding, interleaving and modulation). Therefore, the trade-offs between transmission energy and computational energy should be considered to measure the energy efficiency of a typical set of parameter selections. Within this context, many works have addressed the problem of energy modeling and transmission parameter selection in LoRa networks [
13,
14,
15]. However, the proposed models have not considered all the main factors behind the energy cost in LoRaWAN, which can lead to underestimating the lifespan of the EDs, thus the lifespan of the overall network. For instance, the provided energy models in [
13,
16], have considered only the default available coding rates by LoRa standard. In addition, the authors have adopted relative fixed values for computation energy which is considered impractical as processing energy varies from one transmission setting to another. Furthermore, other works have proposed adaptive algorithms for the LoRa parameter setting [
17,
18]. However, the related models are based predominately on transmission energy to select an adequate set of parameters. Whereas it is should be more practical to set a coding rate index and then change the spreading factors (SFs) as in some cases; using higher SF with lower coding rate (CR) is better than using lower SF with higher CR. This may lead to gain a considerable amount of energy better than the stand LoRa adaptive data rate (ADR). Moreover, the ideal policy to select the optimal transmission parameters set (e.g., modulation, coding) taking into account the energy-reliability performance has been neglected in most of the recent works. In this paper, we focus on the LoRaWAN protocol elements and the mechanisms of estimating the EDs battery lifetime. LoRaWAN technology uses different default parameters to optimize the energy consumption of the EDs. Therefore, we propose a full energy consumption model for EDs using LoRa modulation and LoRaWAN protocol. The main aim is to use all the possible transmission combinations among SFs and CRs. Besides, investigating the impact of channel medium, SFs, CRs, payload size, and communication range on the energy consumption and reliability of LoRa EDs. In this paper, we have proposed an accurate alternative for default LoRa stand ADR based on Markov Decision Process (MDP) that aims to estimate the optimal transmission parameters to provide increased energy-reliability policies. This scheme is apt to enables significant energy gain, high reliability and adaptive selection of the LoRa transmission parameters regarding the channel condition, the distance, and energy residual of the EDs. The contributions of this work can be summarized as follows:
We derive a completed LoRa communication system based mainly on the Hamming channel coding scheme and CSS modulation technique. Likewise, thorough details on the functioning and purpose of each system block are deeply detailed. The communication system model includes the channel encoding/decoding, modulation/demodulation, whitening/ de-whitening, and interleaving/de-interleaving processes;
We provide a full energy model that features the main mechanisms behind energy consumption in the LoRa communication system based on CSS modulation SFs hybrid settings with coded transmissions using different CRs under the Additive White Gaussian Noise (AWGN) communication channel. The energy model addresses the effect of the processing unit, channel coding, and decoding on energy consumption;
We propose an optimal adaptive algorithm for LoRa parameters selection based on MDP to guarantee energy efficiency and high-reliability trade-offs. The main objective is to find adequate settings that allow LoRa devices to withstand longer, considering the transmission quality and the energy efficiency;
The remainder of the paper is structured as follows.
Section 2 presents related works.
Section 3 presents a detailed LoRa communication chain.
Section 4 provides an investigation of the energy efficiency of LoRa and proposes an energy model for the LoRa communication system.
Section 5 details the proposed adaptive parameter selection approach dedicated to LoRa class A EDs.
Section 6 discusses the obtained results. Finally,
Section 7 provides the conclusion.
2. Related Works
Numerous studies have been provided to understand the technical limits of LoRa technology. These works have focused on different layers of LoRa including the application layer [
19], transport layer [
20], network layer [
21], data link layer [
22] as well as the physical layer [
23]. The first attempts started by investigating the secret of the LoRa modulation technique based on the Chirp Spreading Spectrum (CSS) scheme as reviewed in [
24,
25]. Moreover, the effect of the modulation chirps’ orthogonality issues has been studied in [
26,
27,
28]. Furthermore, the work [
29] has been considered the first work that proposed a primary model based on the LoRa communication chain. This model incorporates mainly the CSS demodulation, de-interleaving, de-whitening, and then channel decoding using a Hamming encoding [
30]. Moreover, the authors in [
31,
32,
33] have presented a model that estimates the bit error rate (BER) behavior of LoRa CSS based modulation of diverse SFs under AWGN channel conditions. Besides, to investigate the performance of LoRa under different channel circumstances, authors in [
34] have derived a study of LoRa modulation BER under different channels among Nakagami-m, Rayleigh, and Rician fading.
To optimally select the LoRa physical parameters for a standard transmission, authors in [
35] have proposed a theoretical ADR control model based on a logistic regression algorithm. In [
36], the capture effect was investigated to address the transmit power allocation of poor-conditioned LPWAN EDs among LoRaWAN. The authors of [
37] have investigated the ADR technique’s performance and security properties for battery-powered LoRa devices that transmit data on cattle location and health. Another work proposed a new MAC protocol called DG-LoRa and evaluated that varying the number of gateways, channel BW, and CR improves the number of re-transmissions better than the default LoRa method [
38]. The impact of the packet size on the LoRa performance was evaluated in [
39]. The study aimed to balance the reliability, delay, and energy consumption of LoRa under different physical layer parameters.
Additionally, a platform to assess different stages of LoRa transceivers with a deep emphasis on modulation and demodulation techniques were proposed in [
23]. However, this model can only deal with small-sized LoRa packets. On the other side, several works have addressed both the LoRa reliability and energy dissipation requirements. For instance, a first paper addressed the impact of LoRa transmission parameter selection on the performance of LoRa networks, in which the authors studied the impact of LoRa parameters on the system’s energy efficiency and communication reliability through an adaptive method for parameter selection [
18]. Moreover, to assess the issue that the nodes near the gateway are more likely to transmit a packet successfully than distant ones, a scheme was introduced to optimize the packet error fairness on LoRaWAN networks [
40]. In [
41], the authors had studied the effect of SFs allocation of LoRa EDs to optimize the energy consumption constraint using a distributed genetic algorithm and Markov Decision Process respectively. These methods have provided acceptable performance of packet reception probability with a reduced energy consumption amount. Authors in [
42,
43] have addressed the energy consumption issue in LoRa EDs by proposing a delimitation technique that evaluates the radio propagation behavior of the EDs in the network. The work [
44] investigates the optimal SF parameter and transmission power (
allocated to EDs in LoRa networks. The other efforts have been dealing with the issue of sensor data collection delay in urban areas focusing on LoRa based gateways [
45]. Moreover, the energy consumption and reliability trade-off were also considered in [
46]. The authors experienced the energy measurement on different LoRa Semtech EDs, and they have demonstrated the transmission configurations and the channel type impact the energy/reliability trade-off in LoRa networks. In the same context, a prediction model of energy consumption and a probabilistic approach based on Markov’s chain is provided to estimate the lifetime of the LoRa wireless sensor network using the Labview simulation tool [
47].
Analyzing these works, we have recognized that the energy efficiency gained by the channel encoding and decoding along with the adequate SF parameter has not been addressed to assess the LoRa energy performance. Besides, the critical energy-reliability tradeoff of LoRa transmission systems has not been addressed in most cases, yet its impact on the energy and reliability performances is of paramount importance. Moreover, the ideal policy to select the optimal set of transmission parameters (e.g., modulation, coding, interleaving and whitening) taking into account the energy-reliability performance has been neglected in most of the recent works. For instance, most of the related works have used the default specified LoRaWAN CR 4/5, the CR 4/7 and occasionally the CR 4/8 along with CSS modulation scheme without considering the channel, residual energy and transmission/processing trade-offs effects. Moreover, we have noticed that the used energy models in previous works are exclusively based on CSS modulation parameters and in few cases on fixed coding, neglecting the interleaving and whitening effects on energy and reliability efficiency on the one hand, and the processing costs of all the transmission blocs on the other hand. These works have been typically based on CSS modulation and demodulation technique according to the channel variation without addressing the channel coding performances in both energy conservation and reliability. Consequently, this work considers a practical and real LoRa transmission scenario by considering the effects of all the transmission blocs and their transmission rates (e.g., CR, SF, BW) in the energy efficiency, reliability and delay performances bearing in mind the energy-efficiency trade-offs resulting in the transmission-processing operations at each transmission round.
To deal with the mentioned gaps in the LoRa communication system, we re-investigated the required transmissions and processing operations and provided a completed and detailed energy-reliability model to practically assess the energy and reliability efficiency gained by each configuration selection. Specifically, we have reconstructed a completed LoRa communication system model that includes the channel encoding/decoding, modulation/demodulation, whitening/de-whitening and interleaving/de-interleaving processes by considering the effects of each transmission selection of all blocks. Within this context, and knowing the effect of each parameter selection on energy and reliability performances, the optimal transmission configuration according to the channel condition, distances and the residual energy of LoRa nodes can be efficiently obtained at each transmission slot. Consequently, based on the provided system model, an optimal adaptive parameter selection scheme is required to meet both reliability and energy efficiency performances. Thus, this work proposes an adaptive LoRa transmission algorithm to provide the optimal policy in terms of transmission parameters selection at each transmission slot, which considers the energy-reliability tradeoffs, distances, channel conditions and residual energy.
3. System Model
LoRaWAN is an open standard exhibited by Semtech corporation. It is referred to as an MAC protocol that assure on air wireless inter-connectivity and time scheduling between end nodes and the base station in the network. Additionally, the nodes are densely dispersed, forming a star of star network topology as shown in
Figure 1. The GWs communicate the received data to their servers at the back-end. Accordingly, those nodes can be of different classes depending on the requirements of the application: Class A, B, and C [
48,
49].
Generally, LoRa is referred to as the physical layer basis of the long-range LPWAN technology launched by Semtech. Fundamentally, it uses a proprietary CSS-derived technique by spreading multiple chips over the occupied frequency bandwidth. The basis chirp changes its frequency values instantaneously by wrapping all associated frequency band. For LoRa, the basic chirp is integrated considering 5 main parameters: Bandwidth (BW), SFs, CRs,
, and channel Signal to Noise Ratio (SNR). The SF, BW and CR can be selected from a set of SF
, BWs
, and CR
respectively. The modulator produces different chirps (up-chirps, down-chirps). Concerning the bandwidth, LoRa may transmit a sample every
which may also denote the chirp duration. Each sample holds a portion of the encoded information to the SF number of bits. These data are encoded again into a non-binary symbol that may take value in {0, 1, 2,
…,
} before being modulated. Therefore, the symbol is overlaid by changing the chirp signal frequencies over the BW with
times
. Thus, a symbol is transmitted every symbol duration
. Thereby, the higher the SF is, the longer the symbol takes to be transmitted. Additionally, LoRa includes Forward Error Correction (FEC) codes, which can combine blocks of data of four bits each, then encode them by adding bits of adjustable parity from one to four bits, which makes it possible to obtain different coding rates CR
. Furthermore, the useful bite rate
is relatively proportional to the used BW, the SF, and the CR, as expressed by:
To transmit a packet of several symbols, a combination of up chirps and down chirps are used to refine wireless radio transmissions under allowed ISM free exploitable frequency bands. The LoRa packet generally contains four elements—a preamble, a header, a payload, and a Cyclic Redundancy Check (CRC) block [
48]. LoRa relies on the physical layer parameters and possesses specific blocks to convey a packet through large distances. Before any succeeded LoRa transmission, a chain of concatenating processes is performed by the LoRa device transceivers.
Furthermore, LoRa induces controllable redundancy bits into transmitted data to make transmissions resilient to channel medium noises. Accordingly, the data in this method are encoded using a Hamming channel encoding scheme with variable code-words regulated by the parameter CR . A data of 4 bits is then encoded cyclically by using the adequate CR to form a code-words of n bits. To improve the reliability, LoRa adopts an extended version of Hamming by using additional CRs. Therefore, the channel encoding generates for each block of four bits a code-word of bits, where .
Additionally, the Hamming check matrix
H for each code of length and dimension (n,k) is a generator matrix of each orthogonal code
C denoted by
. For instance, if
H is the check matrix for
C,
H is an
matrix; the rows are orthogonal to
C and {
} =
C. The result from the block of encoded code-words
is then reordered to prepare symbol generation using the LoRa spreading factors and add some extra resilience to those code-words by interleaving them. Before that, a whitening block adds known pseudo-random bits to the output of the channel encoded block by operating the XORing process. The length of the whitened vector with the encoded vector must have the same length. Generally, this operation is applied to induce randomness into the symbols to provide more features for clock recovery at the receiver. Afterward, an interleaving operation is performed by taking each queued codeword at the output of the FEC coding block and scattering them over time. This operation serves to separate and reorder the positions of probable errors that may occur. Therefore, channel decoding methods increase the probability of correcting these errors in the receiver decoding processes. Typically, the interleaver shuffles the bits in a representative order to avoid the occurrence of an error, yet it can provide neither error correction nor error detection. Thus, no gain is attached to the processes. Indeed, in LoRa physical layer, this process is utilized mainly to reconstruct the encoded code-words diagonally in the adequate form with the selected spreading factors for the CSS modulation [
24].
Each vector forms symbols of binary digits that takes values in {0, 1, 2, 5, …, }. Consequently, the total generated symbols may be surveyed as a vector of M elements (i.e., ).
After applying gray indexing, the symbol generation process is issued by translating the interleaved binary code-words of length SF into non-binary symbols. Those symbols may take values in the interval of possibilities. Thus, each symbol that can be transmitted in a certain defined period also depends on the SF and the chirp duration . For instance, if an SF of length seven is selected, the value of a symbol may vary from 0 to 255.
Each generated symbol is mapped to the CSS modulator. The modulation procedure relies on specific criteria to give each transmitted packet a standalone form against channel medium interference. Accordingly, each segment of the featured information by non-binary symbols is spread over a time-frequency band using CSS chirps. The CSS modulator relies typically on the on-base chirp waveform, especially to carry each symbol by spreading it over the bandwidth within
duration. Hence the base-band chirp holding the symbols
is represented in the time domain as:
where
is the amplitudes that denoted by:
,
t is time variate and
is the initial phase.
Generally, each modulated symbol
is denoted by:
Assuming the sampling frequency is equal to the bandwidth BW, we obtain the expression of the previous chirping process in the discrete domain due to the Shannon sampling theorem. Consequently, assuming
is null in the discrete-time domain, the expression of the waveform carrying a single symbol
within
duration is:
Therefore, the spread chirps involving the packet of the encoded symbols are denoted in the discrete domain by:
Afterwards, the system sends the modulated symbols sequentially over the radio channel. The format of the entire collected message at the receiver input is:
where
h,
,
and
Z[
n] are the block-fading channel, the received signal, the transmitted signal and the Zero-mean Gaussian noise with valued variance
respectively.
The demodulation technique occurs in two distinct phases; the de-chirping and the extraction of the probably received symbols. The de-chirping operation aims to extract the information from the analog received signal by multiplying this signal with the base of the transmitted chirp signal. Regularly, the de-chirping operation extracts out the part containing the transmitted symbols ready to be addressed in the subsequent runs. The resulted signal after applying the de-chirping operation takes the form of an M-ary Frequency Shift Keying (FSK) modulated signal as follows:
The LoRa demodulation extracts a set of symbols from the de-chirped signals. Herein, particular coherent demodulation is a crucial strategy to deal with the M-FSK signals after crossing an AWGN channel. Moreover, this modulation technique is more resilient against channel impairment, including the AWGN. Moreover, applying the Discrete Fourier Transform (DFT) enables us to recuperate the transmitted symbols [
23].
The application of the DFT process extracts the recovered non-binary symbols . Then, they are coded into binary frames using the gray indexing method, preparing the bit sequence to be declined. The de-whitening processes are applied to withdraw the bit-stream form by re-XORing the binary stream of the received symbols. The expression of de-whitening is given by XORing the demodulated with the same applied whitening sequence of bits. Afterward, an inverse of the interleaving process at the transmission side allows us to store one codeword at a time in the same rectangular array format in a row-wise manner. Furthermore, the vector array of the received bit-stream analysis is the input of the decoding block to check the occurred number of errors. The FEC decoding of the de-interleaved bits relies on the Hamming decoding algorithm. This procedure allows the system to recognize and investigate the LoRa received packet by providing enforcement against the channel to measure the number of occurred bit errors.
5. Proposed Method
We assume an extensive LoRa network composed of various autonomous battery-powered LoRa EDs scattered randomly around their GW. Each ED is supposed to convey packets respecting the duty cycle (DC) regulation with minimum energy usage. Thus, the transmission parameters should be adopted carefully to ensure the energy efficiency and reliability trade-off. In other words, if multiple choices are available, the ED has to select the setting that meets the task with the lowest power requirement with high reliability. The GW can successfully decode the received packets if the SNR is above the threshold
for a given selection, and the received signal should necessarily exceed the sensitivity of the receiver antenna
. If these conditions are not satisfied, the uplink and downlink messages cannot be received. Therefore, the ED re-transmits the packets within a certain number of allowed uplink attempts. The sensitivity of the GW receiver [
53] is given as:
This work proposes a method that overlaps the energy efficiency and transmission reliability of the LoRa ED. Due to their gains, the study considers both CSS modulation and coding rate energy saving. The EDs power consumption is potentially related to the transmission and surrounding environmental conditions. Therefore, the parameter selection procedure for the physical layer must be handled carefully, respecting the several criteria among transmission parameter adaptation, transmission power, and critical distance to maintain energy efficiency and consistency for any ED. Each ED in the network should choose the adequate transmission parameter considering the channel medium variances. As a result, the selected option should prove successful transmissions with low power consumption.
Besides, to remedy the issue of many transmission parameter options availability, to choose the most efficient, a parameter called distance threshold
was introduced. This parameter is defined as the distance at which any node located far from the GW can successfully convey a typical transmission. The system adjusts the settings until obtaining the highest distance with suitable parameters. Correspondingly, the selection should consider the packet size, processing energy, and the distance that separates any ED from its GW. To estimate this distance, we rely on the following expression:
Any ED in the network must decide which parameter combination is selected to maintain the energy-draining for a given duty cycle. Typically, selecting a single parameter among SF or CR regarding data packet size, the system must settle the parameters continuously, taking into account the critical distance.
Therefore, the main aim to measure the difference of the energy consumed for different SFs, which is, in other words, the gain of energy obtained using two separate SFs. Thus, the energy difference between two consecutive SFs;
and
,
, and
, is denoted by:
Besides, this equation is also applied to get the average consumed energy for processing comparing between two different SF parameters which can be expressed by:
The energy consumption of a given set of configurations among SF, CR, BW, and transmission power is considered taking into account the trade-off between the required energy for transmissions and the computation processes. More specifically, for a given transmission scenario, an ED may successfully transmit a packet by using multiple possible settings. Therein, the transmission setting with less energy consumption is more likely to be selected. This may be achieved by assessing the energy efficiency esteemed by the margin difference between and for each possible setting.
This classification is obtained by comparing the total
and
per cycle for two successive configurations using different SFs with a given
where
and
. Therefore, the energy saving is defined as the difference of transmission and processing energy consumption between two different settings, and it is expressed as:
This expression allows us to investigate the energy performance between various transmission parameters, therefore calibrating the energy differences in terms of energy gain and cost. Moreover, to decide if the selected configuration is relevant in reliability and energy efficiency, we compare multiple settings that execute the same task for the same scenario conditions. Besides, we investigate the energy efficiency ratio that combines both required transmission and computation energy. However, the difference value between two settings
by a given end device
is considerable if the overall transmission energy is strictly higher than energy processing [
54]. Therefore, the energy efficiency metric is expressed as:
Additionally, the reliability using a given set of transmission can be assessed between two different settings to transmit the same packet by dividing the total transmitted packet
by the total consumed energy per cycle:
We investigate the system performance in AWGN canal using our redeveloped LoRa communication chain that includes all the previous mentioned physical layer processes. The BER
and the packet error rate (PER ) of a coded packet given that the SNR and SF can be derived as follows [
55]:
According to [
56], the BER expression of CSS modulation in AWGN channel can be approximated by:
where
depicts the symbol energy,
is the single-sided noise power spectral density,
is the distribution function, and
is the header length. Moreover, the required energy to transmit a coded bit
is subtracted from the energy needed to transmit an uncoded bit
. It can be analytically provided by:
Furthermore, the energy consumption can be analytically expressed independently to the data throughput for a typical selected physical parameter. Therefore, the amount of saved energy
is expressed as:
We adopt a multi-objective optimization method to formulate the LoRa transmissions and processing parameter selection as a Markov Decision Process. The designed optimization model under uncertain surroundings for decision-making is known as MDP. This method is based mainly on the MDP [
57] technique to assign the transmission parameters autonomously. The flowchart presented by
Figure 2 illustrates the whole idea of the proposed method. Therefore, the main aim is to assign the most energy-efficient configuration to an ED while transmitting a given packet from a given distance to the GW. To assign a given transmission parameter, the ED has to consider many variances affecting transmission quality, such as random channel conditions. The ED should efficiently adjust its transmission parameters by using minimum energy dispenses. At each decision instant, the system is maintained in a particular state
, and the agent elects an action
, existing in the latter state. Once the action
is performed, an intermediate cost
is received by the agent, and thus the system is moved to a qualitatively different new state
based on the transition probability
. The main aim of the MDP is to find the optimal policy that minimizes the long term average cost (i.e.,
). An MDP can be either a finite or infinite time frame [
58]. Given a finite MDP time horizon, the optimal policy
to minimize the total expected cost is defined as follows:
Here,
is the discounting factor and
is the expectation function. Furthermore, finite time horizon Markov decision processes are a finite time horizon MDP solution. The system’s performance takes place in a time known as the lifetime measure of the ED. In particular, the system starts in state
or the initial state of the node when it is full of energy and continues to operate until the battery is completely discharged. The optimal policy is to minimize
. If we denote
as the minimum achievable reward at state s, then we can estimate the value of
at each state recursively by solving the following optimal Bellman equations:
Wherein is the value of state s and is the value of taking action in state .
The proposed MDP model is defined by the tuple (, , , ), where presents the state of the system, is the set of possible actions, is the set of transition probabilities of the system states, and is the cost function for a given decision. We specify each element of the tuple as follows:
States: There are two different states associated with every ED on the network; a sleep state
and active state
. During
the ED may perform data gathering from its environment and processing tasks but no transmissions can be held, whereas during
, it communicates with the GW base and opens predominately listening windows to send and receive exchanged complete duplex transmissions with the same GW. In an active state, the ED takes many autonomous decisions to adjust transmission settings, including transmission power
adjustment. Each state
consists of two components
, where
.
denotes the energy state space, and
denotes the channel medium state space.
is the energy state,
contains all possible energy buffer levels regarding the different possible transitions. The channel medium state
influences the packet reception probability at the receiver ED and, since we assume a power-controlled transmission system, it also affects the power consumption at the transmitter. The process is used to derive the channel state transition matrix for an AWGN channel model as described in [
59,
60].
Action: At each decision epoch t, the transmitter ED obeys the system state and determines an action from the action set . In our model corresponds to the efficient setting SF and CR to be used in the current slot t. It compares the energy efficiency of each possible transmission set used by the transmitter in the current time slot t. After comparing each possible transition, the ED selects the adequate SF and CR as actions. The ED is assumed to check and test all the possibilities of transmission settings in order to find the optimal policy. This way ensures successful transmissions with high bite rates. The transition to the active state is proportional to the action that is handled consecutively by the established transmission parameters and transition probability;
Transition probabilities: Let t and express the current time index and the approach state in slot t, respectively. We indicate with at the action taken in the present slot t, and we refer to as the total consumed energy given that action is chosen. Hence, the energy evolves as:
The transition from the state
to another state
by the action
relies on the efficiency of different possible transmission settings. The selection of an action
is proportional to the transition probability from sleep to active mode. The transition probability from state
given that the action
is selected is:
If
is the system state, action
is admissible only if
. Additionally,
is given by the sum of two segments: the energy consumption associated with processing
and that associated with the transmission task
.
where
refers to the indicator function that is equal to 1 when the argument is zero and zero otherwise.
(.) is the transition probability matrices of the channel.
Cost function: It is a function that minimizes the total energy that encompasses the transmission and processing energy as defined by Equations (13) and (29). The cost function implicitly selects the adequate transmission parameter that minimizes the assessed energy
per transmission using optimal SF and CR.
(.) is the probability that the ED stays in the active mode. The transition from
s to
by the action
a is established through the probability of
(.) with the cost
:
where
is the consumed energy by the ED at the current state using optimal selected transition parameters.
Policy
describes a sequence of decision rules that associate the system state with the action to be taken. The purpose of this policy is to minimize the long-run average distortion, i.e., the long-run average cost. It is driven by the chosen eligible policy
(that decides on the action a).
The main goal of this expression is to determine and the corresponding optimal policy .
Solution of the MDP: The proposed MDP scheme can be solved via the Value-Iteration Algorithm (VIA), which satisfies the optimal Bellman’s equation. This method is used mainly for infinite-horizon average cost MDPs as in our current study. Generally, VIA defines two parts
J and
Q, that are iteratively updated beginning from an initial assessment
, e.g.,
= 0,
. Notably, the
tth iteration determines:
The long term average cost is expressed as:
where
is the value of state
s and
is the value of taking action
in state
.
The immediate cost
derived in current state s is summed with the expected optimal cost retrieved from the upcoming slot, weighed according to the system dynamics. The span gives the convergence criterion semi-normal operator
characteristic computed for
the semi-normal of the span guarantees that (
59) is a compaction mapping, and thus the algorithm is guaranteed to converge. The iterative algorithm is stopped when
, at a chosen tolerance threshold
. Consequently, the optimal policy
is then determined by computing the optimal action to take in each state
, i.e.,
, where
n is the last iteration of VIA, and has the next key characteristic.
6. Results and Discussions
In this section, we compare the performance of LoRa default ADR with our proposed model. We implemented large-scale LoRaWAN simulation tests using the Matlab tool. The simulation environment imitates the real-world behavior of LoRaWAN taking into account all the elements of the transceiver communication chain described in section III. As a channel medium, we considered the AWGN channel.
Table 1 shows the parameter settings we used in the simulation experiments. We assumed that payload is variable for the general comparison scenario but fixed at PL = 30 Bytes a specific distance for comparison reason between LoRa default ADR and the proposed method. The class A EDs are randomly scattered within the range of 12 km around a GW.
We limit the transmission power to 20 dBm, the noise figure to 10 dBi, and the path loss to 3. The duty cycle is limited to 1%. In LoRaWAN’s essential operation, multiple channels and bandwidths can be employed. However, for simplicity, only 125 kHz comprehensive single-channel communication is tested. All the activities by the processing units are performed with a 4 Mhz processing frequency. For the energy consumption modeling, we assumed that the EDs consume the energy of 0.25 mJ every detection cycle. The currents
,
and
are fixed as described in LoRa sensors datasheet [
61,
62]. The processing and transmission voltages are 2 V and 3.3 V, respectively. Besides, to represent the errors that occurred during transmitting different packet sizes within the AWGN channel medium. The communication chain explained earlier has been explored to tune the appropriate SNR value (i.e.,
) for BER for coded transmissions using Hamming coding scheme. A packet of random stream bits (e.g., 0 and 1) has been transmitted through an AWGN channel and then decoded for each iteration. Exploring the mentioned blocks at the receiver and the results found in our previous work [
32], we assume the SNR versus BER values of each SF at BER =
for simplification of calculation. These values have been used to estimate the consumed energy of each transmission configuration of a given ED in the following sections.
6.1. Energy and Reliability Evaluation of LoRaWAN
In this subsection, we evaluate the energy and the reliability of LoRa default ADR under different scenarios. The evaluation aims to understand the distribution of the energy consumption of the EDs on the network versus the covered distances using different transmission setting. The main goal of this section is to demonstrate that the LoRa standard ADR is not energy efficient under certain scenarios, therefore considering the transmission and processing energy for parameter selection could provide better performances.
Figure 3 shows the required transmission power of an ED using LoRa default ADR for different settings based on CR 4/7 and variable SFs from 7 to 12 when transmitting a payload of 30 bytes from variable distances. As shown, SF 12 requires lower transmission energy to attain the same distance, followed by SF 11, SF 10, SF 9, SF 8, and SF 7. Besides, SF 12 can attain the most significant distance with minimum energy dissipation. This is explained by the significance of CSS modulation to gain power in order to target long-range distances. Furthermore, from
Figure 3, we state that for each specified combination between SF and CR has a threshold distance that can be covered according to the adopted transmission power by the ED.
Figure 4 shows the total consumed energy of an ED that transmits the same payload from distinct distances to the GW using the configurations based on CR 4/7 with variable SFs. The exhibited results confirm that the energy consumption increases with the increase of both the distance and the SFs. Among the SF configurations, SF 7 reveals to consume less energy than the others in short covered distances. Besides, from
Figure 4, it is important to notice that for the same CR 4/7. Before SF 7 reaches its maximum critical distance, which is approximated to 1.2 Km, there is an interval where SF 8 consumes less energy than SF 7. This is noticed for the rest of the configurations. That signifies that if the energy consumption increases, there are some distance intervals where the next SF (i.e., SF 8) is better than the current one (i.e., SF 7). For instance, the curve representing the performance of the setting (SF 10, CR 4/7) was revealed to consume more energy than the following settings (i.e., (SF 11, 4/7) and (SF 12, CR 4/7)) even though it does not yet reach the maximum allocated transmission power
. Therefore, this declines the assumption that the ED should operate with a given setting until reaching the maximum
before switching to the next configuration. The reason is that there is a trade-off between the processing and transmission energy for every single configuration, which approves our assumption about the energy performance in LoRa EDs. Hence, it is essential to notice that each SF configuration ensures energy efficiency on specific distance margins. That means the SF should be used for the distances where it may consume minimum energy to maintain energy efficiency.
Figure 5 shows the total consumed energy of the configuration SF 7 using different CRs of LoRa default ADR. For the same SF 7, using CR 4/5 consumes more energy than CR 4/6, followed by CR 4/7 and CR 4/8. Moreover, the maximum distance that can be reached by CR 4/5 is shorter than the one reached by CR 4/6, CR 4/7, and CR 4/8, respectively. Therefore, CR 4/8 presents an advantage as it extends the covered distance with less energy consumption. That is justified by the BER gain performance of lower CR, which is better as it benefits from extra redundancy bits. Besides, according to the covered distance, the energy-efficient coding rate can be used to lower the ED energy consumption. In terms of energy-saving, the lower CR (i.e., CR 4/5) shows better performances toward time-on-air (TAO) since it is the fastest option. However, Hamming’s coding scheme, with its various CRs, has been selected to be used in the LoRa standard due to its lightweight coding, decoding, and parity check redundancies, which do not impact the performance intensively toward time-on-air. Accordingly, from both
Figure 4 and
Figure 5, it is inferred that both coding and modulation gains affect the energy consumption of LoRa EDs. Therefore, adopting the better setting configuration between SFs and CRs is of paramount importance.
The difference in the consumed energy for transmission and processing trade-offs can be derived respectively from
Figure 6,
Figure 7 and
Figure 8. As shown, the smaller SF consumes more energy for transmissions
operations and less energy for processing
, whereas the higher CR (i.e., CR 4/5) consumes less energy for transmitting the same payload of 30 Bytes using SF 7. More precisely,
Figure 6 shows that SF 7 consumes more energy for transmission covering the distances inferior to 1.1 Km, and SF 8 consumes more energy than SF 9, SF 10, SF 11 and SF 12 when covering the distances between 1.1 Km and 1.8 Km. According to
Figure 7 the approximated consumed energies for processing processes
are 1.78
J/bit, 0.97
J/bit, 0.57
J/bit, 0.31
J/bit, 0.18
J/bit and 0.11
J/bit for SF 12, SF 11, SF 10, SF 9, SF 8 and SF 7 respectively when using same CR 4/7. Besides,
Figure 8 shows 0.16
J/bit, 0.14
J/bit, 0.12
J/bit and 0.09
J/bit for the coding rates 4/8, 4/7, 4/6 and 4/5, respectively when using same SF 7.
Accordingly, the small SF consumes less energy in short distances than higher SFs. For this reason, the default LoRa mechanism configures the setting beginning from the smallest SF (i.e., SF 7) until reaching the highest available
to access the maximum distance. Then the system switches to the immediate next SF ( i.e., SF 8) until the maximum SF 12. Nevertheless, this strategy is not always appropriate. As previously shown by
Figure 4, it is revealed that there are distance ranges where the next SF (i.e., SF 8) configuration is better than the current SF (i.e., SF 7) in terms of energy consumption and reliability considerations. More specifically, it is not obvious to wait until achieving the maximum allowable
to switch to the next setting; this applies to both SF and CR parameters allocation. For this reason, the proposed scheme aimed to address this gap to assign accurately the transmission parameters configuration for LoRa EDs.
Figure 9 shows the transmission parameter’s energy classification for the standard LoRa/LoRaWAN scheme in function of distances. As illustrated, each configuration of SF and CR can guarantee an energy-efficient transmission in a specific range area defined by critical distances. The covered distance by a given parameter is controlled by the
threshold. For example, when transmitting a PL of 30 Bytes using CR 4/8 from the distances 1 m
m; SF 7 appears to be the most efficient setting among others. whereas, SF 8, SF 9, SF 10, SF 11 and SF 12 show better performance respectively in 1441 m
m, 2128 m
m, 3490 m
m, 4893 m
m, and 7042 m ≤ d ≤ 11,360 m. Noting that these threshold distances may change by changing the coding rate or the payload length. Furthermore, the configuration assigned to cover the ranges should differ if the path loss exponent
differs.
Figure 10 illustrates the energy efficiency performance of LoRa default ADR using different SFs versus the covered distances. It is observed that the energy efficiency varies for different SFs and declines regardless the covered range. SF 7 reveals to be more efficient for short distances than others. Besides, each parameter setting shows its effectiveness within a specific range. However, the ranges classification associated to each SF shown in
Figure 9 for LoRa default ADR could be updated if the energy efficiency performance for each tuning is considered. The most considerable configuration should prove the highest energy efficiency performance. Thus, if the energy efficiency of each setting is considered, the setting that would be used to cover variable ranges are respectively; (SF 7, CR 4/7) for the EDs situated at ranges below 855 m, (SF 8, CR 4/8), (SF 9, CR 4/8), (SF 10, CR 4/8), (SF 11, CR 4/8) and (SF 12, CR 4/8) for ranges 856 m
m, 1231 m
m, 2457 m
m, 3006 m
m and 3724 m ≤ d ≤ 11,360 m respectively.
In short, the difference in energy efficiency explains why several distances are considered thresholds at which specific parameters cannot succeed in communication. Therefore, the ED would determine the parameter autonomously to be considered at a defined distance to make a reliable transmission. Bearing this in mind, in other cases, the transmission can be successfully maintained using different options, even though the energy efficiency of any transmission would be taken into account to ensure a high level of energy management satisfactory. To this end, the critical distance has the potential to increase the reliability of the overall communication setup and can also lead to conscious energy resource management.
As exhibited by
Figure 10, it is impossible to ED to succeed in transmission from it is position using the transmission settings (SF 7, CR 4/8), and (SF 8, CR 4/8). Nevertheless, the ED can reach the required distance by relying on four possible configurations based on SF 9, SF 10, SF 11, and SF 12 for the same CR = 4/8. However, the setting offering a considerable energy efficiency requirement is the most recommended. According to classical LoRa functioning, the ED would use the possibility (SF 9, CR 4/8) since the position of the ED is included in the covered ranges by this setting and the
did not yet reach its threshold, which is associated with the maximum distance 3.4 km. This is explained by the fact that in the classical LoRa ADR, the system does not switch to the next SF or CR until the outflow capacity of the actual parameter exceeds the maximum
threshold (i.e., the critical distance
). However, according to
Figure 11 and
Figure 12, this configuration is not the most efficient when considering the energy efficiency and the total consumed energy of the possible setting that can succeed in the transmission of the ED.
6.2. Performance Evaluation of the Proposed Scheme versus LoRa Default ADR
In this section, we investigate the MDP based approach’s performance against the LoRa standard ADR for the same scenario conditions. For first scenario, we pick a random ED from the network that is situated at a distance of d = 3 Km from the GW. The network is supposed to cover an urban area. The concerned ED can operate dynamically with maximum transmission power up to +20 dBm and is instructed to handle the transmission parameters to convey payloads with different payload sizes. The comparison relies on the gains in transmission reliability and the energy consumption layouts. Initially, we study all the possible transmission parameters that can carry the transmission from the required distance. For this reason, we plot the curves of different possible combinations in the following figures to assess their performance in terms of energy consumption. Then, we compare the performance of the parameter assigned by LoRa default ADR versus the proposed scheme.
Figure 13 shows the difference of energy residual distribution of the ED situated at 4 km from the GW using MDP-based method and default LoRa ADR. From this figure we conclude that our proposed model consumes less energy for the same scenario, as it helps the ED to carry on more transmission before it dies. MDP-based carry out 540,256 transmissions, 55,489 more than LoRa ADR. This is explained by the fact that our model adopts the parameter selection according to the channel condition taking into account both the transmission and processing energy of each possible setting before its selection.
To emphasize the results, we have simulated our model against LoRa default ADR under different scenarios for transmitting the payload size from distinct locations on the network.
Figure 14 shows the results of the total succeeded transmission from 5 km, 1 km, 2 km, and 3 km, respectively, of the proposed model against LoRa ADR. As shown in
Figure 14, the proposed model outperforms the standard LoRa ADR mechanism, leading the ED to carry out more transmissions before dying. For instance, from the distance of 1 km, the ED that adopts default LoRa ADR 867,565 maximum transmissions, which is less than 135,826, is achieved by our proposed model. Concerning the ED situated at 2 km, it achieved 540,256 transmissions with 55,489 more than LoRa defaults ADR. As noticed, the number of total transmissions that the ED can realize decreases with increasing the distance, which signifies that the ED that is situated far from the GW is expected to die before the nearest ones. Additionally, the energy consumption increases as the payload size increases.
Figure 15 shows the average energy cost distribution by the 100 first transmission rounds using MDP model. The total consumed energy
differs from one round to another due to the random channel conditions. Our proposed model adopts the transmission parameters according to the channel medium. Therefore, the average cost changes from a round to another due to the randomness of the channel medium. Besides, the cost increases with increasing the payload size. The larger the payload size, the more energy the ED is expected to consume, therefore, it will last for less time.
Figure 16 presents the average long-term cost against the distance variation for transmitting 30 Bytes payload for different channel states
H. For channel states that have been selected for the study;
= 2.5, 3, 3.5 or 4. From the figure, we conclude that the MDP average cost increases with the transmission distance and the path loss exponent representing the channel condition, including the shadowing. Our model for each distance chooses the set of parameter selections that consumes minimum energy. For each channel state, our model succeeds in choosing the better policies that reside on choosing the adequate SF and CR for a given transmission, whatever the position of the ED on the network.
The total number of transmissions that an ED can undergo per day in public LoRa networks is limited due to the region and state restrictions. The DC obeys the ISM frequency band; thus, the maximum duty cycle allowed is . After completing a given transmission, the ED must remain silent for of the total time taken. More precisely, the ED forwards a packet within a time interval and then waits for a given time as instructed by the DC duration. Besides, to predict the lifespan and the total number of transmissions that can be held by an ED equipped with different battery source capacities (500 mAh, 2600 mAh, and 3500 mAh) that transmit every DC, the same payload packet of 30 Bytes using the same settings. We apply the experience scenarios of different battery capacities to the identical previous ED. Then we compare its lifespan when adopting the proposed method versus the default LoRa based ADR.
Figure 17 shows the performance of the studied ED relying on our method as well as on the LoRa defined scheme assuming a DC
. The ED’s lifespan depends on the used batteries’ capacity for both methods. In these scenarios, adopting the configuration recommended by our proposed method, the ED lasts for more time than using LoRa default ADR. The ED can last for approximately 435 days, 1850 days, and 2771 days using a battery capacity of 500 mAh, 2600 mAh, and 3500 mAh, respectively. Meanwhile, it may last less time by adopting LoRa ADR for the same battery capacities; 202 days, 1052 days, and 1417 days. As a result, the proposed scheme is expected to increase the times more than the LoRa standard ADR. Accordingly, the lifespan of the ED may last for more when transmitting payloads of size smaller than PL = 30 Bytes, and it may be decreased by increasing the length of the transmitted payload.
7. Conclusions
Several works are interested in using the technology without deeply launching its functional mechanisms. Likewise, these networks have become denser with the increased number of connected devices on the network. Therefore, evaluating the overall network performance, such as by measuring the lifespan, tracking the energy consumption, and evaluating its reliability and scalability, becomes more demanding. This paper highlights the IoT paradigm’s energy efficiency and reliability performance of LoRa EDs. Firstly, it provides comprehensive knowledge about the functioning of LoRa transceiver operations, focusing on the CSS modulation and the channel encoding schemes. Secondly, it provides a thorough mathematical model devoted to assessing the energy consumption in LoRa EDs. The model concentrates more on communication and processing energy, which has not been considered in most previous works. Accordingly, this model could assist in forecasting the LoRa networks’ lifespan in general or anticipating the lifespan of a single ED on the network regarding its distance from the GW before the real implementation of the network. Thirdly, it presents an MDP-based energy-efficient adaptive scheme that serves to tune LoRa physical transmission parameters. More precisely, it permits LoRa EDs to tune their radio transmission parameters, ensuring energy efficiency and the reliability of packet delivery. The scheme compares and evaluates the processing and transmission energy trade-off of each possible setting of any selection. The process aims to assign an accurate set of parameters regarding the BW, CRs, SF, transmission power, payload size, and the position of the loRa EDs. This approach has been evaluated and compared with LoRa default ADR. The obtained results through simulations have shown that the proposed method provides a better performance than LoRa default ADR in energy consumption in the studied scenarios, which leads to an increase of the LoRa end-nodes lifespan. Additionally, the presented energy model accurately anticipates the node’s lifespan for different transmission scenarios regarding the payloads’ size and duty cycle periods. In future works, we aim to adapt our proposed scheme to address the energy efficiency and reliability for dynamic EDs where the adaptive physical layer parameter management is complex and challenging. Moreover, the future research will deal with multi-objective optimization in mobile edge computing. We plan to design architecture based on Mobile Edge Computing between the Gateways and the connected objects. All the processing charges of the IoT devices, whatever the nature (Objects, Drones, Vehicles, Robots, and more), will be sent to the Edge Server, in which a multi-objective optimization will be run to select the transmission and processing parameters of the whole network, then forward the optimal decisions via a downlink transmission. We believe this approach will provide more energy and delay the performance of the IoT networks.