5. Packet service time and end-to-end delay

The average delay for successful transmission is defined as the time interval between a packet arrival and the reception of corresponded ACK. It features the waiting time in queue and the service time in the transmission block. In previous works [16, 33], however, the queue delay is overlooked, and the average delay was defined as the time interval from the instant that packet is at the head of its MAC queue until receiving the corresponding ACK. In industrial applications, especially in power grid, delay plays a vitally important role. A delayed command or notification may give rise to chain errors, thereby calculating the precise amount of delay that appears essential.

As mentioned in previous parts, in the transmission process, two consecutive successful CCAs mean that the node is allowed to send its packet. If the node finds the channel busy in each of CCAs, it tries the next backoff stage. This proceeds until m reaches macMaxBE. The service time varies if a node finds the channel busy in each CCA. Attempting to seize the channel for various times is responsible for the different combinations of service time. Let Cαβ (i) be the set comprising all the

A Reliable Communication Model Based on IEEE802.15.4 for WSANs in Smart Grids DOI: http://dx.doi.org/10.5772/intechopen.84288

combination of choosing i element out of a set of busy channel probability Sαβ = {α, β (1-α)}. Normalized average service time is as follows:

$$\overline{T}\_{\text{CCA},i} = \frac{\sum\_{k=1}^{2^{\circ}} \mathcal{C}\_{\text{S}\_{a\theta}}^{k}(i) \left( \mathcal{N}\_{a}^{k}(i) + 2\mathcal{N}\_{\beta(1-a)}^{k}(i) \right)}{\sum\_{k=1}^{2^{\circ}} \mathcal{C}\_{\text{S}\_{a\theta}}^{k}(i)} \tag{46}$$

where C<sup>k</sup> <sup>S</sup>αβ ð Þ<sup>i</sup> returns the kth combination out of a set of <sup>S</sup>αβ in <sup>i</sup> th backoff attempt. In addition, N<sup>k</sup> <sup>α</sup>ð Þ<sup>i</sup> and <sup>N</sup><sup>k</sup> <sup>β</sup>ð Þ <sup>1</sup>�<sup>α</sup> ð Þ<sup>i</sup> represent the number of the first and second element of set of Sαβ in kth combination, respectively. The delay in backoff stages is presented in (47) (note that the midpoint of the uniform distribution indicates the average value):

$$T\_{backff,i} = \frac{\sum\_{k=1}^{2^i} C\_{S\_{a\rho}}^k(i) \times (W\_i - 1)}{2\sum\_{k=1}^{2^n} C\_{S\_{a\rho}}^k(i)}\tag{47}$$

The average time for success and failure transmissions can be calculated according to (46) and (47). The success occurs after j failures (due to NO\_ACK):

