5.1. General Description
We design a mathematical model of data transmission in a LoRaWAN network by extending our ideas published in [
5].
Similarly to [
5], we distinguish between the initial transmission attempts and the retransmissions and find the probabilities of successful transmission attempts for them separately. However, we extend the model from [
5], taking into account possible transmission failures caused by random noise rather than by collisions only. Such extension slightly modifies formulas for the initial transmission attempt derived in
Section 5.2. At the same time, the model extension significantly changes the formulas describing retransmissions, see
Section 5.3. The probabilities of successful initial transmission and retransmission are found under the assumption that the rate of the transmission attempts is low enough to avoid the avalanche effect described in [
4]. The accuracy bound of the model is studied in detail in
Section 5.4. A corollary of this assumption is that we can calculate the probability of successful ACK transmission in a way different from [
5]. This way allows analyzing data transmission at each MCS separately, ignoring that the flow of the second ACKs depends on successful transmissions at other MCSs and in other channels.
Another assumption made is that signals transmitted at different MCSs are orthogonal to each other. This assumption results from the small radius
R of the network, since, as shown in [
16], the impact of inter-SF interference is very low at a small distance between devices. At the same time, as shown in [
17], the impact of inter-SF interference becomes considerable only at the high network load, but at the high network load, the above-mentioned avalanche effect becomes much more important from the collision point of view.
Whether both colliding frames are damaged depends on their signal strength. To compute the probability that a frame can survive in a collision, we need to know the locations of the motes around the GW. In contrast to [
5], we consider a case when the motes are close enough to the GW and address this issue in
Section 5.5.
In
Section 5.6, given probabilities of successful initial transmission and retransmissions, we find PER, similarly to [
5]. Finally, we design original methods to find PLR and delay distribution in
Section 5.7 and
Section 5.8, respectively.
5.2. Initial Transmission Attempt
Let us consider a mote that uses MCS
i for transmission. Its initial transmission of a data frame is successful if the GW receives the frame and the mote receives at least one of the ACKs from the GW. The initial transmission attempt at MCS
i is successful with probability
where
is the probability that the GW receives the data frame, and
is the conditional probability that the mote receives at least one ACK provided that the GW receives the data frame.
Let and be the durations of the data frame and the ACK at MCS i, respectively.
Since the transmissions at different MCSs are orthogonal, we can consider transmissions in different main channels and at different MCSs independently. Let us denote the distribution of MCSs among the motes as and the traffic intensity which corresponds to one main channel and this MCS as , where is the total network load.
We find as follows.
Let data frame transmission start at time 0. The transmission does not suffer from collisions in two cases.
No collision. The first one happens when the data frame collides with neither a frame sent by another mote nor the ACK sent by the GW. If no collision occurs, the transmission is not damaged by noise with probability .
Collisions with data frames do not occur if no frame starts in the interval . The probability of this event is since the flow of the new frames is Poisson with intensity .
Collisions with ACKs do not happen if no ACK starts in the interval , since the GW cancels a pending ACK transmission if the GW is receiving a data frame at the same MCS, at the same channel, and at the same time instant when the GW needs to start the ACK. The probability of such an event is since the flow of ACKs is also Poisson but has an intensity because ACKs are transmitted only for successful data frames.
Collisions. The second case happens when the data frame intersects with frames from some other motes but has a power high enough to be decoded by the GW. In this case, if the frame collides with
k other frames, the transmission is successful with some probability
which is derived in
Section 5.5.
Since the new frames are generated according to the Poisson flow, the probability of k motes generating their frames in the interval equals .
Summing up, we obtain
where
is the total number of motes.
When the GW receives a data frame, it sends two ACKs. The probability that the mote receives at least one sent ACK is calculated as follows:
where
and
are the probabilities of the first and the second ACKs being successful if the corresponding data frame is sent at MCS
i.
The probability is found similarly to .
We denote the ACK transmission start time as 0 and consider two cases.
No collisions The ACK does not collide with any data frames if no data frames are generated within after the ACK starts.
Apart from that, to avoid collisions, no motes shall start data transmission before the ACK. However, if , the data transmission starts during the interval and corrupts the data frame acknowledged by the considered ACK. It means that the ACK shall not be sent at all and we need to exclude the interval .
Thus, we obtain that in this case, the other motes shall not generate data frames within the interval .
The mote can also successfully receive the ACK if some data frames are generated in the interval , but the ACK has sufficient power to overcome the noise and the interference.
Let
be the probability of total interfering signal from
k motes and noise (in dBm) having less power than the ACK plus co-channel rejection
. Unlike [
5], we also consider the probability that without collisions a mote correctly receives the signal with probability
.
Since the GW transmits the second ACK in a separate channel, the ACK cannot collide with any data frames. However, the GW can discard the ACK because of the transmission of an ACK to another data frame delivered at any other MCS or on any other channel. Thus, to be successful, the ACK shall not start in the interval
relative to the beginning of another ACK. In this paper, when calculating
, we used the assumption made in
Section 5.1, and natural assumption that
q is small. These assumptions allow us to consider that the probability of another data frame delivery being successful is close to 1, in contrast to [
5]. Although such an assumption slightly limits the area of applicability of the model, it allows us to calculate
for MCS
i independently from the distribution of the motes per MCSs:
where we also consider the probability
of the ACK not being damaged by the noise.
5.3. Retransmissions
Let a mote transmit a data frame but receive no ACK. This case may be caused by the unsuccessful data frame or ACK transmissions, or by an ACK discarded because of another incoming transmission. In this case, the mote retransmits the data frame. For that, the mote randomly selects a channel and waits for a random time from 1 to seconds. Then it sends the data frame again.
In our analysis, we consider only the retransmissions that are due to the noise or a collision of two frames. In other words, we neglect the collisions of more than two frames. Thus we can find the probability of successful retransmission, but at the same time does not induce a significant error in our estimation of
,
, and the delay distribution, as shown in
Section 6. Unlike [
5], we take into account that even without collisions, the retransmission can be unsuccessful because of the random noise in the channel, which complicates the formulae.
We study four cases why retransmission may occur: (i) no collision, i.e., the retransmission is caused just by noise, (ii) collision: one of the frames is received because of stronger power, (iii) collision: although the stronger frame could be received but for the noise, it is lost, (iv) collision: both frames have insufficient power to be received.
In the first case, the retransmission is caused by random noise. Let
be the probability that either data frame or both ACKs are damaged by noise. It is a complement to the case when the data frame and at least one ACK are not damaged by noise. The GW receives the data frame with a probability of
. The mote receives at least one ACK with the probability
since the transmissions of the two ACKs are independent. Thus, we obtain
Collisions and noise are independent. Since the first transmission attempt is successful if both the noise and collisions do not occur, the probability of successful transmission is the product of the probability of the absence of collisions and the probability of the absence of the noise . Thus, we can find the probability of the absence of collisions as , and probability that the retransmission is due to noise only equals .
The second case corresponds to a collision when one frame is received since its power is much higher than the power of another frame: , and the random noise does not damage the first frame. As a result of such a collision, the first mote successfully delivers its frame, and the second one makes retransmission.
Let
be the probability of such a power relation between two motes. Then the probability of such a case is the product of the probabilities of the following events: (i) a collision occur with the probability
, (ii)
, which happens with probability
determined in
Section 5.5, (iii) no noise damages the transmission of the first mote with probability
. Summing up, we obtain that the probability of such a case equals
The third case is similar to the second one, with the only difference that the first frame is damaged by noise. It means that in the last multiplier in (7) we need to replace with . Thus we obtain that the probability of the third case is .
The fourth case stands for a situation, when the difference in signal strength of both frames is less than
:
. So none of the frames can survive in a collision. Such a relation between signal strengths happens with probability
determined in
Section 5.5. So the probability of the fourth case is
.
In the last two cases, both frames are transmitted again, and there is a high probability of a repeated collision since the retransmissions are made within a rather short delay, comparing with the data frame duration (
vs.
). Let us find this probability similarly to [
5].
Let the frames sent by motes A and B begin at time 0 and
x, respectively (see
Figure 3). The collision does not occur if the motes retransmit on different channels. Otherwise, with probability
, the motes choose the same channel. In this case, let the retransmitted frames by motes A and B begin at times
y and
z, respectively. The distribution of
y is uniform from
to
, where
is the duration of the frame and the ACK timeout. The distribution of
z is also uniform from
to
. A new collision happens during the retransmission if the frames intersect with each other or with the ACK. Let us define the indicator of such an event
:
where
is one, if the event
X occurs, and 0, otherwise. Notably, four events of (
8) do not overlap.
We use it to find the probability of a new collision:
In the numerator, the outer integral includes all the possible intervals between frames by motes A and B that lead to collision, while the inner integrals contain all the possible retransmission times for the motes. In the denominator, we have the collision probability which is needed to obtain the conditional probability of a new collision, given that the previous collision happened.
Taking into account all the cases above, we obtain the resulting probability of successful delivery of data frame during a retransmission attempt as the fraction of the probability that retransmission occurs and the data frame is delivered, and the probability that retransmission occurs.
A retransmission occurs with the total probability of four cases:
In the first two cases, the probability of the delivery of the data frame is the same as for the first transmission attempt, namely . In the third and fourth cases it equals since the collision between the two colliding frames may repeat. If it does not repeat, the frames can be damaged by other transmissions or the random noise, similarly to the first transmission attempt.
The probability of successful retransmission
is obtained according to (
1), where
is replaced with
.
5.5. Specific Case
The formulae in
Section 5.2 and
Section 5.3 are written in a very general way and depend on the values
. To define them, we have to consider a specific scenario, i.e., the deployment of motes around the GW and the channel model.
For simplicity, we consider a channel with a log-distance path-loss and with a constant probability
q of the signal to be damaged by random noise. For such a case, if the power of the transmitted signal equals
dBm, the power of the received signal equals
where
is base 10 logarithm of
x and
d is the distance between the transmitter and the receiver. We consider the well-studied Okumura-Hata model [
23] since it accurately describes the propagation of signals for the range of 100–1500 MHz in exterior environments, and it is not much different from the empiric channel models developed especially for LoRa links, e.g., [
24]. For the Okumura–Hata model, the constants are defined as follows
and
where,
and
are the heights of the GW and mote’s antennas, respectively.
Let the motes be spread uniformly within a circle with radius R, and the GW be located in the center of this circle. In this case, the pdf of the distance between the mote and the GW equals .
Let us consider the intersecting transmission of two motes, mote 0 and mote 1. Transmission of mote 0 is successful if it is not damaged by the random noise and the power of the mote 0 signal exceeds the power of the mote 1 signal at the GW by at least
dB:
where the outer integral is taken over the possible coordinate
of mote 0, and the inner integral is taken over such a set of mote 1 coordinates
that the power condition holds. This set is illustrated in
Figure 4a and is defined as
The probability of the motes transmitting with such a power that none of the signals exceeds the interfering one by
dB equals
In this case, the set
is defined as
Then we find the probability of only one mote’s transmission to be successful:
Now we consider an ACK transmission which is interfered by the Mote 1 transmission. The GW’s signal at Mote 0 exceeds the interfering signal by at least
dB and is received regardless of the noise with the probability:
where the outer integral is taken over the possible distance
from mote 0 to the GW, and the inner integrals are taken over such distance
and angle
(see
Figure 4b) that the power condition holds. This location is defined as
We also consider that a device cannot receive a frame if the number of interfering devices is more than two, so the probabilities equal zero for . Such an assumption significantly simplifies the model but does not induce significant errors to the numerical results.
5.7. Packet Loss Ratio
Let a mote which uses MCS i generate a frame and start its transmission. The initial transmission attempt is successful with probability . Otherwise, with probability the transmission attempt is unsuccessful and the mote retransmits.
The frame is discarded if another frame is generated during the transmission attempt or during the waiting of the random time for retransmission. If we denote the time of the initial transmission start as 0 and the time of the retransmission start as
x, then the retransmission happens if the next frame is generated after
x. Taking into account the uniform distribution of
x and exponential distribution of the frame arrival time, we find the probability of the frame not being discarded before the retransmission:
where
and
are the data and ACK durations at MCS
i.
If the frame is not discarded until the random waiting time, the mote makes a retransmission which is successful with probability . Otherwise, with the probability the same situation repeats: the mote waits a random time and either generates a new frame or makes another retransmission. The probability of no new frame being generated before the next retransmission still equals since the new frames arrive according to the Poisson flow. Assuming that the probability of success during retransmission does not change with the number of the retransmission, we find the probability of mote making a successful transmission at the r-th retransmission as .
Finally, we denote the probability of the mote using MCS
i as
and find the PLR by substracting from 1 the probability of a successful transmission after any possible number of transmission attempts:
5.8. Distribution of the Packet Delivery Time
To find the distribution of the packet delivery time, let us find the delay induced by every transmission attempt, starting with the first one. When a frame arrives at a mote, there are two options. If the mote is not transmitting a frame or waiting for an ACK, it transmits the frame at once. Otherwise, the frame has to wait until the currently processed frame is transmitted. Let
be the handshake duration at MCS
i:
So if the last transmission attempt of the previous frame started at time 0 and the new frame arrives at time
t, the delay is
if
, i.e., the delay is just the time needed to transmit the frame. If
, then the delay is
. Considering that the frames arrive according to the Poisson process, we can write the following distribution of delay for the first transmission attempt:
With the corresponding pdf:
Since the retransmissions happen after one second plus a uniformly distributed backoff time, the distribution of the delay induced by a single retransmission equals
and has the following pdf:
Using these distributions we can find the distribution of time needed to deliver a packet, while making
r retransmissions:
which is a convolution of distribution of time, needed to make previous
retransmissions (0 being the first transmission attempt), and the pdf of delay induced by one more retransmission. The starting point for this recurrent formula is the distribution
defined in (
28).
To find the total delivery time distribution, we sum over all possible MCSs and over all possible numbers of retransmissions, multiplying by the probability of a mote using the considered MCS and the frame being successfully transmitted after
r retransmissions:
We can use the pdf (
29) to find the average delay induced by the first transmission attempt:
while for a retransmission, the induced delay is obviously
since it is a uniform distribution.
The average delivery time after
r retransmissions is the average delay for one retransmission repeated
r times. Summing up and averaging over possible MCSs we obtain the total average delay: