The formalization of the above-described RA procedure according to [19] is given by the absorbing discrete-time Markov’ chain \( \left\{ {\xi_{i} , \, i = 0, \ldots ,\left( {N + 1} \right)\left( {M + 1} \right) + 1} \right\} \) with the finite state space
$$ {\mathbf{X}} = \left\{ {\left( {n,m,k} \right), \, n = 0, \ldots ,N, \, m = 0, \ldots ,M, \, k = 0, \ldots ,n} \right\} \cup \left\{ {\omega ,\upsilon } \right\}, $$
initial state \( \left( {0,0,0} \right) \), and two absorbing states \( \omega \) and \( \upsilon \). The initial state \( \left( {0,0,0} \right) \) represents the beginning of the procedure followed by the first RA attempt, the absorbing state \( \omega \) stands for the access success, and the absorbing state \( \upsilon \) stands for the access failure. Other states denoted by \( \left( {n,m,k} \right) \), where n is the number of Msg 1 (preamble) retransmissions, m is the number of Msg 3 retransmissions after the last successful Msg 1 transmission, and k stands for the number of successful Msg 1 transmissions followed by M + 1 Msg 3 transmissions after each Msg 1 transmission. Figure 3 represents one of possible paths from state \( \left( {0,0,0} \right) \) to state \( \left( {n,m,k} \right) \) for successful access.
Note, that the access delay for RA procedure is defined as the time interval from the instant when a UE sends its first random access preamble until the UE receives the random access response [7]. In the paper, we focus on the average value D of the access delay. To calculate it we consider all possible scenarios of the RA procedure, i.e. different number of Msg 1 and Msg 3 retransmissions for different combinations of messages’ sequences that influence on the overall access delay. For example, in the case of the successful access without any collision the sequence is \( {\text{Msg}}1 \to {\text{Msg}}2 \to {\text{Msg}}3 \to {\text{Msg}}4 \). For the successful access with two retransmissions of message Msg1 and without Msg3 retransmissions the sequence looks like \( {\text{Msg}}1 \to {\text{Msg}}1 \to {\text{Msg}}1 \to {\text{Msg}}2 \to {\text{Msg}}3 \to {\text{Msg}}4 \).
Note that we do not distinguish between two paths having the same delay between the first RA attempt and the same intermediate state \( \left( {n,m,k} \right) \), if the paths differ only Msg 1/Msg 3 positions. For example, the following message sequences (Msg 2 and Msg 4 are omitted) have the equal delays:
$$ {\text{Msg}}1 \to {\text{Msg}}1 \to {\text{Msg}}3 \to \ldots \to {\text{Msg}}3 \to {\text{Msg}}1 \to {\text{Msg}}3 $$
and
$$ {\text{Msg}}1 \to {\text{Msg}}3 \to \ldots \to {\text{Msg}}3 \to {\text{Msg}}1 \to {\text{Msg}}1 \to {\text{Msg}}3. $$
Under these assumptions, the probability \( P\left( {n,m,k} \right) \) of Markov chain \( \left\{ {\xi_{i} } \right\} \) visiting state \( \left( {n,m,k} \right) \) when starting from state \( \left( {0,0,0} \right) \) is determined by the formula
$$ P\left( {n,m,k} \right) = p^{n - k} C_{n}^{k} \left( {\left( {1 - p} \right)g^{M + 1} } \right)^{k} \left( {1 - p} \right)g^{m} ,\;\left( {n,m,k} \right) \in {\mathbf{X}}. $$
(1)
The first multiplier \( p^{n - k} \) stands for \( n - k \) Msg 1 collisions, the multiplier \( \left( {\left( {1 - p} \right)g^{M + 1} } \right)^{k} \) stands for \( k \) successful Msg 1 transmissions each followed by \( M + 1 \) Msg 3 transmissions, the multiplier \( \left( {1 - p} \right)g^{m} \) stands for a unique successful Msg 1 transmission followed by \( m \) Msg 3 retransmissions, and the binomial coefficient \( C_{n}^{k} \) reflects the number of \( k \) combinations (successful Msg 1 transmissions) of an \( n \) set (Msg 1 retransmissions).
The probabilities of being absorbed in the states \( \omega \) and \( \upsilon \) when starting from state \( \left( {0,0,0} \right) \) are
$$ P\left( \omega \right) = \sum\limits_{{\left( {n,m,k} \right) \in {\mathbf{X}}}} {P\left( {n,m,k} \right) \cdot \left( {1 - g} \right)} = 1 - \left( {p + \left( {1 - p} \right)g^{M + 1} } \right)^{N + 1} , $$
(2)
$$ P\left( \upsilon \right) = 1 - P\left( \omega \right) = \left( {p + \left( {1 - p} \right)g^{M + 1} } \right)^{N + 1} . $$
(3)
Note, that these probabilities for the RA procedure stand for the access success probability \( P\left( \omega \right) \) and for the access failure probability \( P\left( \upsilon \right) \).
For successful random access procedure we denote \( Q\left( {n,m,k} \right) \) the probability that the RA procedure will be completed right after state \( \left( {n,m,k} \right) \), i.e. there will not be any further Msg1/Msg3 collisions. Let \( D\left( {n,m,k} \right) \) be the corresponding access delay under the condition that random access procedure is successful.
The access delay \( D\left( {n,m,k} \right) \) can be calculated as follows
$$ \begin{aligned} & D\left( {n,m,k} \right) = \left( {n - k} \right)\left( {\Delta_{1} + \Delta_{2} } \right) + k\left( {\Delta_{1} + \Delta_{3} + M\Delta_{4} } \right) + \Delta_{1} + \Delta_{3} + \left( {m + 1} \right)\Delta_{4} \\ & = \left( {\Delta_{1} + \Delta_{2} } \right) \cdot n + \Delta_{4} \cdot m + \left( {\Delta_{3} + M\Delta_{4} - \Delta_{2} } \right) \cdot k + \Delta_{1} + \Delta_{3} + \Delta_{4} . \\ \end{aligned} $$
(4)
Form the definition of probability \( Q\left( {n,m,k} \right) \) we get the formula
$$ \begin{aligned} & Q\left( {n,m,k} \right) \\ & = {\rm P}\left\{ {{\text{no Msg1/Msg3 collisions after state }}\left( {n,m,k} \right)\; |\;{\text{successful access}}} \right\} \\ & = \frac{{{\rm P}\left\{ {{\text{no Msg1/Msg3 collisions after state }}\left( {n,m,k} \right),\;\;{\text{successful access}}} \right\}}}{{{\rm P}\left\{ {\text{successful access}} \right\}}} \\ & = \frac{{{\rm P}\left\{ {{\text{no Msg1/Msg3 collisions after state }}\left( {n,m,k} \right)} \right\}}}{{{\rm P}\left\{ {\text{successful access}} \right\}}} = \frac{{P\left( {n,m,k} \right) \cdot \left( {1 - g} \right)}}{P\left( \omega \right)}. \\ \end{aligned} $$
(5)
Now, taking into account that the average RA delay, which is calculated only for successfully accessed MTC devices, is determined by the formula
$$ D = \sum\limits_{{\left( {n,m,k} \right) \in \mathcal{X}}} {Q\left( {n,m,k} \right)D\left( {n,m,k} \right)} , $$
(6)
and taking into account (1)–(5), we finally obtain the formula to calculate the average access delay in closed form
$$ \begin{aligned} & D = \left( {\Delta_{1} + \Delta_{2} } \right) \cdot \frac{C}{{\left( {1 - p} \right)\left( {1 - g^{M + 1} } \right)}}\left( {1 - \left( {N + 1} \right)C^{N} + NC^{N + 1} } \right) \\ & + {\kern 1pt} \Delta_{4} \cdot \frac{{1 - \left( {M + 1} \right)g^{M} + Mg^{M + 1} }}{1 - g}\frac{{g\left( {1 - C^{N + 1} } \right)}}{{1 - g^{M + 1} }} \\ & + {\kern 1pt} \left( {\Delta_{3} + M\Delta_{4} - \Delta_{2} } \right) \cdot \frac{{g^{M + 1} }}{{1 - g^{M + 1} }}\left( {1 - \left( {N + 1} \right)C^{N} + NC^{N + 1} } \right) \\ & + {\kern 1pt} \left( {\Delta_{1} + \Delta_{3} + \Delta_{4} } \right) \cdot \left( {1 - C^{N + 1} } \right), \\ \end{aligned} $$
(7)
where \( C = p + g^{M + 1} \left( {1 - p} \right) \).
The numerical example in the next section illustrates the application of the formulas obtained for calculation the access success probability and the average access delay with given collision probability.