# QoS Model of WSNs Communication in Smart Distribution Grid

Authors: Ruju  Fang; Jianping  Wang; Wei  Sun; Qiyue Li
Journal: International Journal of Distributed Sensor Networks
 (2016)

---

## Abstract

This paper presents an integrated modeling method providing superior Quality of Service (QoS) for wireless sensor networks (WSNs) which is suitable for smart distribution grid (SDG) communication. Traditional QoS model based on IEEE802.15.4 protocol cannot meet the communication requirements of multipriority data in smart distribution grid. In order to meet the specification of power system communication, a new QoS-enabled medium access control (MAC) model based on unfair competition channel access mechanism (UCCAM) is developed in this paper. The proposed model can ensure that the communication system of WSN provides different Qualities of Service for different priority data. According to different requirements for the communication time, the data of SDG are divided into three types: high priority, middle priority, and low priority data. The state transition of buffering queue data in node is described by a three-dimensional Markov chain model. Delay time, effective throughput rate, and channel collision rate models are developed, respectively, to evaluate communication performance of WSN applied in smart distribution grid. The simulation results show that the proposed model can provide different Qualities of Service for different priority data and is more efficient than the IEEE802.15.4e standard and the traditional methods.


---

## Body

## 1. Introduction

Smart grid can be regarded as a power system that uses two-way communication and information technology to realize power generation, delivery, and consumption, where real-time monitoring, advanced sensing, communication, analysis, and control are integrated and applied to ensure the safety, reliability, and efficiency of the power system [1]. Therefore, obtaining real-time and reliable information is a key factor to ensure stable delivery of power energy from the generation units to the end users in the smart grid [2].Many core technologies need to be developed to enable the features of smart grid. Among them, one critical technology is real-time monitoring and control of power system [3–5]. Because of low power consumption, fast self-organization, and superior cooperation characteristics, WSNs have extensive application prospects in remote monitoring of equipment, fault diagnosis, and remote wireless meter reading [6–10].Sensor Network Design for a Secure National Electric Energy Infrastructure sponsored by National Science Foundation, USA, Integrating the Physical with the Digital World of the Network in the Future sponsored by European Seventh Framework Programme, and Researches on Wireless Sensor Networks in Power Grid Communication sponsored by National Natural Science Foundation of China have all conducted research on the application of wireless sensor network in power system since 2004. In 2010, “NIST Framework and Roadmap for Smart Grid Interoperability Standards” listed IEEE802.15.4 as one of recommended standards. According to IEEE802.15.4 standard, communication data stored in buffer queue of node have the same priority and obey first come first serve rule [11]. In fact, communication data have different requirements for communication time according to the power system specification, where they are divided into three types: the data requiring shorter communication time, the data requiring longer time to complete communication process, and the data having not any requirement for communication time [12, 13]. If communication data are sent according to rules based on IEEE802.15.4 standard, it may induce the data requiring shorter communication time to wait for a longer time which exceeds the upper limit of transmission time specified by power system standard. Thus, IEEE802.15.4 protocol cannot meet the requirement of SDG communication and directly be applied to this field. In order to meet the different requirements of transmission time for different types of communication data, a new QoS-MAC model based on unfair competition channel access mechanism is developed and the following aspects need to be noticed in this paper:(1)
Remote communication, remote adjustment, remote control, and telemetry data are divided into three types: high priority, middle priority, and low priority in accordance with different requirements of communication time.(2)
According to the Markov chain model, the probabilities that node sends different priority data are expressed, respectively. The probability is also expressed for WSN withN nodes, where n0 nodes send the high priority data, n1 nodes send the middle priority data, n2 nodes send the low priority data, and n3 nodes have no data to be sent.(3)
According to different requirements for communication time, MAC layer channel access model based on unfair competition protocol is developed and the proposed model can ensure that data with higher requirement of communication time possess higher ability to occupy channel and interrupt communication process of the data with lower requirement of communication time.The problem for WSNs applied in SDG communication is how to establish the MAC-QoS model based on unfair competition channel access mechanism and to ensure that all the data can be transmitted effectively when WSN is unsaturated state and higher priority data can maintain good communication quality when WSN is under saturated or supersaturated states.The rest of this paper is organized as follows: some related works are summarized in Section2 and the proposed scheme design is elaborated in Sections 3 and 4 showing the simulation results and analysis. Conclusion of the paper with open issues is in Section 5.


## 2. Related Works

Research on QoS model of WSN applied in SDG communication is an active area. This point has been witnessed from the extensive literatures on this subject since Ye et al. proposed the classic S-MAC protocol [14], where S-MAC protocol uses periodic sleep-wake mechanism by dividing the time axis into periodic fixed length and making the same node within the cluster maintain the same time scheduling. A self-adaptive sleep S-MAC protocol is proposed in which the adjustable short sleep mechanism is used to replace the fixed short sleep mechanism [15]. In order to effectively shorten the waking time, Polastre et al. propose asynchronous B-MAC protocol based on carrier detection, where the protocol uses idle channel assessment technology for channel ruling without sharing scheduling information [16]. Z-MAC protocol which combines CSMA and TDMA access mechanisms is proposed, where CSMA channel access mode is used to improve the channel utilization rate and reduce time delay under low flow condition, and TDMA channel access mode is used to reduce the conflict and cross talk under high flow condition [17]. According to the priority and weight, Q-MAC protocol based on QoS protocol of multipriority data is first proposed, where data are selected from a plurality of priority queues within the nodes [18]. An improved QoS-MAC protocol is proposed for multimedia sensor networks, where the transmission time delay in multimedia data communication is optimized by adjusting the listen-sleep time and contention window time periodically according to the main type of communication data in the network [19]. A PQ-MAC protocol which can provide different QoS services for different priority data is proposed, in which the proposed protocol provides double protection mechanisms which can significantly reduce transmission time delay of the high priority data between nodes [20]. The T-MAC protocol can adjust time for activities according to the dynamic network communication flows [21]. A medium access control scheme based on coordinated and adaptive wake-up mechanism is proposed, where an improved technique is used to reduce energy consumption and message overhead rates [22]. In order to utilize the burst nature of the communication for the WSN to prevent energy waste through advertisements and reservations for data slots, literature [23] combines the advantages of contention-based and TDMA-based protocols to form distributed advertisement-based TDMA protocol (ATMA), where contention-based protocol employs static or variable duty cycles to minimize energy dissipated in idle listening and TDMA-based protocol uses reservation and scheduling to minimize energy loss.In order to promote flexibility of network communication to adapt to traffic and topology changes, ER-MAC protocol is designed as a hybrid of the TDMA and CSMA approaches, where the proposed method can guarantee fairness over the packet’s sources and offer a synchronized and loose slot structure to allow nodes to join or leave the communication network [24].In literatures [14–16], periodic sleep easily causes the accumulation of communication delay time and is not suitable for SDG communication which requires higher real-time transmission. In [17–21], the algorithms based on QoS optimization and using channel competition access for multipriority data cannot completely solve the random delay problem of channel access. In [22], the ahead sleeping problem affects communication property of WSN because of asymmetric communication. In [23], the ATMA only considers energy loss, where requirements of real time and reliability are ignored. In [24], leaving of nodes may cause congestion and loss of communication packets. From above analysis, all the protocols cannot provide perfect QoS-MAC model for different priority data in smart distribution grid communication.The QoS algorithm based on multipriority data is proposed, where the SDG communication data are divided into two types: real-time data and non-real-time data [25]. However, communication data actually need to be divided into three types in power system according to the requirement of communication time. Therefore, the QoS algorithm proposed in [25] cannot match the actual communication scenario of power system.Therefore, the existing research methods cannot meet the real-time requirements of data communication for smart distribution grid.In order to enhance and add functionality to the IEEE802.15.4 MAC to better support the industrial markets and permit compatibility with modifications being proposed within the Chinese WPAN, IEEE802.15.4-2011 is amended in 2012 and named 802.15.4e-2012. However, 802.15.4e-2012 cannot also provide service of classified transmission for different priority data in node [26].The purpose is focused on developing QoS-MAC model based on unfair competition channel access mechanism, which can provide different QoS for different priority data in this paper where the model can provide an effective and systematic way for the quantitative design of WSN communication in smart distribution grid.


## 3. QoS Modeling of WSNs in SDG Communication

### 3.1. Scheduling Model of Multipriority Data

