3.1.2 Transmission block

The expected number of idle states is

Research Trends and Challenges in Smart Grids

And idle states probabilities are

Ii <sup>¼</sup> P FailureCCA � �

Ii�<sup>1</sup> <sup>¼</sup> P FailureCCA � �

Ii�<sup>2</sup> <sup>¼</sup> P FailureCCA � �

∑ i j¼1

: : : : <sup>I</sup><sup>1</sup> <sup>¼</sup> P FailureCCA � �

E a½ �¼

Ð 0

�i

<sup>þ</sup> P FailureNO\_ACK � �

<sup>þ</sup> P FailureNO\_ACK � �

<sup>þ</sup> P FailureNO\_ACK � �

<sup>þ</sup> P FailureNO\_ACK � �

i k¼1 kak

> ∑ D0�1 v¼0

h i

And sum of idle states probabilities is

Ij <sup>¼</sup> P FailureCCA � �

FIFO queue buffer is illustrated in Figure 4.

<sup>B</sup><sup>0</sup> <sup>¼</sup> P w½ �� <sup>n</sup>>0 P FailureCCA � �

The total probability of queue states is

According to Figure 4

Markov chain model for MAC-level buffer.

Figure 4.

84

� P w½ �� <sup>n</sup> ¼ 0 ∑

h i

h i

h i

� Ð 0

�i

uc uð Þdu

� P w½ �� <sup>n</sup> ¼ 0 ai

� P w½ �� <sup>n</sup> ¼ 0 ai�<sup>1</sup> þ Ii

� P w½ �� <sup>n</sup> ¼ 0 ai�<sup>2</sup> þ Ii�<sup>1</sup>

� P w½ �� <sup>n</sup> ¼ 0 a<sup>1</sup> þ I<sup>2</sup>

þ P Success ð Þ

Bv ¼ D0B<sup>0</sup> (25)

þ P Success ð Þ

(21)

(22)

(23)

(24)

c uð Þdu � aUnitBackoffPeriod

þ P Success ð Þ

þ P Success ð Þ

þ P Success ð Þ

þ P Success ð Þ

<sup>þ</sup> P FailureNO\_ACK � �

h i

Furthermore, there is a MAC-level buffer in waiting block that has not been considered in [16], which is completely separated from the idle mode. If a node generates a packet and also has a packet in transmission block, the new packet is directed toward the buffer until its turn. In other words, when service time becomes far more than the time period, the queue starts to fill. The Markov chain model for a

<sup>þ</sup> P FailureNO\_ACK � �

h i

The waiting block's probabilities were described in the previous section, and we depict the transmission block details in the following. In this section, some modifications to Park's model [16] are provided. The transmission block accounts for a three-dimensional Markov chain using three stochastic processes, including S(t), backoff stage; C(t), the state of backoff counter; and r(t), the state of retransmission counter. These states are linked to BE, NB, and RT in MAC parameter in IEEE802.15.4 standard, respectively.

The stationary probability of the Markov chain can be written as

$$b\_{i,k,j} = \lim\_{t \to \infty} P(\mathcal{S}(t) = i, \mathcal{C}(t) = k, r(t) = j) \tag{27}$$

In which iϵ(�2,m), kϵ(�1,max{Wi-1,Ls-1,Lc-1}), and jϵ(0,n). Figure 5 presents Markov chain model for the transmission block. As shown in the figure, the number of retransmissions is considered to have finite values, giving rise to the packet drop. Packets are discarded due to two events:

Figure 5. Markov chain model for MAC-level buffer.


Transmission block features three major parts:

State notations from (i, Wm-1, j) to (i, W0-1, j) denote backoff states. The states (i, 0, j) and (i, -1, j) are connected to the first and second clear channel assessment (CCA), respectively. States (�1, k, j) and (�2, k, j) correspond to successful and unsuccessful (due to lack of ACK) transmission, respectively. So as to appraise the performance of the network, τ, Pc, α, and β are derived as follows. Interested readers are referred to [16] for more details.

The probability that a device attempts to CCA1 is

$$\pi = \sum\_{i=0}^{m} \sum\_{j=0}^{n} b\_{i,0,j} = \left(\frac{\mathbf{1} - \mathbf{x}^{m+1}}{\mathbf{1} - \mathbf{x}}\right) \left(\frac{\mathbf{1} - \mathbf{y}^{n+1}}{\mathbf{1} - \mathbf{y}}\right) b\_{0,0,0} \tag{28}$$

where x = α + (1-α)β and y=Pc(1-xm+1).

τ depends on α, β, and Pc. The term Pc is the probability that at least one of the N-1 remaining nodes transmits a packet when the channel is occupied:

$$P\_{\mathfrak{c}} = \mathbf{1} - (\mathbf{1} - \mathfrak{r})^{N-1} \tag{29}$$

∑P Backoff ð Þ¼ ∑

∑P CCA ð Þ¼ <sup>2</sup> ∑

m i¼0 ∑ Wi�1 k¼0 ∑ n j¼0 bi,j,k

> <sup>1</sup> � ð Þ <sup>2</sup><sup>x</sup> <sup>m</sup>þ<sup>1</sup> 1 � 2x

> > n j¼0 ∑ Ls�1 k¼0

∑P Unsucc ð :TransÞ ¼ ∑

W<sup>0</sup> þ

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

Probability of attempting to sense the channel for the second time (CCA2)

bi,�1,j <sup>¼</sup> ð Þ <sup>1</sup> � <sup>α</sup> <sup>1</sup> � ð Þ <sup>x</sup> <sup>m</sup>þ<sup>1</sup>

b�1,k,j

n j¼0 ∑ Lc�1 k¼0

∑P TransmissionBlock ð Þ ¼ ∑P backoff ð Þþ ∑P CCA ð Þþ ∑P Sending ð Þ

the failure events and successful probabilities for waiting block:

P FailureNO\_ACK � � <sup>¼</sup> <sup>∑</sup>

P FailureCCA � � <sup>¼</sup> <sup>∑</sup>

m i¼0 ∑ n j¼0

P Success ð Þ¼ ∑

87

¼ Lsð Þþ 1 � Pc LcPc þ

� <sup>1</sup> � <sup>x</sup><sup>m</sup>þ<sup>1</sup> ð Þþ <sup>1</sup> � ð Þ <sup>2</sup><sup>x</sup> <sup>m</sup>þ<sup>1</sup>

Finally, the successful and unsuccessful packet transmission (due to NO\_ACK)

<sup>¼</sup> Lsð Þ <sup>1</sup> � Pc <sup>1</sup> � ð Þ <sup>x</sup> <sup>m</sup>þ<sup>1</sup> � � <sup>1</sup> � ð Þ<sup>y</sup> <sup>n</sup>þ<sup>1</sup>

b�2,k,j

According to (33), (34), (36), and (37), the total probability transmission block is

�� �

According to the transmission block's equations, we are in a position to calculate

<sup>¼</sup> ð Þ <sup>1</sup> � Pc <sup>1</sup> � <sup>x</sup><sup>m</sup>þ<sup>1</sup> � � <sup>1</sup> � <sup>y</sup><sup>n</sup>þ<sup>1</sup>

m i¼0

n j¼0 2 1ð Þ � 2x

ð Þ 1 � Pc ð Þ 1 � β ð Þ 1 � α bi,�1,j

1 � y

Pcð Þ 1 � α ð Þ 1 � β bi,0,j

<sup>¼</sup> Pc <sup>1</sup> � <sup>x</sup><sup>m</sup>þ<sup>1</sup> � �ynb0,0,<sup>0</sup>

<sup>¼</sup> Pc <sup>1</sup> � xmþ<sup>1</sup> � �ynb0,0,<sup>0</sup>

ð Þ α þ ð Þ 1 � α β bm,0,j

b0,0,<sup>0</sup>

<sup>¼</sup> LcPc <sup>1</sup> � ð Þ <sup>x</sup> <sup>m</sup>þ<sup>1</sup> � � <sup>1</sup> � ð Þ<sup>y</sup> <sup>n</sup>þ<sup>1</sup>

<sup>1</sup> � ð Þ <sup>x</sup> <sup>m</sup>þ<sup>1</sup> 1 � x

1 � x

∑P Sending ð Þ¼ ∑P Succ ð Þþ :Trans ∑P Unsucc ð Þ :Trans (35)

1 � y

<sup>1</sup> � ð Þ<sup>y</sup> <sup>n</sup>þ<sup>1</sup> 1 � y

1 � y

1 � y

0:5 þ 1 � α 1 � x

W<sup>0</sup> ! � b0,0,<sup>0</sup>

b0,0,<sup>0</sup>

<sup>1</sup> � ynþ<sup>1</sup> 1 � y

b0,0,<sup>0</sup>

b0,0,<sup>0</sup>

b0,0,<sup>0</sup> (34)

(33)

(36)

(37)

(38)

(39)

(40)

(41)

! <sup>1</sup> � ð Þ<sup>y</sup> <sup>n</sup>þ<sup>1</sup>

¼ 1 2

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

m i¼0 ∑ n j¼0

∑P Succ ð Þ¼ :Trans ∑