$$\left[\overline{T}\_{\text{success},j} = L\_t + 2 + j(L\_t + 2) + (j+1)\left[\sum\_{i=0}^m \left(\overline{T}\_{backgf}, i + \overline{T}\_{CCA,i}\right)\right] \tag{48}$$

The average time for failures due to limitation of backoff attempt is

$$\begin{aligned} \overline{T}\_{\text{Failure}, \text{CCA}} &= j(\mathbf{L}\_c + \mathbf{2}) + j \left[ \sum\_{i=0}^m \left( \overline{T}\_{backoff}, i + \overline{T}\_{\text{CCA},i} \right) \right] \\ &+ \overline{T}\_{backoff, m+1} + \overline{T}\_{\text{CCA}, m+1} \end{aligned} \tag{49}$$

The average time for failures due to the retransmission limit is

$$\overline{T}\_{\text{Failure},NO\_{-}ACK} = (n+1)\left[L\_c + 2 + \sum\_{i=0}^{m} \left(\overline{T}\_{back\,\text{ff},i} + \overline{T}\_{CCA,i}\right)\right] \tag{50}$$

Accordingly, the average service is

$$\begin{aligned} \overline{T}\_{\text{Serve}} &= \sum\_{j=0}^{n} \left[ P(\text{Success}) \times \overline{T}\_{\text{success},j} + P \left( \text{Failure}^{\text{CCA}} \right) \times \overline{T}\_{\text{Failure},\text{CCA}} \right] \\ &+ P \left( \text{Failure}^{\text{NO}\_{-}\text{ACK}} \right) \times \overline{T}\_{\text{Failure},\text{NO}\_{-}\text{ACK}} \end{aligned} \tag{51}$$

Finally, according to Eqs. (51), (39), (40), and (41), the service time is

$$\overline{T}\_{Scric} = \begin{bmatrix} (\mathbf{1} - P\_c)(\mathbf{1} - \mathbf{x}^{m+1}) \left( L\_t + \mathbf{2} + \sum\_{i=0}^m \left( \overline{T}\_{backff,i} + \overline{T}\_{CCA,i} \right) \right) \\\\ + \mathbf{x}^{m+1} \left( \overline{T}\_{backff,m+1} + \overline{T}\_{CCA,m+1} \right) \end{bmatrix} \tag{52}$$

$$\times \frac{\mathbf{1} - \mathbf{y}^{n+1}}{\mathbf{1} - \mathbf{y}} + \left[ \left( L\_c + \mathbf{2} + \sum\_{i=0}^m \left( \overline{T}\_{backff,i} + \overline{T}\_{CCA,i} \right) \right) \frac{\mathbf{1} - \mathbf{y}^{n+1}}{\mathbf{1} - \mathbf{y}} \mathbf{y} \right]$$

Obviously speaking, all equations in transmission and waiting blocks depend on b0,0,0. So another equation is required to solve these equations. The sum of all states'

Solving nonlinear equations in terms of α, β, and τ leads to find the network

In the following, reliability, end-to-end delay, and throughput, as the most

The probability of successful packet reception is defined as reliability. In cyberphysical systems, particularly Smart Grid, wireless links may experience a great deal of challenges such as strong noise with heavy-tailed distributions. This means that reliability is a crucial parameter. There are three events in the transmission block, only one of which leads to successful transmission and others are failure events. As mentioned formerly, channel access failure and NO\_ACK in the last retransmission

In which Pdc and Pdr are the probability of discarded packet (owing to channel access failure) and NO\_ACK in the last retransmission, respectively. Following the

> m i¼0

The average delay for successful transmission is defined as the time interval between a packet arrival and the reception of corresponded ACK. It features the waiting time in queue and the service time in the transmission block. In previous works [16, 33], however, the queue delay is overlooked, and the average delay was defined as the time interval from the instant that packet is at the head of its MAC queue until receiving the corresponding ACK. In industrial applications, especially in power grid, delay plays a vitally important role. A delayed command or notification may give rise to chain errors, thereby calculating the precise amount of delay

As mentioned in previous parts, in the transmission process, two consecutive successful CCAs mean that the node is allowed to send its packet. If the node finds the channel busy in each of CCAs, it tries the next backoff stage. This proceeds until m reaches macMaxBE. The service time varies if a node finds the channel busy in each CCA. Attempting to seize the channel for various times is responsible for the different combinations of service time. Let Cαβ (i) be the set comprising all the

xbm,0,j <sup>¼</sup> xmþ<sup>1</sup> <sup>1</sup> � <sup>y</sup><sup>n</sup>þ<sup>1</sup> ð Þ

1 � y

∑TransmissionBlock þ ∑WaitingBlock ¼ 1 (42)

R ¼ 1 � Pdc � Pdr (43)

bi,�1,n <sup>¼</sup> <sup>y</sup><sup>n</sup>þ<sup>1</sup> (45)

(44)

probability in these two blocks must be equal to one:

quiescent points and also models the behavior of the medium.

b0,0,0 can be calculated by Eq. (42).

Research Trends and Challenges in Smart Grids

critical parameters, are scrutinized.

are responsible for the failure event.

Markov model illustrated in Figure 5

that appears essential.

88

Pdc ¼ ∑ n j¼0

5. Packet service time and end-to-end delay

Pdr ¼ Pcð Þ 1 � β ∑

4. Reliability

The end-to-end delay consists of the service time and the waiting time:

$$
\overline{D} = \overline{T}\_{\text{Service}} + \overline{W} \tag{53}
$$

Service\_time mð Þ¼� <sup>0</sup> <sup>0</sup>:00402m<sup>7</sup>

DOI: http://dx.doi.org/10.5772/intechopen.84288

the network unstable (green dashed line).

Figure 7.

Figure 8.

91

a) Tp = 100ms b) Tp = 20ms c) Tp = 10ms.

by DTM, Monte Carlo simulations, and experimental tests.

�37:914m<sup>3</sup>

Service\_time nð Þ¼ <sup>0</sup>:005356n<sup>5</sup> � <sup>0</sup>:092715n<sup>4</sup>

and both of them predict well the experimental results.

<sup>0</sup> <sup>þ</sup> <sup>0</sup>:12525m<sup>6</sup>

Figure 7 shows the service time's composition as a function of the MAC param-

highlighted. This leads to the reduction of reliability. In TP = 100 ms, the majority of failure events is due to lack of the ACK packet, but if TP declines to 10 ms, the channel access failure also appears. In Figure 7(c), raising m up to 4 and 5 makes

Figure 8 illustrates reliability which is obtained by Eq. (43) as a function of m0, m, and n. Like service time, DTM and Monte Carlo simulations perfectly coincide,

<sup>0</sup> <sup>þ</sup> <sup>77</sup>:214m<sup>2</sup>

A Reliable Communication Model Based on IEEE802.15.4 for WSANs in Smart Grids

Service\_time mð Þ¼�0:018055m<sup>4</sup> <sup>þ</sup> <sup>0</sup>:19116m<sup>3</sup>

eter m and the time period (TP). When TP and m are reduced and increased, respectively, the contribution of failure events in the service time will be

The service time expected value as a function of MAC parameters m0 = 3, mb = 8, m = 1, …, 5, n = 0.

Reliability as a function of MAC parameters a) m0 = 0, …, 8, mb = 8, b) m = 1, …, 5, c) n = 0, … 5, obtained

<sup>0</sup> � <sup>1</sup>:5786m<sup>5</sup>

�0:65661m<sup>2</sup> <sup>þ</sup> <sup>2</sup>:5481m<sup>1</sup> <sup>þ</sup> <sup>2</sup>:<sup>459</sup> (55)

<sup>0</sup> � <sup>78</sup>:778m<sup>1</sup>

<sup>þ</sup>0:65581n<sup>3</sup> � <sup>2</sup>:4454n<sup>2</sup> <sup>þ</sup> <sup>4</sup>:9795n<sup>1</sup> <sup>þ</sup> <sup>7</sup>:<sup>7724</sup> (56)

<sup>0</sup> <sup>þ</sup> <sup>10</sup>:367m<sup>4</sup>

<sup>0</sup> <sup>þ</sup> <sup>34</sup>:<sup>446</sup> (54)

0

In which TService is the average service time for the tagged packet and W is the waiting time in the queue. The waiting time is made up of the service times for all of packets in the queue ahead of the tagged packet plus the remaining service time of the packet in service (if any).