According to the communication standard of power system, the communication data are divided into four types: remote communication, telemetry, remote control, and remote adjustment [12, 13]. Requirements of delay time and correct rate are listed in Table 1 for four types of communication data. From Table 1, we learn that delay time of remote communication data is the shortest among four types of data and it is no more than 10 ms; remote control and remote adjustment data have the same requirements for communication time and they cannot exceed 20 ms to complete communication process; telemetry data has no requirement for communication time.Table 1
Types and requirements for communication data.
Data type
Correct rate
Delay time
Remote control
≥99.99%
≤20 ms
Remote communication
≥99%
≤10 ms
Telemetry
≥98%
x
Remote adjustment
≥99.99%
≤20 msIn traditional 802.15.4 standard, MAC layer supposes two types of channel access ways including slotted CSMA-CA channel access mechanism and unslotted CSMA-CA channel access mechanism, where all the communication data have the same priority and fair opportunity to use channel and obey first come first serve rule.Communication standard of power system stipulates that the data with higher demand of communication time should be transmitted first and the data with lower demand of communication time should be serviced at last, whether WSN is under unsaturated or saturated state. Therefore, the traditional QoS-MAC model based on 802.15.4 standard cannot provide service of classified transmission for different types of communication data. Moreover, the channel access mechanism based on fair competition cannot ensure that all the data are transmitted effectively even if WSN is unsaturated state.In general, the activity in which data disorderly occupy channel easily induces uncertainty of the communication delay between neighbor nodes. If IEEE802.15.4 protocol cannot be improved, the uncertainty of delay time may induce serious consequences; for example,(1) decreases opportunity to send higher priority data and efficiency of power generation and transmission. What is more serious is that if channel is always occupied by lower priority data, some important data are lost and some important operations for smart distribution grid cannot be carried out in time. (2) The disordered competition may induce two types of data always colliding with each other and the other data cannot obtain an opportunity to use channel. Data loss is just one part of the puzzle; the other part is that the collision increases possibilities of channel congestion and network congestion, which may cause distribution grid to separate itself from the main grid, malfunction of power system happens, and large area blackout occurs which results in serious trouble and economic loss.Thus, it is very important to improve the QoS MAC model based on 802.15.4 standard and realize classified transmission for different types of communication data in smart distribution grid.Before the QoS MAC model is established, the communication data of smart distribution grid need to be reclassified. According to requirements of communication time, remote communication, remote control (remote adjustment), and telemetry data can be expressed as high priority, middle priority, and low priority data in accordance with different requirements of communication time, respectively. Thus, research on SDG communication can be converted to study feature of WSN communication and the conversion makes it more convenient to analyze scheduling model of data, calculate the probabilities nodes, send different types of data, and analyze the performance of WSN. In the following sections, remote communication, remote control (remote adjustment), and telemetry data are replaced with high priority, middle priority, and low priority data, respectively.In order to guarantee that the communication data can be sent according to their priorities and positions in the queue, the following tasks need to be completed. The first step is to classify communication data into three types: high priority, middle priority, and low priority data, where three types of data are stored in their respective buffer queues. The second step is to sort the same priority data in the buffering queue according to length of their remaining effective time to accomplish data transmission.Based on the above two steps, the problem of disordered competition for multipriority data can completely be solved. However, traditional IEEE802.15.4 standard cannot, by itself, solve the problems of communication data ordination and classification according to length of their remaining effective time.In order to accomplish data transmission based on different requirements of communication time, high priority, middle priority, and low priority data must obey the following rules during communication process of data transmission.Rule 1.
High priority, middle priority, and low priority data are stored in corresponding buffering queues and the positions that data belong to the same priority are arranged according to remaining effective time to accomplish communication process. It means, in the same priority queue, data with the shortest remaining time are sent first and data with the longest remaining time are finally sent.Rule 2.
High priority data use the shortest fixed back-off time and the most back-off times among three types of data; middle priority data use shorter fixed back-off time and more back-off times than low priority data in Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) channel competition access mechanism. Low priority data adopts random back-off time and the least back-off times which are stipulated by the IEEE802.15.4 standard.Rule 3.
In the Clear Channel Assessment (CCA) channel detection of CSMA/CA, channel detection time must meet the requirements: the node sending high priority data should be set as the shortest channel detection time; the node sending middle priority data should be set as longer channel detection time than the sum of the fixed back-off time and the CCA channel detection time of node sending high priority data; the node sending low priority data should be set as the longest channel detection time which is longer than total sum of the back-off time and the channel detection time of nodes sending high priority data and middle priority data. According to above three rules, the architecture of MAC model based UCCAM is established and shown in Figure1, where it is used to describe process that three types of priority data occupy channel and obtain an opportunity to use channel. From Figure 1, we know that high priority data have more opportunities to use channel than middle priority and low data. Low priority data have the least opportunity to use channel among three types of communication data. Middle priority and low priority data have no opportunity to be sent as long as there are the high priority data in queue. Even if higher priority data does not exist, low priority data have no opportunity to be sent, as long as there are middle priority data in data queue. According to MAC model based on UCCAM, we can further establish scheduling model of multipriority data shown in Figure 2.Figure 1
MAC model based on UCCAM.Figure 2
Scheduling model of multipriority data.From Figure2, we can know that collected data in local node and received data from neighbor nodes are initially disordered, where they obey first come first serve rule and are usually sent according to their positions in buffering queue. After adjustment of the queue scheduling model, data are rearranged in a certain order and sent according to types and remaining effective time, where the uncertainty of delay time is eliminated or decreased distinctly.By using scheduling model, higher priority data possess the higher priority to occupy channel and the ability to interrupt communication process, in which channel sends lower priority data. Thus, the queue scheduling model can improve the transmission efficiency and transmission reliability of the communication data for WSN applied in smart distribution grid whether communication network is unsaturated or saturated state.


### 3.2. QoS Modeling of WSNs Communication System

In this section, the MAC-QoS modeling is discussed for WSN communication system based on the scheduling model of multipriority data. Consider a general wireless sensor network with one coordinator node andN terminal/routing nodes, where all N nodes affect the usage of the wireless channels and every node can communicate with any other nodes. States of buffering queue data always change, because nodes of WSN constantly receive and send data. The Markov chain is a stochastic process with the Markov property. It can thus be used to describe systems that follow a chain of linked events, where what happens in next state depends only on the current state of the system. In smart distribution grid, the data generation rate and traffic rate have the Markov property. From [12], there are different traffic rates in SDG communication, such as 0.6 kpbs, 1.2 kpbs, 2.4 kpbs, 4.8 kpbs, 9.6 kpbs, and 19.2 kpbs. So, change of traffic rate is exponential function. Thus, Markov chain model can be used to describe transition process of data states in node.The transition process and the related probabilities can be expressed and calculated with the help of Markov chain model shown in Figure3. In Figure 3, state (m0,m1,m2) represents that there are m0 high priority, m1 middle priority, and m2 low priority data packets in buffering queue of the node. λ0, λ1, and λ2, respectively, represent the production rates of the high priority, middle priority, and low priority data, respectively. μ0, μ1, and μ2, respectively, represent the traffic rates of the high priority, middle priority, and low priority data. k0, k1, and k2, respectively, represent maximum quantities of high priority, middle priority, and low priority data in buffering queue of the node.Figure 3
State transition of different priority data.From Figure3, we know that quantities of middle priority and low priority data can only increase or remain unchanged but not reduce when there are high priority data in the buffering queue. That is to say, when m0>0, m1 and m2 can only increase or remain unchanged not reduce, until m0=0. When there are only middle priority data and low priority data in the buffering queue, quantity of low priority data can only increase or remain unchanged.SupposePm0,m1,m2 represents the probability of the state (m0,m1,m2), which is only related to former and latter states of buffering queue in the node. When there are no high priority data in buffering queue (m0=0), Pm0,m1,m2 can be described as(1)P0,0,0P0,0,m2P0,0,k2P0,m1,0P0,m1,m2P0,m1,k2P0,k1,0P0,k1,m2P0,k1,k2=101010101011101001101100101101101101100100100101100101μ0P1,m1,m20μ1P0,m1+1,m2λ1P0,m1-1,m2μ2P0,m1,m2+1λ2P0,m1,m2-1010101010111010110011101011101011100011001011001011000μ0λ0μ1λ1μ2λ2.The first term of right hand side of (1) represents states which are associated with states of left hand side and the second term of right hand side of (1) represents influence degree to states of left hand side. When the number of high priority data is larger than zero and less than the upper bound k0, all the expressions of Pm0,m1,m2 can be described as(2)Pm0,0,0Pm0,0,m2Pm0,0,k2Pm0,m1,0Pm0,m1,m2Pm0,m1,k2Pm0,k1,0Pm0,k1,m2Pm0,k1,k2=110000110001110001110100110101110000110100110101110101μ0Pm0+1,m1,m2λ0Pm0-1,m1,m2μ1Pm0,m1+1,m2λ1Pm0,m1-1,m2μ2Pm0,m1,m2+1λ2Pm0,m1,m2-1010101010111010110110101110101110100110001110001110101μ0λ0μ1λ1μ2λ2.The first term of right hand side of (2) represents states which are associated with states of left hand side and the second term of right hand side of (2) represents influence degree to states of left hand side. When the number of high priority data reaches the upper bound k0, all the expressions of Pm0,m1,m2 can be described as(3)Pk0,0,0Pk0,0,m2Pk0,0,k2Pk0,m1,0Pk0,m1,m2Pk0,m1,k2Pk0,k1,0Pk0,k1,m2Pk0,k1,k2=010000010001010001010100010101010101010100010101010101μ0Pm0+1,m1,m2λ0Pm0-1,m1,m2μ1Pm0,m1+1,m2λ1Pm0,m1-1,m2μ2Pm0,m1,m2+1λ2Pm0,m1,m2-1100101100101100100100101100101100100100001100001100000μ0λ0μ1λ1μ2λ2.The first term of right hand side of (3) represents states which are associated with states of left hand side and the second term of right hand side of (3) represents influence degree to states of left hand side. Notice that values of the index notations including m0, m1, and m2 in right hand sides of (1)–(3) should be coincident with the left hand sides. For example, according to (1), we can deduce(4)P0,0,0=μ0P1,m1,m2+μ1P0,m1+1,0+μ2P0,0,m2+1λ0+λ1+λ2.Because m1=0 and m2=0 in the left hand side of (4), m1 and m2 in the right hand side of equation should be replaced with zero, respectively. Thus, (4) can be simplified as(5)P0,0,0=μ0P1,0,0+μ1P0,1,0+μ2P0,0,1λ0+λ1+λ2.From all the expressions related to Pm0,m1,m2, we know that there are altogether four situations that may occur in one node: high priority data are sent, middle priority data are sent, low priority data are sent, or there are no data to be sent. Probabilities of four situations can be expressed by P0, P1, P2, and P3, respectively, and they can further be described as(6a)P0=∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2,(6b)P1=∑m1=1k1∑m2=0k2P0,m1,m2,(6c)P2=∑m2=1k2P0,0,m2,(6d)P3=P0,0,0.For the WSN with N nodes, any one node maybe sends the low priority data, the middle priority data, or high priority data. Of course, it is likely that there are no data to be sent at current moment. When the total number of possible combinations is considered, probability of the state where n0 nodes send the high priority data, n1 nodes send the middle priority data, n2 nodes send the low priority data, and n3 nodes send no data can be described as (7)Qn0,n1,n2=CNn0·CN-n0n1·CN-n0-n1n2·CN-n0-n1-n2n3·P0n0·P1n1·P2n2·P3n3n0=N!·P0n0·P1n1·P2n2·P3n3n0!·n1!·n2!·n3!,where N=n0+n1+n2+n3.


### 3.3. Mathematical Model of Wireless Channel Competition among Adjacent Nodes