In which N is the number of nodes in the network.

α represents the probability that a node senses the channel and finds it busy in CCA1, (due to data and ACK transmission of other nodes or noise):

$$a = \left[ L \left( 1 - \left( 1 - \tau \right)^{N-1} \right) + L\_{ack} \frac{N\tau \left( 1 - \tau \right)^{N-1}}{1 - \left( 1 - \tau \right)^{N}} \left( 1 - \left( 1 - \tau \right)^{N-1} \right) \right] (1 - a)(1 - \beta) \tag{30}$$

When the channel is free in CCA1, it can be busy in CCA2 with the probability of β:

$$\beta = \frac{P\_\epsilon(\mathbf{1} - N\boldsymbol{\tau}) + N\boldsymbol{\tau}}{P\_\epsilon(\mathbf{1} - N\boldsymbol{\tau}) + N\boldsymbol{\tau} + \mathbf{1}} \tag{31}$$

In this model

$$\begin{aligned} L\_S &= L\_P + L\_{w,ack} + L\_{ack} + L\_{IFS} \\ L\_c &= L\_P + L\_{m,ack} \end{aligned} \tag{32}$$

Ls and Lc is the successful transmission time and NO\_ACK interval, respectively. Lp represents the total packet length including overhead and payload. Lw,ack denotes the ACK waiting time. Lack indicates the length of ACK frame, while LIFS is the interframe spacing (IFS) time, and Lm,ack represents ACK packet timeout, determined by macAckWaitDuration.

We outline below the final derived transmission block's equations and ignore details:

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

$$\begin{split} \sum \mathbf{P}(\mathbf{Backoff}^{r}) &= \sum\_{i=0}^{m} \sum\_{k=0}^{W\_{i}-1} \sum\_{j=0}^{n} b\_{i,j,k} \\ &= \frac{1}{2} \left( \frac{\mathbf{1} - (2\mathbf{x})^{m+1}}{\mathbf{1} - 2\mathbf{x}} W\_{0} + \frac{\mathbf{1} - (\mathbf{x})^{m+1}}{\mathbf{1} - \mathbf{x}} \right) \frac{\mathbf{1} - (\mathbf{y})^{n+1}}{\mathbf{1} - \mathbf{y}} b\_{0,0,0} \end{split} \tag{33}$$

Probability of attempting to sense the channel for the second time (CCA2)

$$\sum\_{i} \mathbf{P}(\mathbf{CCA}\_2) = \sum\_{i=0}^{m} \sum\_{j=0}^{n} b\_{i,-1,j} = (1-a) \frac{\mathbf{1} - (\mathbf{x})^{m+1}}{\mathbf{1} - \mathbf{x}} \frac{\mathbf{1} - (\mathbf{y})^{n+1}}{\mathbf{1} - \mathbf{y}} b\_{0,0,0} \tag{34}$$

Finally, the successful and unsuccessful packet transmission (due to NO\_ACK)

$$\sum P(Sending) = \sum P(Suc.Trans) + \sum P(Unsuc.Trans) \tag{35}$$

$$\begin{aligned} \sum \mathbf{P}(\text{Succ}.\text{Trans}) &= \sum\_{j=0}^{n} \sum\_{k=0}^{L\_{-}-1} b\_{-1,k,j} \\ &= L\_{\epsilon} (\mathbf{1} - P\_{\epsilon}) \left( \mathbf{1} - \left( \mathbf{x} \right)^{m+1} \right) \frac{\mathbf{1} - \left( y \right)^{n+1}}{\mathbf{1} - y} b\_{0,0,0} \\ \sum \mathbf{P}(\text{Unsuccc.}\text{Trans}) &= \sum\_{j=0}^{n} \sum\_{k=0}^{L\_{-}-1} b\_{-2,k,j} \\ &= L\_{\epsilon} P\_{\epsilon} \left( \mathbf{1} - \left( \mathbf{x} \right)^{m+1} \right) \frac{\mathbf{1} - \left( y \right)^{n+1}}{\mathbf{1} - y} b\_{0,0,0} \end{aligned} \tag{37}$$

According to (33), (34), (36), and (37), the total probability transmission block is

$$\begin{split} \boldsymbol{\Sigma}P(\textit{TransmissionBlock}) &= \boldsymbol{\Sigma}P(\textit{backoff}) + \boldsymbol{\Sigma}P(\textit{CCA}) + \boldsymbol{\Sigma}P(\textit{Sending}) \\ &= \left( \left( L\_{\boldsymbol{\epsilon}} (\mathbf{1} - \boldsymbol{P}\_{\boldsymbol{\epsilon}}) + L\_{\boldsymbol{\epsilon}} \boldsymbol{P}\_{\boldsymbol{\epsilon}} + \frac{\mathbf{0}.5 + \mathbf{1} - \boldsymbol{a}}{\mathbf{1} - \boldsymbol{\varkappa}} \right) \\ &\times (\mathbf{1} - \boldsymbol{\varkappa}^{m+1}) + \frac{\mathbf{1} - (2\boldsymbol{\varkappa})^{m+1}}{2(\mathbf{1} - 2\boldsymbol{\varkappa})} \boldsymbol{W}\_{0} \right) \times \frac{\mathbf{1} - \boldsymbol{y}^{n+1}}{\mathbf{1} - \boldsymbol{y}} \boldsymbol{b}\_{0, \boldsymbol{0}, 0} \end{split} \tag{38}$$

According to the transmission block's equations, we are in a position to calculate the failure events and successful probabilities for waiting block:

$$\begin{aligned} P(\text{Success}) &= \sum\_{i=0}^{m} \sum\_{j=0}^{n} (\mathbf{1} - P\_c)(\mathbf{1} - \beta)(\mathbf{1} - a)b\_{i, -1, j} \\ &= (\mathbf{1} - P\_c) \left(\mathbf{1} - \mathbf{x}^{m+1}\right) \frac{\mathbf{1} - \mathbf{y}^{n+1}}{\mathbf{1} - \mathbf{y}} b\_{0, 0, 0} \end{aligned} \tag{39}$$
 
$$\begin{aligned} P\left(\text{Failure}^{\text{NO}, \text{ACK}}\right) &= \sum\_{i=0}^{m} P\_c (\mathbf{1} - a)(\mathbf{1} - \beta) b\_{i, 0, j} \\ &= P\_c (\mathbf{1} - \mathbf{x}^{m+1}) \mathbf{y}^n b\_{0, 0, 0} \end{aligned} \tag{40}$$
 
$$\begin{aligned} P\left(\text{Failure}^{\text{CCA}}\right) &= \sum\_{j=0}^{n} (a + (\mathbf{1} - a)\beta) b\_{m, 0, j} \\ &= P\_c (\mathbf{1} - \mathbf{x}^{m+1}) \mathbf{y}^n b\_{0, 0, 0} \end{aligned} \tag{41}$$

• Channel access failure, working out when one of CCAs within the (m + 1)th

• Lack of receiving acknowledgment (ACK), turning out if collision occurs after

State notations from (i, Wm-1, j) to (i, W0-1, j) denote backoff states. The states (i, 0, j) and (i, -1, j) are connected to the first and second clear channel assessment (CCA), respectively. States (�1, k, j) and (�2, k, j) correspond to successful and unsuccessful (due to lack of ACK) transmission, respectively. So as to appraise the performance of the network, τ, Pc, α, and β are derived as follows. Interested readers

bi,0,j <sup>¼</sup> <sup>1</sup> � xmþ<sup>1</sup>

N-1 remaining nodes transmits a packet when the channel is occupied:

CCA1, (due to data and ACK transmission of other nodes or noise):

þ Lack

1 � x

τ depends on α, β, and Pc. The term Pc is the probability that at least one of the

α represents the probability that a node senses the channel and finds it busy in

<sup>N</sup>τð Þ <sup>1</sup> � <sup>τ</sup> <sup>N</sup>�<sup>1</sup> <sup>1</sup> � ð Þ <sup>1</sup> � <sup>τ</sup> <sup>N</sup> <sup>1</sup> � ð Þ <sup>1</sup> � <sup>τ</sup> <sup>N</sup>�<sup>1</sup> � � " #

<sup>β</sup> <sup>¼</sup> Pcð Þþ <sup>1</sup> � <sup>N</sup><sup>τ</sup> <sup>N</sup><sup>τ</sup>

LS ¼ LP þ Lw,ack þ Lack þ LIFS

Ls and Lc is the successful transmission time and NO\_ACK interval, respectively. Lp represents the total packet length including overhead and payload. Lw,ack denotes the ACK waiting time. Lack indicates the length of ACK frame, while LIFS is the interframe spacing (IFS) time, and Lm,ack represents ACK packet timeout, deter-

We outline below the final derived transmission block's equations and ignore

When the channel is free in CCA1, it can be busy in CCA2 with the

Lc ¼ LP þ Lm:ack

� � <sup>1</sup> � <sup>y</sup><sup>n</sup>þ<sup>1</sup>

1 � y � �

Pc <sup>¼</sup> <sup>1</sup> � ð Þ <sup>1</sup> � <sup>τ</sup> <sup>N</sup>�<sup>1</sup> (29)