In WSNs, the current moment state of communication channel is related to the previous moment channel state. Therefore, calculating the probability channel keeps idle at the current time; previous moment state should be considered. Stipulate thatPi represents probability channel which keeps idle at the current moment and it can be written as(8)Pi=Pi/i·Pi+Pi/b·1-Pi,where Pi/i/Pi/b represents probabilities that channel is idle at the current moment under the premise that channel is idle/busy at the previous moment.Suppose that the average transmission time of data packet in node isTtx. Pi/b is reciprocal relationship with Ttx and it can be described as (9)Pi/b=1Ttx.Substituting (9) into (8) and considering Pi/i=1-Pi/b, Pi can be obtained(10)Pi=11+Ttx·1-Pi/i.According to (10), the probability that different priority data detect that channel is idle can be described as(11)Pik=11+Ttx·1-Pi/ik,where k=0,1,2. Notice that Pi/ik(k=0,1,2) represents the probability that different priority data detect the channel which keeps idle during two continuous time units and it is equal to the probability that the remaining nodes have no opportunity to occupy channel. According to definition of conditional probability, the probability of high priority data detecting the channel which keeps idle during two continuous time units can be defined as ratio between the probabilities that some nodes transmit high priority data and they do not occupy the channel and probabilities that are high priority data are sent in the transmission channel. For the given n0, n1, and n2, the probability of high priority data detecting the channel which keeps idle during two continuous time units can be described as(12)Pi/i0=Qn0,n1,n2Q01-τ0n0-11-τ1n11-τ2n2,where Q0 represents the probabilities that there are high priority data which are transmitted. τ0, τ1, and τ2 represent that probabilities channel is occupied by high priority data, middle priority data, and low priority data. When considering all the possible values for n0, n1, and n2, Pi/i0 can further be rewritten as(13a)Pi/i0=∑n0=1N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2Q01-τ0n0-11-τ1n11-τ2n2.Similarly, Pi/i1 and Pi/i2 can be described as(13b)Pi/i1=∑n0=0N∑n1=1N-n0∑n2=0N-n0-n1Qn0,n1,n2Q11-τ0n01-τ1n1-11-τ2n2,(13c)Pi/i2=∑n0=0N∑n1=0N-n0∑n2=1N-n0-n1Qn0,n1,n2Q21-τ0n01-τ1n11-τ2n2,where Q1 and Q2 represent the probabilities that nodes send middle priority and low priority data.Combining (7) and considering all the possible values for n0, n1, and n2, Q0, Q1, and Q2 can, respectively, further be expressed as(14a)Q0=∑n0=1N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2,(14b)Q1=∑n0=0N∑n1=1N-n0∑n2=0N-n0-n1Qn0,n1,n2,(14c)Q2=∑n0=0N∑n1=0N-n0∑n2=1N-n0-n1Qn0,n1,n2.In (13a)–(13c), τk(k=0,1,2) mainly consists of two parts: one probability is that node occupies channel at current time under the premise that node obtains the opportunity to use channel and transmit corresponding priority data at the previous moment; the other one is that node obtains the opportunity to use channel and transmits corresponding priority data at current time under the premise that node has no opportunity to use channel and transmit corresponding priority data at the previous moment.For different priority data, the probability that data packets obtain channel aftern back-off times can be expressed as (1-Pik)n·Pik(k=0,1,2). Stipulate that Kk(k=0,1,2) represents the maximum back-off times of different priority data packets; Ttxk  (k=0,1,2) represents the average transmission time of different priority data packets; tk(k=0,1,2) represents the channel detection time of different priority data packets.The time that node obtains the opportunity to use channel and transmit corresponding priority data aftern back-off times can be described as ∑m=0n(bmk+tk)+Ttxk, which is a reciprocal relationship to the transmission rate of the corresponding data packets. For given n, the first part can be described as (1-Pik)n·Pik·(n+1)/∑m=0n(bmk+tk)+Ttxk, which represents that node occupies channel at current time under the premise that node obtains the opportunity to use channel and transmit corresponding priority data at the previous moment. When considering all the possible values for n, the first part can be described as ∑n=0Kk-1(1-Pik)n·Pik·(n+1)/∑m=0n(bmk+tk)+Ttxk. Similarly, the second part can further be described as 1-PikKk·Kk/∑m=0Kk-1(bmk+tk), which represents that node obtains the opportunity to use channel and transmit corresponding priority data at current time under the premise that node has no opportunity to use channel and transmit corresponding priority data at the previous moment. Therefore, τk can be described as(15)τk=∑n=0Kk-11-Pikn·Pik·n+1∑m=0nbmk+tk+Ttxk+1-PikKk·Kk∑m=0Kk-1bmk+tk,where k=0,1,2.Consumption of data transmission time mainly includes CSMA-CA back-off and transmission time in MAC layer protocol based on IEEE802.15.4 standard. When calculating data transmission time, two cases need to be considered. One is that node obtains opportunity to send corresponding priority data; the other one is that node has no opportunity to send corresponding priority data. From above analysis, we know that[∑m=0n(bmk+tk)+Ttxk] represents waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value Kk. Taking into account the occurrence probability for the situation, the waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value can be described as (1-Pik)n·Pik·[∑m=0n(bmk+tk)+Ttxk]. When all the possible values are considered for n, the waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value can further be described as ∑n=0Kk-1(1-Pik)n·Pik·[∑m=0n(bmk+tk)+Ttxk]. Similarly, the waiting time that node has no chance to send corresponding priority data before the back-off times arriving at the maximum value can be described as (1-Pik)Kk·∑m=0Kk-1(bmk+tk). Thus, the average time that nodes send different priority data packets can be expressed as(16)Tsk=∑n=0Kk-11-Pikn·Pik·∑m=0nbmk+tk+Ttxk+1-PikKk·∑m=0Kk-1bmk+tk,where k=0,1,2.Notice that all the parameters and variables, respectively, belong to high priority, middle priority, and low priority data whenk takes 0, 1, and 2 from (11) to (16).


### 3.4. The Model of WSN in SDG Communication

In WSN withN nodes, each node affects communication qualities of other ones during the process of data transmission. These effects mainly include delay time, effective throughput rate, and channel collision rate.


#### 3.4.1. Mathematical Model of Delay Time

The transmission delay timeTd0 of high priority data in the WSN for SDG communication mainly includes the waiting and transmitting time of data in high priority buffering queue. Td0 can be described as m0·Ts0 and it is only related to m0 quantity of high priority data in buffering queue for a given state. However, the position of existing high priority data in buffering queue needs to be considered when calculating Td0. m0·Ts0 is only one of all possible situations. For given m0, m1, and m2, Td0 can be described as(17)Td0=Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.When all the possible values are considered for m0, m1, and m2, Td0 can be rewritten as(18)Td0=∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.The transmission delay time Td1 of middle priority data in the WSN of SDG communication has similar form and can be described as(19)Td1=11-λ0·Ts0∑m1=1k1∑m2=0k2∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2+∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2·m1·Ts1∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2.The first term of the right hand side of (19) represents transmission delay time of the high priority data including high priority buffering queue at the current moment, and newly generated ones during the process that node sends high priority and middle priority data, where 1/1-λ0·Ts0 represents influence coefficient of newly generated high priority data. The second term of the right hand side of the equation represents the waiting and transmission time of data in middle priority buffering queue. In (19), Td1 is not only related to quantity and the position of existing middle priority data in buffering queue, but also related to existing high priority data in buffering queue and newly generated ones including collected data in local node and received data from neighbor nodes.The transmission delay timeTd2 of low priority data in the WSN of SDG communication can be described as(20)Td2=11-λ0·Ts0∑m2=1k2∑m1=0k1∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+11-λ1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2P0,m1,m2·m1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+∑m0=0k0∑m1=0k1∑m2=1k2P0,0,m2·m2·Ts2∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2.The first term of the right hand side of (20) represents transmission delay time of the high priority data including high priority buffering queue and newly generated ones during the process that node sends low priority, middle priority, and high priority data. The second term of the right hand side of (20) represents transmission delay time of the middle priority data including middle priority buffering queue and newly generated ones during the process that node sends high, middle, and low priority data, where 1/1-λ0·Ts0 and 1/1-λ1·Ts1, respectively, represents influence coefficients of newly generated high priority and middle priority data. The third term of the right hand side of (20) represents waiting and transmitting time of data in low priority buffering queue.From (20), we can know that Td2 is not only related with quantity and the position of existing low priority data in buffering queue, but also related to existing high priority and middle data in buffering queue and newly generated ones.


#### 3.4.2. Mathematical Model of Effective Throughput Rate

In (11), Pik represents probabilities of different priority data detecting that channel is idle. Thus, 1-Pik represents probabilities of different priority data detecting that the channel is busy. And nk·[1-(1-Pik)Kk]·Lk can be regarded as bytes that different priority data are sent successfully. 1/Tsk can be regarded as traffic rate. Considering all the possible values for m0, m1, and m2, the throughput rate for different priority data packets can be rewritten as(21)Tk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLkTsk,where Lk(k=0,1,2) represents the length of different priority data packets.In the WSN for SDG communication, we usually use the effective throughput rate to describe the ratio between throughput amount of effective transmission data and total output data, and it is one of the important indicators to measure whether the transmission performance of WSN is excellent or not. The effective throughput rate is more direct to describe the successful rate of data transmission than throughput rate.Throughput effective rate by which node sends different priority data packets can be described as(22)Gk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLk/TskN·λk,where N represents the number of WSN nodes and λk represents the total production rate of single node for different priority data. Notice that all the parameters and variables, respectively, belong to high priority, middle priority, and low priority data when k takes 0, 1, and 2 in (21) and (22).


#### 3.4.3. Mathematical Model of Collision Rate

In the WSN, there are generally multiple nodes to seize one channel, which causes occurrence of collision among communication data and transmission failure because some data cannot obtain physical channel before back-off times reaching maximum value.According to the definition ofPik, we know that 1-Pik represents the probability of different priority data detecting that the channel is busy and it also represents probability of different priority data that do not occupy channel when back-off times add one.We can use collision rate to describe failure probability of data transmission, where some data cannot obtain physical channel before back-off times reaching maximum valueKk. Based on above analysis, collision rates of WSN for different priority data can be described as(23)Fk=1-PikKk,where k=0,1,2. Notice that all the parameters and variables, respectively, belong to high, middle, and low priority data when k takes 0, 1, and 2 in (23).


### 3.5. Compare the Proposed Model with IEEE802.15.4e

IEEE802.15.4e can provide a wide range of industrial applications and its core is a medium access technique which uses time synchronization to achieve low power operation and channel hopping to enable high reliability. Several scheduling mechanisms can be envisioned and possibly coexist in the same network for IEEE802.15.4e. For example, two neighbor nodes can adapt the number of cells autonomously by monitoring the amount of traffic and negotiating the allocation to extra cells when needed. The proposed model mainly considers priority of data transmission in node and provides different QoS for different types of communication in smart distribution grid. Advantage of IEEE802.15.4e standard is to establish mechanism of multihop paths among nodes.


### 3.6. The Model of WSN in SDG Communication

Because there are multiple variables from (13a) to (13c), it is difficult to obtain the solutions by solving equations directly. Therefore, an iterative algorithm is adopted to replace scheme solving the multivariate equations directly. There is a certain error between actual result and one of iterative algorithm. However, we can compensate for the deficiency of the iterative algorithm by setting the error accuracy. If the error between calculation results for two consecutive time units is less than the specified value, we think the solutions of the multivariate equations are obtained. The proposed algorithm is shown in Algorithm 1.Algorithm 1:The algorithm for the proposed QoS for WSNs.
Input:Pi/i0,Pi/i1,Pi/i2,k, error;
While error > 10−15;
(1) Compute:Ts0,Ts1,Ts2;
(2) Compute:P0,P1,P2,P3;
(3) Compute:Qn0,n1,n2;
(4) Compute:Pi/i0,Pi/i1,Pi/i2;
(5) Recalculate:Pi0,Pi1,Pi2;
aa
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
0
)
);
bb
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
1
)
);
cc
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
2
)
);
P
i
0
=
P
i
0
+
aa
/
2;
P
i
1
=
P
i
1
+
bb
/
2;
P
i
2
=
P
i
2
+
cc
/
2;
error
=
abs
P
i
0
-
aa
+
abs
P
i
1
-
bb + abs(Pi2-cc);
k
=
k
+
1;
End


## 3.1. Scheduling Model of Multipriority Data

According to the communication standard of power system, the communication data are divided into four types: remote communication, telemetry, remote control, and remote adjustment [12, 13]. Requirements of delay time and correct rate are listed in Table 1 for four types of communication data. From Table 1, we learn that delay time of remote communication data is the shortest among four types of data and it is no more than 10 ms; remote control and remote adjustment data have the same requirements for communication time and they cannot exceed 20 ms to complete communication process; telemetry data has no requirement for communication time.Table 1
Types and requirements for communication data.
Data type
Correct rate
Delay time
Remote control
≥99.99%
≤20 ms
Remote communication
≥99%
≤10 ms
Telemetry
≥98%
x
Remote adjustment
≥99.99%
≤20 msIn traditional 802.15.4 standard, MAC layer supposes two types of channel access ways including slotted CSMA-CA channel access mechanism and unslotted CSMA-CA channel access mechanism, where all the communication data have the same priority and fair opportunity to use channel and obey first come first serve rule.Communication standard of power system stipulates that the data with higher demand of communication time should be transmitted first and the data with lower demand of communication time should be serviced at last, whether WSN is under unsaturated or saturated state. Therefore, the traditional QoS-MAC model based on 802.15.4 standard cannot provide service of classified transmission for different types of communication data. Moreover, the channel access mechanism based on fair competition cannot ensure that all the data are transmitted effectively even if WSN is unsaturated state.In general, the activity in which data disorderly occupy channel easily induces uncertainty of the communication delay between neighbor nodes. If IEEE802.15.4 protocol cannot be improved, the uncertainty of delay time may induce serious consequences; for example,(1) decreases opportunity to send higher priority data and efficiency of power generation and transmission. What is more serious is that if channel is always occupied by lower priority data, some important data are lost and some important operations for smart distribution grid cannot be carried out in time. (2) The disordered competition may induce two types of data always colliding with each other and the other data cannot obtain an opportunity to use channel. Data loss is just one part of the puzzle; the other part is that the collision increases possibilities of channel congestion and network congestion, which may cause distribution grid to separate itself from the main grid, malfunction of power system happens, and large area blackout occurs which results in serious trouble and economic loss.Thus, it is very important to improve the QoS MAC model based on 802.15.4 standard and realize classified transmission for different types of communication data in smart distribution grid.Before the QoS MAC model is established, the communication data of smart distribution grid need to be reclassified. According to requirements of communication time, remote communication, remote control (remote adjustment), and telemetry data can be expressed as high priority, middle priority, and low priority data in accordance with different requirements of communication time, respectively. Thus, research on SDG communication can be converted to study feature of WSN communication and the conversion makes it more convenient to analyze scheduling model of data, calculate the probabilities nodes, send different types of data, and analyze the performance of WSN. In the following sections, remote communication, remote control (remote adjustment), and telemetry data are replaced with high priority, middle priority, and low priority data, respectively.In order to guarantee that the communication data can be sent according to their priorities and positions in the queue, the following tasks need to be completed. The first step is to classify communication data into three types: high priority, middle priority, and low priority data, where three types of data are stored in their respective buffer queues. The second step is to sort the same priority data in the buffering queue according to length of their remaining effective time to accomplish data transmission.Based on the above two steps, the problem of disordered competition for multipriority data can completely be solved. However, traditional IEEE802.15.4 standard cannot, by itself, solve the problems of communication data ordination and classification according to length of their remaining effective time.In order to accomplish data transmission based on different requirements of communication time, high priority, middle priority, and low priority data must obey the following rules during communication process of data transmission.Rule 1.
High priority, middle priority, and low priority data are stored in corresponding buffering queues and the positions that data belong to the same priority are arranged according to remaining effective time to accomplish communication process. It means, in the same priority queue, data with the shortest remaining time are sent first and data with the longest remaining time are finally sent.Rule 2.
High priority data use the shortest fixed back-off time and the most back-off times among three types of data; middle priority data use shorter fixed back-off time and more back-off times than low priority data in Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) channel competition access mechanism. Low priority data adopts random back-off time and the least back-off times which are stipulated by the IEEE802.15.4 standard.Rule 3.
In the Clear Channel Assessment (CCA) channel detection of CSMA/CA, channel detection time must meet the requirements: the node sending high priority data should be set as the shortest channel detection time; the node sending middle priority data should be set as longer channel detection time than the sum of the fixed back-off time and the CCA channel detection time of node sending high priority data; the node sending low priority data should be set as the longest channel detection time which is longer than total sum of the back-off time and the channel detection time of nodes sending high priority data and middle priority data. According to above three rules, the architecture of MAC model based UCCAM is established and shown in Figure1, where it is used to describe process that three types of priority data occupy channel and obtain an opportunity to use channel. From Figure 1, we know that high priority data have more opportunities to use channel than middle priority and low data. Low priority data have the least opportunity to use channel among three types of communication data. Middle priority and low priority data have no opportunity to be sent as long as there are the high priority data in queue. Even if higher priority data does not exist, low priority data have no opportunity to be sent, as long as there are middle priority data in data queue. According to MAC model based on UCCAM, we can further establish scheduling model of multipriority data shown in Figure 2.Figure 1
MAC model based on UCCAM.Figure 2
Scheduling model of multipriority data.From Figure2, we can know that collected data in local node and received data from neighbor nodes are initially disordered, where they obey first come first serve rule and are usually sent according to their positions in buffering queue. After adjustment of the queue scheduling model, data are rearranged in a certain order and sent according to types and remaining effective time, where the uncertainty of delay time is eliminated or decreased distinctly.By using scheduling model, higher priority data possess the higher priority to occupy channel and the ability to interrupt communication process, in which channel sends lower priority data. Thus, the queue scheduling model can improve the transmission efficiency and transmission reliability of the communication data for WSN applied in smart distribution grid whether communication network is unsaturated or saturated state.


## 3.2. QoS Modeling of WSNs Communication System

In this section, the MAC-QoS modeling is discussed for WSN communication system based on the scheduling model of multipriority data. Consider a general wireless sensor network with one coordinator node andN terminal/routing nodes, where all N nodes affect the usage of the wireless channels and every node can communicate with any other nodes. States of buffering queue data always change, because nodes of WSN constantly receive and send data. The Markov chain is a stochastic process with the Markov property. It can thus be used to describe systems that follow a chain of linked events, where what happens in next state depends only on the current state of the system. In smart distribution grid, the data generation rate and traffic rate have the Markov property. From [12], there are different traffic rates in SDG communication, such as 0.6 kpbs, 1.2 kpbs, 2.4 kpbs, 4.8 kpbs, 9.6 kpbs, and 19.2 kpbs. So, change of traffic rate is exponential function. Thus, Markov chain model can be used to describe transition process of data states in node.The transition process and the related probabilities can be expressed and calculated with the help of Markov chain model shown in Figure3. In Figure 3, state (m0,m1,m2) represents that there are m0 high priority, m1 middle priority, and m2 low priority data packets in buffering queue of the node. λ0, λ1, and λ2, respectively, represent the production rates of the high priority, middle priority, and low priority data, respectively. μ0, μ1, and μ2, respectively, represent the traffic rates of the high priority, middle priority, and low priority data. k0, k1, and k2, respectively, represent maximum quantities of high priority, middle priority, and low priority data in buffering queue of the node.Figure 3
State transition of different priority data.From Figure3, we know that quantities of middle priority and low priority data can only increase or remain unchanged but not reduce when there are high priority data in the buffering queue. That is to say, when m0>0, m1 and m2 can only increase or remain unchanged not reduce, until m0=0. When there are only middle priority data and low priority data in the buffering queue, quantity of low priority data can only increase or remain unchanged.SupposePm0,m1,m2 represents the probability of the state (m0,m1,m2), which is only related to former and latter states of buffering queue in the node. When there are no high priority data in buffering queue (m0=0), Pm0,m1,m2 can be described as(1)P0,0,0P0,0,m2P0,0,k2P0,m1,0P0,m1,m2P0,m1,k2P0,k1,0P0,k1,m2P0,k1,k2=101010101011101001101100101101101101100100100101100101μ0P1,m1,m20μ1P0,m1+1,m2λ1P0,m1-1,m2μ2P0,m1,m2+1λ2P0,m1,m2-1010101010111010110011101011101011100011001011001011000μ0λ0μ1λ1μ2λ2.The first term of right hand side of (1) represents states which are associated with states of left hand side and the second term of right hand side of (1) represents influence degree to states of left hand side. When the number of high priority data is larger than zero and less than the upper bound k0, all the expressions of Pm0,m1,m2 can be described as(2)Pm0,0,0Pm0,0,m2Pm0,0,k2Pm0,m1,0Pm0,m1,m2Pm0,m1,k2Pm0,k1,0Pm0,k1,m2Pm0,k1,k2=110000110001110001110100110101110000110100110101110101μ0Pm0+1,m1,m2λ0Pm0-1,m1,m2μ1Pm0,m1+1,m2λ1Pm0,m1-1,m2μ2Pm0,m1,m2+1λ2Pm0,m1,m2-1010101010111010110110101110101110100110001110001110101μ0λ0μ1λ1μ2λ2.The first term of right hand side of (2) represents states which are associated with states of left hand side and the second term of right hand side of (2) represents influence degree to states of left hand side. When the number of high priority data reaches the upper bound k0, all the expressions of Pm0,m1,m2 can be described as(3)Pk0,0,0Pk0,0,m2Pk0,0,k2Pk0,m1,0Pk0,m1,m2Pk0,m1,k2Pk0,k1,0Pk0,k1,m2Pk0,k1,k2=010000010001010001010100010101010101010100010101010101μ0Pm0+1,m1,m2λ0Pm0-1,m1,m2μ1Pm0,m1+1,m2λ1Pm0,m1-1,m2μ2Pm0,m1,m2+1λ2Pm0,m1,m2-1100101100101100100100101100101100100100001100001100000μ0λ0μ1λ1μ2λ2.The first term of right hand side of (3) represents states which are associated with states of left hand side and the second term of right hand side of (3) represents influence degree to states of left hand side. Notice that values of the index notations including m0, m1, and m2 in right hand sides of (1)–(3) should be coincident with the left hand sides. For example, according to (1), we can deduce(4)P0,0,0=μ0P1,m1,m2+μ1P0,m1+1,0+μ2P0,0,m2+1λ0+λ1+λ2.Because m1=0 and m2=0 in the left hand side of (4), m1 and m2 in the right hand side of equation should be replaced with zero, respectively. Thus, (4) can be simplified as(5)P0,0,0=μ0P1,0,0+μ1P0,1,0+μ2P0,0,1λ0+λ1+λ2.From all the expressions related to Pm0,m1,m2, we know that there are altogether four situations that may occur in one node: high priority data are sent, middle priority data are sent, low priority data are sent, or there are no data to be sent. Probabilities of four situations can be expressed by P0, P1, P2, and P3, respectively, and they can further be described as(6a)P0=∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2,(6b)P1=∑m1=1k1∑m2=0k2P0,m1,m2,(6c)P2=∑m2=1k2P0,0,m2,(6d)P3=P0,0,0.For the WSN with N nodes, any one node maybe sends the low priority data, the middle priority data, or high priority data. Of course, it is likely that there are no data to be sent at current moment. When the total number of possible combinations is considered, probability of the state where n0 nodes send the high priority data, n1 nodes send the middle priority data, n2 nodes send the low priority data, and n3 nodes send no data can be described as (7)Qn0,n1,n2=CNn0·CN-n0n1·CN-n0-n1n2·CN-n0-n1-n2n3·P0n0·P1n1·P2n2·P3n3n0=N!·P0n0·P1n1·P2n2·P3n3n0!·n1!·n2!·n3!,where N=n0+n1+n2+n3.