Pcð Þþ <sup>1</sup> � <sup>N</sup><sup>τ</sup> <sup>N</sup><sup>τ</sup> <sup>þ</sup> <sup>1</sup> (31)

b0,0,<sup>0</sup> (28)

ð Þ 1 � α ð Þ 1 � β

(30)

(32)

backoff fails.

n + 1 attempts.

are referred to [16] for more details.

Research Trends and Challenges in Smart Grids

<sup>α</sup> <sup>¼</sup> <sup>L</sup> <sup>1</sup> � ð Þ <sup>1</sup> � <sup>τ</sup> <sup>N</sup>�<sup>1</sup> � �

mined by macAckWaitDuration.

probability of β:

In this model

details:

86

τ ¼ ∑ m i¼0 ∑ n j¼0

where x = α + (1-α)β and y=Pc(1-xm+1).

Transmission block features three major parts:

The probability that a device attempts to CCA1 is

In which N is the number of nodes in the network.

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' probability in these two blocks must be equal to one:

$$
\SigmaTransmissionBlock + \Sigma WaitingBlock = \mathbf{1} \tag{42}
$$

combination of choosing i element out of a set of busy channel probability Sαβ = {α,

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

<sup>S</sup>αβ ð Þ<sup>i</sup> <sup>N</sup><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>

∑ 2i

k¼1 Ck

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):

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

∑ 2m

k¼1 Ck <sup>S</sup>αβ ð Þi

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):

> 2 ∑ 2m

k¼1 Ck <sup>S</sup>αβ ð Þi

> m i¼0

m i¼0

m i¼0

P Success ð Þ� Tsuccess,j <sup>þ</sup> P FailureCCA � � � TFailure,CCA h i

m i¼0

� � � �

Tbackoff,i þ TCCA,i � � � � <sup>1</sup> � <sup>y</sup><sup>n</sup>þ<sup>1</sup>

� �

þ Tbackoff,mþ<sup>1</sup> þ TCCA,mþ<sup>1</sup>

Tbackoff,i þ TCCA,i

Tbackoff,i þ TCCA,i � � � �

Tbackoff,i þ TCCA,i � � � � (50)

Tbackoff,i þ TCCA,i

<sup>1</sup> � <sup>y</sup> <sup>y</sup>

� � � � (48)

<sup>α</sup>ðÞþ<sup>i</sup> <sup>2</sup>N<sup>k</sup>

� �

<sup>β</sup>ð Þ <sup>1</sup>�<sup>α</sup> ð Þ<sup>i</sup> represent the number of the first and second element of

<sup>S</sup>αβ ðÞ�i ð Þ Wi � 1

<sup>β</sup>ð Þ <sup>1</sup>�<sup>α</sup> ð Þ<sup>i</sup>

(46)

(47)

(49)

(51)

(52)

th backoff attempt. In

β (1-α)}. Normalized average service time is as follows:

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

∑ 2i

k¼1 Ck

Tbackoff,i ¼

Tsuccess,j ¼ Ls þ 2 þ j Lð Þþ <sup>c</sup> þ 2 ð Þ j þ 1 ∑

TFailure,NO\_ACK ¼ ð Þ n þ 1 Lc þ 2 þ ∑

Accordingly, the average service is

n j¼0

TService ¼ ∑

�

<sup>1</sup> � <sup>y</sup><sup>n</sup>þ<sup>1</sup> 1 � y

TService ¼

89

TFailure,CCA ¼ j Lð Þþ <sup>c</sup> þ 2 j ∑

The average time for failures due to the retransmission limit is

<sup>þ</sup> P FailureNO\_ACK � � � TFailure,NO\_ACK

ð Þ <sup>1</sup> � Pc <sup>1</sup> � <sup>x</sup><sup>m</sup>þ<sup>1</sup> ð Þ Ls <sup>þ</sup> <sup>2</sup> <sup>þ</sup> <sup>∑</sup>

þ Lc þ 2 þ ∑

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

<sup>þ</sup>x<sup>m</sup>þ<sup>1</sup> Tbackoff,mþ<sup>1</sup> <sup>þ</sup> TCCA,mþ<sup>1</sup> � �

> m i¼0

TCCA,i ¼

where C<sup>k</sup>

<sup>α</sup>ð Þ<sup>i</sup> and <sup>N</sup><sup>k</sup>

addition, N<sup>k</sup>

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

Solving nonlinear equations in terms of α, β, and τ leads to find the network quiescent points and also models the behavior of the medium.

In the following, reliability, end-to-end delay, and throughput, as the most critical parameters, are scrutinized.