## 3.3. Mathematical Model of Wireless Channel Competition among Adjacent Nodes

In WSNs, the current moment state of communication channel is related to the previous moment channel state. Therefore, calculating the probability channel keeps idle at the current time; previous moment state should be considered. Stipulate thatPi represents probability channel which keeps idle at the current moment and it can be written as(8)Pi=Pi/i·Pi+Pi/b·1-Pi,where Pi/i/Pi/b represents probabilities that channel is idle at the current moment under the premise that channel is idle/busy at the previous moment.Suppose that the average transmission time of data packet in node isTtx. Pi/b is reciprocal relationship with Ttx and it can be described as (9)Pi/b=1Ttx.Substituting (9) into (8) and considering Pi/i=1-Pi/b, Pi can be obtained(10)Pi=11+Ttx·1-Pi/i.According to (10), the probability that different priority data detect that channel is idle can be described as(11)Pik=11+Ttx·1-Pi/ik,where k=0,1,2. Notice that Pi/ik(k=0,1,2) represents the probability that different priority data detect the channel which keeps idle during two continuous time units and it is equal to the probability that the remaining nodes have no opportunity to occupy channel. According to definition of conditional probability, the probability of high priority data detecting the channel which keeps idle during two continuous time units can be defined as ratio between the probabilities that some nodes transmit high priority data and they do not occupy the channel and probabilities that are high priority data are sent in the transmission channel. For the given n0, n1, and n2, the probability of high priority data detecting the channel which keeps idle during two continuous time units can be described as(12)Pi/i0=Qn0,n1,n2Q01-τ0n0-11-τ1n11-τ2n2,where Q0 represents the probabilities that there are high priority data which are transmitted. τ0, τ1, and τ2 represent that probabilities channel is occupied by high priority data, middle priority data, and low priority data. When considering all the possible values for n0, n1, and n2, Pi/i0 can further be rewritten as(13a)Pi/i0=∑n0=1N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2Q01-τ0n0-11-τ1n11-τ2n2.Similarly, Pi/i1 and Pi/i2 can be described as(13b)Pi/i1=∑n0=0N∑n1=1N-n0∑n2=0N-n0-n1Qn0,n1,n2Q11-τ0n01-τ1n1-11-τ2n2,(13c)Pi/i2=∑n0=0N∑n1=0N-n0∑n2=1N-n0-n1Qn0,n1,n2Q21-τ0n01-τ1n11-τ2n2,where Q1 and Q2 represent the probabilities that nodes send middle priority and low priority data.Combining (7) and considering all the possible values for n0, n1, and n2, Q0, Q1, and Q2 can, respectively, further be expressed as(14a)Q0=∑n0=1N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2,(14b)Q1=∑n0=0N∑n1=1N-n0∑n2=0N-n0-n1Qn0,n1,n2,(14c)Q2=∑n0=0N∑n1=0N-n0∑n2=1N-n0-n1Qn0,n1,n2.In (13a)–(13c), τk(k=0,1,2) mainly consists of two parts: one probability is that node occupies channel at current time under the premise that node obtains the opportunity to use channel and transmit corresponding priority data at the previous moment; the other one is that node obtains the opportunity to use channel and transmits corresponding priority data at current time under the premise that node has no opportunity to use channel and transmit corresponding priority data at the previous moment.For different priority data, the probability that data packets obtain channel aftern back-off times can be expressed as (1-Pik)n·Pik(k=0,1,2). Stipulate that Kk(k=0,1,2) represents the maximum back-off times of different priority data packets; Ttxk  (k=0,1,2) represents the average transmission time of different priority data packets; tk(k=0,1,2) represents the channel detection time of different priority data packets.The time that node obtains the opportunity to use channel and transmit corresponding priority data aftern back-off times can be described as ∑m=0n(bmk+tk)+Ttxk, which is a reciprocal relationship to the transmission rate of the corresponding data packets. For given n, the first part can be described as (1-Pik)n·Pik·(n+1)/∑m=0n(bmk+tk)+Ttxk, which represents that node occupies channel at current time under the premise that node obtains the opportunity to use channel and transmit corresponding priority data at the previous moment. When considering all the possible values for n, the first part can be described as ∑n=0Kk-1(1-Pik)n·Pik·(n+1)/∑m=0n(bmk+tk)+Ttxk. Similarly, the second part can further be described as 1-PikKk·Kk/∑m=0Kk-1(bmk+tk), which represents that node obtains the opportunity to use channel and transmit corresponding priority data at current time under the premise that node has no opportunity to use channel and transmit corresponding priority data at the previous moment. Therefore, τk can be described as(15)τk=∑n=0Kk-11-Pikn·Pik·n+1∑m=0nbmk+tk+Ttxk+1-PikKk·Kk∑m=0Kk-1bmk+tk,where k=0,1,2.Consumption of data transmission time mainly includes CSMA-CA back-off and transmission time in MAC layer protocol based on IEEE802.15.4 standard. When calculating data transmission time, two cases need to be considered. One is that node obtains opportunity to send corresponding priority data; the other one is that node has no opportunity to send corresponding priority data. From above analysis, we know that[∑m=0n(bmk+tk)+Ttxk] represents waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value Kk. Taking into account the occurrence probability for the situation, the waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value can be described as (1-Pik)n·Pik·[∑m=0n(bmk+tk)+Ttxk]. When all the possible values are considered for n, the waiting time that nodes sending different priority data obtain opportunity to use communication channel before the back-off times arriving at the maximum value can further be described as ∑n=0Kk-1(1-Pik)n·Pik·[∑m=0n(bmk+tk)+Ttxk]. Similarly, the waiting time that node has no chance to send corresponding priority data before the back-off times arriving at the maximum value can be described as (1-Pik)Kk·∑m=0Kk-1(bmk+tk). Thus, the average time that nodes send different priority data packets can be expressed as(16)Tsk=∑n=0Kk-11-Pikn·Pik·∑m=0nbmk+tk+Ttxk+1-PikKk·∑m=0Kk-1bmk+tk,where k=0,1,2.Notice that all the parameters and variables, respectively, belong to high priority, middle priority, and low priority data whenk takes 0, 1, and 2 from (11) to (16).


## 3.4. The Model of WSN in SDG Communication

In WSN withN nodes, each node affects communication qualities of other ones during the process of data transmission. These effects mainly include delay time, effective throughput rate, and channel collision rate.


### 3.4.1. Mathematical Model of Delay Time

The transmission delay timeTd0 of high priority data in the WSN for SDG communication mainly includes the waiting and transmitting time of data in high priority buffering queue. Td0 can be described as m0·Ts0 and it is only related to m0 quantity of high priority data in buffering queue for a given state. However, the position of existing high priority data in buffering queue needs to be considered when calculating Td0. m0·Ts0 is only one of all possible situations. For given m0, m1, and m2, Td0 can be described as(17)Td0=Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.When all the possible values are considered for m0, m1, and m2, Td0 can be rewritten as(18)Td0=∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.The transmission delay time Td1 of middle priority data in the WSN of SDG communication has similar form and can be described as(19)Td1=11-λ0·Ts0∑m1=1k1∑m2=0k2∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2+∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2·m1·Ts1∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2.The first term of the right hand side of (19) represents transmission delay time of the high priority data including high priority buffering queue at the current moment, and newly generated ones during the process that node sends high priority and middle priority data, where 1/1-λ0·Ts0 represents influence coefficient of newly generated high priority data. The second term of the right hand side of the equation represents the waiting and transmission time of data in middle priority buffering queue. In (19), Td1 is not only related to quantity and the position of existing middle priority data in buffering queue, but also related to existing high priority data in buffering queue and newly generated ones including collected data in local node and received data from neighbor nodes.The transmission delay timeTd2 of low priority data in the WSN of SDG communication can be described as(20)Td2=11-λ0·Ts0∑m2=1k2∑m1=0k1∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+11-λ1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2P0,m1,m2·m1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+∑m0=0k0∑m1=0k1∑m2=1k2P0,0,m2·m2·Ts2∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2.The first term of the right hand side of (20) represents transmission delay time of the high priority data including high priority buffering queue and newly generated ones during the process that node sends low priority, middle priority, and high priority data. The second term of the right hand side of (20) represents transmission delay time of the middle priority data including middle priority buffering queue and newly generated ones during the process that node sends high, middle, and low priority data, where 1/1-λ0·Ts0 and 1/1-λ1·Ts1, respectively, represents influence coefficients of newly generated high priority and middle priority data. The third term of the right hand side of (20) represents waiting and transmitting time of data in low priority buffering queue.From (20), we can know that Td2 is not only related with quantity and the position of existing low priority data in buffering queue, but also related to existing high priority and middle data in buffering queue and newly generated ones.


### 3.4.2. Mathematical Model of Effective Throughput Rate

In (11), Pik represents probabilities of different priority data detecting that channel is idle. Thus, 1-Pik represents probabilities of different priority data detecting that the channel is busy. And nk·[1-(1-Pik)Kk]·Lk can be regarded as bytes that different priority data are sent successfully. 1/Tsk can be regarded as traffic rate. Considering all the possible values for m0, m1, and m2, the throughput rate for different priority data packets can be rewritten as(21)Tk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLkTsk,where Lk(k=0,1,2) represents the length of different priority data packets.In the WSN for SDG communication, we usually use the effective throughput rate to describe the ratio between throughput amount of effective transmission data and total output data, and it is one of the important indicators to measure whether the transmission performance of WSN is excellent or not. The effective throughput rate is more direct to describe the successful rate of data transmission than throughput rate.Throughput effective rate by which node sends different priority data packets can be described as(22)Gk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLk/TskN·λk,where N represents the number of WSN nodes and λk represents the total production rate of single node for different priority data. Notice that all the parameters and variables, respectively, belong to high priority, middle priority, and low priority data when k takes 0, 1, and 2 in (21) and (22).


### 3.4.3. Mathematical Model of Collision Rate

In the WSN, there are generally multiple nodes to seize one channel, which causes occurrence of collision among communication data and transmission failure because some data cannot obtain physical channel before back-off times reaching maximum value.According to the definition ofPik, we know that 1-Pik represents the probability of different priority data detecting that the channel is busy and it also represents probability of different priority data that do not occupy channel when back-off times add one.We can use collision rate to describe failure probability of data transmission, where some data cannot obtain physical channel before back-off times reaching maximum valueKk. Based on above analysis, collision rates of WSN for different priority data can be described as(23)Fk=1-PikKk,where k=0,1,2. Notice that all the parameters and variables, respectively, belong to high, middle, and low priority data when k takes 0, 1, and 2 in (23).


## 3.4.1. Mathematical Model of Delay Time

The transmission delay timeTd0 of high priority data in the WSN for SDG communication mainly includes the waiting and transmitting time of data in high priority buffering queue. Td0 can be described as m0·Ts0 and it is only related to m0 quantity of high priority data in buffering queue for a given state. However, the position of existing high priority data in buffering queue needs to be considered when calculating Td0. m0·Ts0 is only one of all possible situations. For given m0, m1, and m2, Td0 can be described as(17)Td0=Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.When all the possible values are considered for m0, m1, and m2, Td0 can be rewritten as(18)Td0=∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2∑m0=1k0∑m1=0k1∑m2=0k2Pm0,m1,m2m0·Ts0.The transmission delay time Td1 of middle priority data in the WSN of SDG communication has similar form and can be described as(19)Td1=11-λ0·Ts0∑m1=1k1∑m2=0k2∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2+∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2·m1·Ts1∑m0=0k0∑m1=1k1∑m2=0k2Pm0,m1,m2.The first term of the right hand side of (19) represents transmission delay time of the high priority data including high priority buffering queue at the current moment, and newly generated ones during the process that node sends high priority and middle priority data, where 1/1-λ0·Ts0 represents influence coefficient of newly generated high priority data. The second term of the right hand side of the equation represents the waiting and transmission time of data in middle priority buffering queue. In (19), Td1 is not only related to quantity and the position of existing middle priority data in buffering queue, but also related to existing high priority data in buffering queue and newly generated ones including collected data in local node and received data from neighbor nodes.The transmission delay timeTd2 of low priority data in the WSN of SDG communication can be described as(20)Td2=11-λ0·Ts0∑m2=1k2∑m1=0k1∑m0=0k0Pm0,m1,m2·m0·Ts0∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+11-λ1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2P0,m1,m2·m1·Ts1∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2+∑m0=0k0∑m1=0k1∑m2=1k2P0,0,m2·m2·Ts2∑m0=0k0∑m1=0k1∑m2=1k2Pm0,m1,m2.The first term of the right hand side of (20) represents transmission delay time of the high priority data including high priority buffering queue and newly generated ones during the process that node sends low priority, middle priority, and high priority data. The second term of the right hand side of (20) represents transmission delay time of the middle priority data including middle priority buffering queue and newly generated ones during the process that node sends high, middle, and low priority data, where 1/1-λ0·Ts0 and 1/1-λ1·Ts1, respectively, represents influence coefficients of newly generated high priority and middle priority data. The third term of the right hand side of (20) represents waiting and transmitting time of data in low priority buffering queue.From (20), we can know that Td2 is not only related with quantity and the position of existing low priority data in buffering queue, but also related to existing high priority and middle data in buffering queue and newly generated ones.


## 3.4.2. Mathematical Model of Effective Throughput Rate

In (11), Pik represents probabilities of different priority data detecting that channel is idle. Thus, 1-Pik represents probabilities of different priority data detecting that the channel is busy. And nk·[1-(1-Pik)Kk]·Lk can be regarded as bytes that different priority data are sent successfully. 1/Tsk can be regarded as traffic rate. Considering all the possible values for m0, m1, and m2, the throughput rate for different priority data packets can be rewritten as(21)Tk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLkTsk,where Lk(k=0,1,2) represents the length of different priority data packets.In the WSN for SDG communication, we usually use the effective throughput rate to describe the ratio between throughput amount of effective transmission data and total output data, and it is one of the important indicators to measure whether the transmission performance of WSN is excellent or not. The effective throughput rate is more direct to describe the successful rate of data transmission than throughput rate.Throughput effective rate by which node sends different priority data packets can be described as(22)Gk=∑n0=0N∑n1=0N-n0∑n2=0N-n0-n1Qn0,n1,n2nk1-1-PikKkLk/TskN·λk,where N represents the number of WSN nodes and λk represents the total production rate of single node for different priority data. Notice that all the parameters and variables, respectively, belong to high priority, middle priority, and low priority data when k takes 0, 1, and 2 in (21) and (22).


## 3.4.3. Mathematical Model of Collision Rate

In the WSN, there are generally multiple nodes to seize one channel, which causes occurrence of collision among communication data and transmission failure because some data cannot obtain physical channel before back-off times reaching maximum value.According to the definition ofPik, we know that 1-Pik represents the probability of different priority data detecting that the channel is busy and it also represents probability of different priority data that do not occupy channel when back-off times add one.We can use collision rate to describe failure probability of data transmission, where some data cannot obtain physical channel before back-off times reaching maximum valueKk. Based on above analysis, collision rates of WSN for different priority data can be described as(23)Fk=1-PikKk,where k=0,1,2. Notice that all the parameters and variables, respectively, belong to high, middle, and low priority data when k takes 0, 1, and 2 in (23).


## 3.5. Compare the Proposed Model with IEEE802.15.4e

IEEE802.15.4e can provide a wide range of industrial applications and its core is a medium access technique which uses time synchronization to achieve low power operation and channel hopping to enable high reliability. Several scheduling mechanisms can be envisioned and possibly coexist in the same network for IEEE802.15.4e. For example, two neighbor nodes can adapt the number of cells autonomously by monitoring the amount of traffic and negotiating the allocation to extra cells when needed. The proposed model mainly considers priority of data transmission in node and provides different QoS for different types of communication in smart distribution grid. Advantage of IEEE802.15.4e standard is to establish mechanism of multihop paths among nodes.


## 3.6. The Model of WSN in SDG Communication

Because there are multiple variables from (13a) to (13c), it is difficult to obtain the solutions by solving equations directly. Therefore, an iterative algorithm is adopted to replace scheme solving the multivariate equations directly. There is a certain error between actual result and one of iterative algorithm. However, we can compensate for the deficiency of the iterative algorithm by setting the error accuracy. If the error between calculation results for two consecutive time units is less than the specified value, we think the solutions of the multivariate equations are obtained. The proposed algorithm is shown in Algorithm 1.Algorithm 1:The algorithm for the proposed QoS for WSNs.
Input:Pi/i0,Pi/i1,Pi/i2,k, error;
While error > 10−15;
(1) Compute:Ts0,Ts1,Ts2;
(2) Compute:P0,P1,P2,P3;
(3) Compute:Qn0,n1,n2;
(4) Compute:Pi/i0,Pi/i1,Pi/i2;
(5) Recalculate:Pi0,Pi1,Pi2;
aa
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
0
)
);
bb
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
1
)
);
cc
=
1
/
(
(
1
+
T
t
x
0
+
T
t
x
1
+
T
t
x
2
)
/
3
⋅
(
1
-
P
i
/
i
2
)
);
P
i
0
=
P
i
0
+
aa
/
2;
P
i
1
=
P
i
1
+
bb
/
2;
P
i
2
=
P
i
2
+
cc
/
2;
error
=
abs
P
i
0
-
aa
+
abs
P
i
1
-
bb + abs(Pi2-cc);
k
=
k
+
1;
End


## 4. Performance Evaluations

In this section, performance of the WSN with new MAC-QoS mode based on IEEE802.15.4 protocol proposed in preceding sections will be evaluated.The simulation configuration consists of one coordinator node and 10 terminal/routing nodes in WSN. The 10 terminal/routing nodes are uniformly arranged in WSN. The coordinator node is arranged at most remote location, which can ensure that route distance is long enough and the simulation results are not affected. Constant bit rate (CBR) traffic is used to generate communication traffic for high priority data and change bit rate traffic is used to generate communication traffic for low priority and middle priority data when performance of the proposed model is evaluated.There are two states for change bit rate traffic of low priority and middle priority data according to functional specification of distribution automation system.The whole simulation mainly includes two parts: the first part is to validate that the proposed mode can provide different QoS for different priority data and the second part is to compare the performance of the proposed QoS mode to IEEE802.15.4e standard and literature [24]. The reason is that literature [24] published in 2013 represents one of the latest findings and IEEE802.15.4e can provide a wide range of industrial applications because of low power operation and high reliability.In order to realize that different priority data have different types of priorities to use channel, a multiqueue priority policy is established and it is implemented by the queuing manager module as described in Algorithm2. Three separate queues are used to store packets from the high priority queue to low one. The high priority queue, HQ, is used by high priority packets, the middle priority queue, MQ, is used by middle priority packets, and the low priority queue, LQ, is used by low packets.Algorithm 2:The algorithm for the queuing manager.
for each packet receipt
if  packet.type = high then
arrange packet at the end of data queue in HQ
m0=m0+1
else
if packet.type = middle then
arrange packet at the end of data queue in MQ
m1=m1+1
else
arrange packet at the end of data queue in LQ
end
m2=m2+1
for each packet departure
if packet.type = high then
m0=m0-1
else
if packet.type = middle then
m1=m1-1
else
m2=m2-1
endTo validate the performance of our proposed QoS model, we have evaluated it through extensive simulations with Matlab/Simulink.Each value of simulation results is the average of sixteen measurements with a 95 percent of confidence interval for output waveforms, where the average of sixteen measurements can be considered as a mathematical expectation and the standard variance is replaced by the sample variance.


### 4.1. Simulation Setup

For the first part of simulation, the following three cases are investigated: case (i), low production rate where network communication of WSN is in an unsaturated state; case (ii), moderate production rate where communication network of WSN is in saturated state; case (iii), high production rate where communication network of WSN is in supersaturated state. In three cases, we sett0=10 symbols, t1=50 symbols, t2=80 symbols, bm0=20 symbols, and bm1=10 symbol. The back-off time bm2 of low priority data takes random value which is between two and four. The maximum back-off times K0, K1, and K2 are set as 10, 6, and 3, respectively. Stipulate that individual packet of high, middle, and low priority data have the same length, L0=L1=L2=92 bytes.Traffic rates and production rates are set according to functional specification of distribution automation system in [12].In case (i), we setλ0=4.8 kbps; λ1 and λ2 increase from 0.6 kbps to 4.8 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, and 3 successively.In case (ii), we setλ0=9.6 kbps; λ1 and λ2 increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (iii), we setλ0=19.2kbps; λ1 and λ2 increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.For the second part of simulation, the following four cases are investigated: case (iv), low production rate where communication network is in an unsaturated state and there are only low priority data in communication network.Case (v) is low production rate where communication network is in an unsaturated state and there are low priority and middle priority data in communication network.Case (vi) is moderate production rate where communication network is in saturated state and there are three types of priority data in communication network.Case (vii) is high production rate where communication network is in supersaturated state and three are three types of priority data in communication network.In case (iv), we setλ0=0 kbps and λ1=0 kbps; λ2 gradually increases from 0.6 kbps to 19.2 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, 4, and 5 successively.In case (v), we setλ0=0 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (vi), we setλ0=9.6 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (vii), we setλ0=19.2 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.The remaining parameters have the same value with the first part of simulation.


### 4.2. Simulation Results

The performance evaluation of the proposed QoS mode is illustrated in Figures4–6 for case (i), case (ii), and case (iii), respectively. Figure 4 shows that all the communication data can be transmitted effectively, where communication data rarely have the opportunity to collide with each other and do not need to waste too much time to wait for transmission because communication network is in an unsaturated state.Figure 4
Results of performance evaluation of proposed QoS mode for case (i): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Figure 5
Results of performance evaluation using proposed QoS mode for case (ii): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Figure 6
Results of performance evaluation using proposed QoS mode for case (iii): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)From Figures4(a)–4(c), the delay times of three types of priority data begin to increase with growth of λ1 and λ2. Delay times of three types of priority data are less than 6.5 ms when λ0, λ1, and λ2 simultaneously reach 4.8 kbps. However, the maximum delay time of high priority is less than ones of middle priority and low priority data, and the maximum delay time of low priority data is the longest among three types of priority data. From Figures 4(d)–4(f), collision rates of three types of priority data are close to zero initially. When λ1 and λ2 suddenly increase from 2.4 kbps to 4.8 kbps, collision rates of three types of priority data have a sharp increase. But the maximum collision rate of high priority is less than ones of middle priority and low priority data, and collision rate of low priority data is the highest among three types of priority data. From Figures 4(g)-4(h), initially effective throughput rates of three types of priority data are close to 1. When λ1 and λ2 simultaneously increase to 4.8 kbps, effective throughput rate of high priority data almost remains unchanged; there is a slight decrease for effective throughput rate of middle priority data; and effective throughput rate of low priority data falls from 0.94 to around 0.91. Therefore, the proposed model can provide different QoS for different priority data in case (i), where WSN is in an unsaturated state.Simulation results are shown in Figure5 for case (ii), where WSN is in the saturated state. There are two stages in this experiment. During the first stage, λ1 and λ2 gradually increase from 0.6 kbps to 4.8 kbps, which can be regarded as the normal operation of smart distribution grid. λ1 and λ2 suddenly increase from 4.8 kbps to 9.6 kbps in the second stage, which represents that there are some faults in power system.Comparing Figure5 to Figure 4, delay time of three types of priority data increases as the production rates of three types of priority data increase. There are different increasing degrees for three types of priority data in case (ii). Delay time of high priority data increases to around 6.3 ms. However, delay time of middle priority and low priority data increases from 5.5 ms to 32 ms and from 6.4 ms to 36 ms, respectively. The delay time of high priority data is the shortest among three types of priority data, and the delay time of low priority data is longer than ones of middle priority data. Results show that communication speed of high priority data is quicker than ones of middle priority and low priority data.Collision rates of three types of priority data continually increase with growth ofλ1 and λ2 in case (ii), where the collision rate of high priority data is far less than ones of low and middle priority data. The collision rate of middle priority data reaches 0.23 and the collision rate of low priority data reaches around 0.33, when λ1 and λ2 simultaneously increase to 9.6 kbps. Results show that high priority data hardly have opportunity to collide with each other or with low and middle priority data.High priority data maintains a high effective throughput rate and its value exceeds 0.95, even if the production rates of low priority, middle priority, and high priority data simultaneously reach to 9.6 kbps. However, effective throughput rates of low and middle priority data fall to 0.7 and 0.63, respectively, whenλ1 and λ2 suddenly increase from 4.8 kbps to 9.6 kbps. Results show that the high priority data are almost sent effectively. Some low and middle priority data are discarded during communication period.From simulation results of the case (ii), we can know that the proposed model can provide different QoS for different priority data when the WSN is in saturated state.Simulation results are shown in Figure6 for case (iii). In this experiment, network communication of WSN is in the supersaturated state. In case (iii), delay time of high priority data almost remains unchanged and only increases from 6.2 ms to 7.1 ms; delay time of middle priority data has obvious augmentation and its value increases to 41 ms; delay time of low priority data increases sharply from 32 ms to 57 ms when λ0=19.2 kbps; λ1 and λ2 increase from 4.8 kbps to 9.6 kbps simultaneously.The maximum collision rate of high priority data remains rather low value and is around 0.11, but ones of middle priority and low priority data, respectively, exceed 0.32 and 0.53 when production rates of three types of priority data simultaneously reach the maximum values. Results show that collision probability of high priority data is far lower than ones of low and middle priority data. Effective throughput rate of high priority data still exceeds 0.9. However, minimum effective throughput rates of middle priority and low priority fall to 0.5 and about 0.3, respectively. From simulation results of the case (iii), the proposed model can provide different QoS for different types of data, even if the WSN is in supersaturated state.Therefore, the proposed QoS model can provide different QoS for different priority data in any case.The proposed model can ensure that all the data are effectively transmitted when WSN is unsaturated state and the higher priority data are transmitted first and the lower priority data are serviced at last, when WSN is under supersaturated or saturated state.In the second part of simulation, the comparative results of three different methods including the proposed model, IEEE802.15.4e standard, and the hybrid MAC model mentioned in [24] are analyzed and illustrated.Simulation results are shown in Figure7 for case (iv). When production rate of data grows, all the average delay time for three algorithms increases in Figure 7(a). The average delay times of proposed method increase to around 4.8 ms and are less than the hybrid MAC protocols. The average delay time of IEEE802.15.4e standard is shortest among three methods.Figure 7
Comparison of three methods for case (iv): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In Figure7(b), the variation of collision rate with growth of λ2 is shown. Before λ2 reaches 9.6 kbps, collision rates of three different methods maintain zero, because there are only a small amount of data in the network, where they hardly have an opportunity to collide with each other. After λ2 suddenly reaches 19.6 kbps, collision rates of three protocols begin to increase. Collision rate of the proposed method is lower than the hybrid MAC protocol and higher than IEEE802.15.4e standard.In Figure7(c), effective throughput rates of three methods have little change before λ2 reaches 9.6 kbps. After λ2 reaches 9.6 kbps, all the effective throughput rates of three protocols begin to increase with sudden increase of λ2. The effective throughput rate of IEEE802.15.4e standard is the highest and one of the hybrid MAC protocols is the lowest among three methods in case (iv).In the case (iv), the simulation results including average delay, collision rate, and effective throughput rate show that the proposed method has the better performance than the hybrid MAC protocol and lower performance than IEEE802.15.4e standard when there is only one type of data in the queue of node where WSN is in an unsaturated state.The reason is that there is only one type of communication data in the communication network and advantage of the proposed model cannot be displayed and IEEE802.15.4e standard has a routing advantage than the proposed model.Simulation results are shown in Figure8 for case (v), where the total production rates remain unchanged, but the types of data are increased. From Figure 8(a), we know that delay time of three methods keeps increasing as production rates of middle priority and low priority data increase. Delay time of the proposed model is the shortest among three methods and less than 5 ms. In Figure 8(b), collision rate of the proposed model is the lowest among three methods and is around 0.02 when λ1 and λ2 simultaneously reach 9.6 kbps. In Figure 8(c), the effective throughput rate of the proposed model is the highest among three methods and more than 0.99. Effective throughput rates of hybrid MAC protocol and IEEE802.15.4e standard l fall to 0.97 and 0.985 when λ1 and λ2 simultaneously reach 9.6 kbps. The proposed model has the better performance than the other two methods in case (v). The advantage of IEEE802.15.4e standard decreases as the type of transmission data increases.Figure 8
Comparison of three methods for case (v): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)Simulation results are shown in Figure9 for case (vi), where there are three types of priority data in WSN. The delay time of three protocols increases with the growth of production rate and type of data further in Figure 9(a). The average delay time of proposed method increases to around 11 ms and less than ones of the other two methods, when λ0, λ1, and λ2 reach to 9.6 kbps simultaneously. In Figure 9(b), the collision rate of proposed method almost increases to around 0.15 and is still the lowest among three protocols. In Figure 9(c), effective throughput rate of proposed method only falls to about 0.85 and still keeps the maximum value among three protocols, when λ0, λ1, and λ2 simultaneously increase to maximum values.Figure 9
Comparison of three methods for case (vi): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In case (vii), production rate of high priority data increases further to 19.2 kbps, where WSN is under supersaturated state. Simulation results are shown in Figure10 for case (vii). In Figure 10(a), average delay time of the proposed model increases to around 15 ms and is still lower than ones of IEEE802.15.4e standard and hybrid MAC protocol. In Figure 10(b), the collision rate of proposed method almost increases to around 0.35. However, the collision rates of IEEE802.15.4e standard and hybrid MAC protocol increase to 0.52 and 0.7, when the production rates of three types of data simultaneously increase to maximum value.Figure 10
Comparison of three methods for case (vii): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In Figure10(c), effective throughput rate of proposed method falls to around 0.62 and is far higher than ones of IEEE802.15.4e standard and hybrid MAC protocol.Successful sending rates of the proposed model are shown in Figure11, where output waveforms with a 95 percent of confidence interval are used to describe the stabilities of communication for high priority, middle priority, and low priority data for case (vi) and case (vii).Figure 11
Successful sending rates for case (vi) and case (vii): (a) high priority data, (b) middle priority data, and (c) low priority data.
(a)
(b)
(c)Comparing Figures11(a), 11(b), and 11(c), we know that successful sending rates of high priority data are higher than ones of middle priority and low priority data. Successful sending rates of low priority data are the lowest among three types of data in case (vi) and case (vii).From simulation results for case (iv), case (v), case (vi), and case (vii), we can know that advantage of the proposed model is more and more obvious with growth of the type of data and production rate.


## 4.1. Simulation Setup

For the first part of simulation, the following three cases are investigated: case (i), low production rate where network communication of WSN is in an unsaturated state; case (ii), moderate production rate where communication network of WSN is in saturated state; case (iii), high production rate where communication network of WSN is in supersaturated state. In three cases, we sett0=10 symbols, t1=50 symbols, t2=80 symbols, bm0=20 symbols, and bm1=10 symbol. The back-off time bm2 of low priority data takes random value which is between two and four. The maximum back-off times K0, K1, and K2 are set as 10, 6, and 3, respectively. Stipulate that individual packet of high, middle, and low priority data have the same length, L0=L1=L2=92 bytes.Traffic rates and production rates are set according to functional specification of distribution automation system in [12].In case (i), we setλ0=4.8 kbps; λ1 and λ2 increase from 0.6 kbps to 4.8 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, and 3 successively.In case (ii), we setλ0=9.6 kbps; λ1 and λ2 increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (iii), we setλ0=19.2kbps; λ1 and λ2 increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.For the second part of simulation, the following four cases are investigated: case (iv), low production rate where communication network is in an unsaturated state and there are only low priority data in communication network.Case (v) is low production rate where communication network is in an unsaturated state and there are low priority and middle priority data in communication network.Case (vi) is moderate production rate where communication network is in saturated state and there are three types of priority data in communication network.Case (vii) is high production rate where communication network is in supersaturated state and three are three types of priority data in communication network.In case (iv), we setλ0=0 kbps and λ1=0 kbps; λ2 gradually increases from 0.6 kbps to 19.2 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, 4, and 5 successively.In case (v), we setλ0=0 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (vi), we setλ0=9.6 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.In case (vii), we setλ0=19.2 kbps; λ1 and λ2 both increase from 0.6 kbps to 9.6 kbps by exponential function ρ0·2m, where ρ0=0.6 and m takes 0, 1, 2, 3, and 4 successively.The remaining parameters have the same value with the first part of simulation.


## 4.2. Simulation Results

The performance evaluation of the proposed QoS mode is illustrated in Figures4–6 for case (i), case (ii), and case (iii), respectively. Figure 4 shows that all the communication data can be transmitted effectively, where communication data rarely have the opportunity to collide with each other and do not need to waste too much time to wait for transmission because communication network is in an unsaturated state.Figure 4
Results of performance evaluation of proposed QoS mode for case (i): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Figure 5
Results of performance evaluation using proposed QoS mode for case (ii): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Figure 6
Results of performance evaluation using proposed QoS mode for case (iii): (a) delay time of high priority data, (b) delay time of middle priority data, (c) delay time of low priority data, (d) collision rate of high priority data, (e) collision rate of middle priority data, (f) collision rate of low priority data, (g) effective throughput rate of high priority data, (h) effective throughput rate of middle priority data, and (i) effective throughput rate of low priority data.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)From Figures4(a)–4(c), the delay times of three types of priority data begin to increase with growth of λ1 and λ2. Delay times of three types of priority data are less than 6.5 ms when λ0, λ1, and λ2 simultaneously reach 4.8 kbps. However, the maximum delay time of high priority is less than ones of middle priority and low priority data, and the maximum delay time of low priority data is the longest among three types of priority data. From Figures 4(d)–4(f), collision rates of three types of priority data are close to zero initially. When λ1 and λ2 suddenly increase from 2.4 kbps to 4.8 kbps, collision rates of three types of priority data have a sharp increase. But the maximum collision rate of high priority is less than ones of middle priority and low priority data, and collision rate of low priority data is the highest among three types of priority data. From Figures 4(g)-4(h), initially effective throughput rates of three types of priority data are close to 1. When λ1 and λ2 simultaneously increase to 4.8 kbps, effective throughput rate of high priority data almost remains unchanged; there is a slight decrease for effective throughput rate of middle priority data; and effective throughput rate of low priority data falls from 0.94 to around 0.91. Therefore, the proposed model can provide different QoS for different priority data in case (i), where WSN is in an unsaturated state.Simulation results are shown in Figure5 for case (ii), where WSN is in the saturated state. There are two stages in this experiment. During the first stage, λ1 and λ2 gradually increase from 0.6 kbps to 4.8 kbps, which can be regarded as the normal operation of smart distribution grid. λ1 and λ2 suddenly increase from 4.8 kbps to 9.6 kbps in the second stage, which represents that there are some faults in power system.Comparing Figure5 to Figure 4, delay time of three types of priority data increases as the production rates of three types of priority data increase. There are different increasing degrees for three types of priority data in case (ii). Delay time of high priority data increases to around 6.3 ms. However, delay time of middle priority and low priority data increases from 5.5 ms to 32 ms and from 6.4 ms to 36 ms, respectively. The delay time of high priority data is the shortest among three types of priority data, and the delay time of low priority data is longer than ones of middle priority data. Results show that communication speed of high priority data is quicker than ones of middle priority and low priority data.Collision rates of three types of priority data continually increase with growth ofλ1 and λ2 in case (ii), where the collision rate of high priority data is far less than ones of low and middle priority data. The collision rate of middle priority data reaches 0.23 and the collision rate of low priority data reaches around 0.33, when λ1 and λ2 simultaneously increase to 9.6 kbps. Results show that high priority data hardly have opportunity to collide with each other or with low and middle priority data.High priority data maintains a high effective throughput rate and its value exceeds 0.95, even if the production rates of low priority, middle priority, and high priority data simultaneously reach to 9.6 kbps. However, effective throughput rates of low and middle priority data fall to 0.7 and 0.63, respectively, whenλ1 and λ2 suddenly increase from 4.8 kbps to 9.6 kbps. Results show that the high priority data are almost sent effectively. Some low and middle priority data are discarded during communication period.From simulation results of the case (ii), we can know that the proposed model can provide different QoS for different priority data when the WSN is in saturated state.Simulation results are shown in Figure6 for case (iii). In this experiment, network communication of WSN is in the supersaturated state. In case (iii), delay time of high priority data almost remains unchanged and only increases from 6.2 ms to 7.1 ms; delay time of middle priority data has obvious augmentation and its value increases to 41 ms; delay time of low priority data increases sharply from 32 ms to 57 ms when λ0=19.2 kbps; λ1 and λ2 increase from 4.8 kbps to 9.6 kbps simultaneously.The maximum collision rate of high priority data remains rather low value and is around 0.11, but ones of middle priority and low priority data, respectively, exceed 0.32 and 0.53 when production rates of three types of priority data simultaneously reach the maximum values. Results show that collision probability of high priority data is far lower than ones of low and middle priority data. Effective throughput rate of high priority data still exceeds 0.9. However, minimum effective throughput rates of middle priority and low priority fall to 0.5 and about 0.3, respectively. From simulation results of the case (iii), the proposed model can provide different QoS for different types of data, even if the WSN is in supersaturated state.Therefore, the proposed QoS model can provide different QoS for different priority data in any case.The proposed model can ensure that all the data are effectively transmitted when WSN is unsaturated state and the higher priority data are transmitted first and the lower priority data are serviced at last, when WSN is under supersaturated or saturated state.In the second part of simulation, the comparative results of three different methods including the proposed model, IEEE802.15.4e standard, and the hybrid MAC model mentioned in [24] are analyzed and illustrated.Simulation results are shown in Figure7 for case (iv). When production rate of data grows, all the average delay time for three algorithms increases in Figure 7(a). The average delay times of proposed method increase to around 4.8 ms and are less than the hybrid MAC protocols. The average delay time of IEEE802.15.4e standard is shortest among three methods.Figure 7
Comparison of three methods for case (iv): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In Figure7(b), the variation of collision rate with growth of λ2 is shown. Before λ2 reaches 9.6 kbps, collision rates of three different methods maintain zero, because there are only a small amount of data in the network, where they hardly have an opportunity to collide with each other. After λ2 suddenly reaches 19.6 kbps, collision rates of three protocols begin to increase. Collision rate of the proposed method is lower than the hybrid MAC protocol and higher than IEEE802.15.4e standard.In Figure7(c), effective throughput rates of three methods have little change before λ2 reaches 9.6 kbps. After λ2 reaches 9.6 kbps, all the effective throughput rates of three protocols begin to increase with sudden increase of λ2. The effective throughput rate of IEEE802.15.4e standard is the highest and one of the hybrid MAC protocols is the lowest among three methods in case (iv).In the case (iv), the simulation results including average delay, collision rate, and effective throughput rate show that the proposed method has the better performance than the hybrid MAC protocol and lower performance than IEEE802.15.4e standard when there is only one type of data in the queue of node where WSN is in an unsaturated state.The reason is that there is only one type of communication data in the communication network and advantage of the proposed model cannot be displayed and IEEE802.15.4e standard has a routing advantage than the proposed model.Simulation results are shown in Figure8 for case (v), where the total production rates remain unchanged, but the types of data are increased. From Figure 8(a), we know that delay time of three methods keeps increasing as production rates of middle priority and low priority data increase. Delay time of the proposed model is the shortest among three methods and less than 5 ms. In Figure 8(b), collision rate of the proposed model is the lowest among three methods and is around 0.02 when λ1 and λ2 simultaneously reach 9.6 kbps. In Figure 8(c), the effective throughput rate of the proposed model is the highest among three methods and more than 0.99. Effective throughput rates of hybrid MAC protocol and IEEE802.15.4e standard l fall to 0.97 and 0.985 when λ1 and λ2 simultaneously reach 9.6 kbps. The proposed model has the better performance than the other two methods in case (v). The advantage of IEEE802.15.4e standard decreases as the type of transmission data increases.Figure 8
Comparison of three methods for case (v): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)Simulation results are shown in Figure9 for case (vi), where there are three types of priority data in WSN. The delay time of three protocols increases with the growth of production rate and type of data further in Figure 9(a). The average delay time of proposed method increases to around 11 ms and less than ones of the other two methods, when λ0, λ1, and λ2 reach to 9.6 kbps simultaneously. In Figure 9(b), the collision rate of proposed method almost increases to around 0.15 and is still the lowest among three protocols. In Figure 9(c), effective throughput rate of proposed method only falls to about 0.85 and still keeps the maximum value among three protocols, when λ0, λ1, and λ2 simultaneously increase to maximum values.Figure 9
Comparison of three methods for case (vi): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In case (vii), production rate of high priority data increases further to 19.2 kbps, where WSN is under supersaturated state. Simulation results are shown in Figure10 for case (vii). In Figure 10(a), average delay time of the proposed model increases to around 15 ms and is still lower than ones of IEEE802.15.4e standard and hybrid MAC protocol. In Figure 10(b), the collision rate of proposed method almost increases to around 0.35. However, the collision rates of IEEE802.15.4e standard and hybrid MAC protocol increase to 0.52 and 0.7, when the production rates of three types of data simultaneously increase to maximum value.Figure 10
Comparison of three methods for case (vii): (a) average delay time, (b) collision rate, and (c) effective throughput rate.
(a)
(b)
(c)In Figure10(c), effective throughput rate of proposed method falls to around 0.62 and is far higher than ones of IEEE802.15.4e standard and hybrid MAC protocol.Successful sending rates of the proposed model are shown in Figure11, where output waveforms with a 95 percent of confidence interval are used to describe the stabilities of communication for high priority, middle priority, and low priority data for case (vi) and case (vii).Figure 11
Successful sending rates for case (vi) and case (vii): (a) high priority data, (b) middle priority data, and (c) low priority data.
(a)
(b)
(c)Comparing Figures11(a), 11(b), and 11(c), we know that successful sending rates of high priority data are higher than ones of middle priority and low priority data. Successful sending rates of low priority data are the lowest among three types of data in case (vi) and case (vii).From simulation results for case (iv), case (v), case (vi), and case (vii), we can know that advantage of the proposed model is more and more obvious with growth of the type of data and production rate.


## 5. Concluding Remarks

In this paper, a MAC-QoS model of WSN communication system based on IEEE802.15.4 protocol is developed to support SDG communication where the proposed model can provide different QoS for different communication data studied. The main contributions include the following:(1)
Remote communication, remote adjustment, remote control, and telemetry data are divided into three types: high priority data, middle priority, and low priority data according to difference of the communication time. The state transitions among high priority data, middle priority data, and low priority data in buffering queue of node are built by Markov chain model.(2)
To solve uncertainty of transmission time delay induced by channel fair access mechanism which leads to disordered channel competition among different priority data, the QoS-MAC protocol based on UCCAM to realize transmission of multipriority data is proposed. Moreover, any extra communication overhead is not added in the proposed model.(3)
The mathematical models including the time delay, the channel collision rate, and the effective throughout rate for the WSN applied in SDG communication are constructed to measure the transmission feature of the proposed model. The simulation results show that the proposed mathematical model can provide different transmission services for different priority data in SDG communication in any case.(4)
We cannot realize evaluating performance of the proposed model by network emulator. In the next work, we are further going to improve our model and evaluate performance of the improved QoS mode by NS-3 simulator or QualNet simulator.



---

*Source: 6926793-2016-01-19.xml*