Research on Polling Control System in Wireless Sensor Networks

*Zhijun Yang and Lei Mao*

### **Abstract**

To solve the problem of multi-priority and multi-business tasks in wireless sensor networks, a two-level polling control system is proposed based on the basic polling system. The system divides the sites into ordinary sites and high-priority site according to business priorities. The ordinary sites use gated services, and the highpriority sites use exhaustive services. The mathematical model of the system is established by using the method of Markov chain and probability generating function, and the important parameters such as query period, throughput, average queue length and average delay are obtained. The simulation results are approximately equal to the theoretical calculation results, which shows that the theoretical analysis method is correct and effective. While distinguishing priority services, the system ensures the delay of users and improves the quality of service of the polling system.

**Keywords:** WSN, polling system, average queue length, average waiting delay, priority control

#### **1. Introduction**

With the rapid development of science and technology, human beings have been in the information age, and sensor technology, as the most important and basic technology of information acquisition, has also been greatly developed. Wireless sensor networks (WSNs) are a new generation of sensor network and the core of Internet of things technology [1]. It is an interdisciplinary research field involving sensor technology, computer network technology, wireless transmission technology, embedded computing technology, distributed information processing technology, microelectronic manufacturing technology, software programming technology and so on [2]. Through a variety of information sensors, it collects all kinds of needed information in real time, and realizes the functions of monitoring and management through the access of the Internet. In this process, the mode of data transmission must be considered. MAC protocol specifies the way that nodes occupy wireless channels when transmitting data. It reduces transmission delay and improves network throughput and service quality through communication protocol and mechanism. Therefore, the performance of MAC protocol determines the data transmission capability of WSNs [3].

MAC protocol based on polling access is a non-competitive control method, which allocates fixed channel resources to users [4]. In the process of data

communication, the users who get the transmission right exclusively enjoy the allocated channel resources, so that the network can realize the conflict-free transmission of information. Due to its unique conflict-free transmission mode, pollingbased MAC protocol has always been a hot topic in WSNs research [5, 6]. With the development of research, its service mode has been continuously expanded [7–9]. Kunikawa and Yomo proposed a polling MAC protocol based on EH-WSN, which improves the throughput of WSNs nodes [10]. Adan and his collaborators proposed a dual-queue polling model, and then analyzed the equilibrium distribution of the system by using the compensation method and a reduction to a boundary value problem respectively [11]. Abidini et al. studied the vacation queuing model and the single-server multi-queue polling model [12]. The polling system is mainly divided into three categories: gated, exhaustive and limited according to the service strategy [13]. Researchers have been studying all kinds of polling systems focusing on the optimization and improvement of system performance [14]. With the rapid development of modern network technology, a single service strategy has been unable to meet the needs, such as priority business and multi-business tasks. Therefore, it is necessary to make comprehensive use of various service strategies, but at this time the difficulty of system analysis is greatly increased. Yang and Ding analyzed the polling system with mixed service, but did not give an accurate analysis of the second-order characteristics of the system [15].

Herein, we first analyze the three basic polling systems, and then propose a twolevel polling system model with exhaustive service in the central site and gated service in the ordinary sites, which not only solves the problem of differentiated priority business, but also ensures the delay of the system. Then the E(x) characteristics of the system such as average queue length, average query cycle and throughput are analyzed. Finally, the performance of the system is verified by simulation experiments.

where *F z*ð Þ¼*<sup>i</sup> ABz* ð Þ ð Þ *iF z*ð Þ*<sup>i</sup>* ; *i* ¼ 1, 2, ⋯, *N* represents the probability generating

The average queue length of the system is defined as the average number of packets stored in the site *j* when the ordinary *i* starts to receive service at *tn* time,

According to the Eqs. (1) and (2), it can be calculated that the average queue

ðÞ¼ *<sup>i</sup> <sup>N</sup>γλ*ð Þ <sup>1</sup> � *<sup>ρ</sup>* 1 � *Nρ*

The average waiting time of the system is the time it takes for a packet to enter the site until it is sent out, expressed by *E w*½ �. Define the joint moment of random

> *Gi z*1, *z*2, ⋯, *z <sup>j</sup>*, ⋯, *zk*, ⋯, *zN ∂z <sup>j</sup>∂zk*

*<sup>∂</sup>Gi <sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi* ð Þ , <sup>⋯</sup>, *zN ∂z j*

(2)

(3)

(4)

*i*, *j*, *k* ¼ 1, 2, ⋯, *N*

function of the random variable of the time required for the server to provide exhaustive service to the information packets entering any site in any time slot.

*2.1.1 Average queue length*

*Single-level polling system model.*

*2.1.2 Average waiting delay*

as *gi*

ð Þ¼ *<sup>j</sup>*, *<sup>k</sup>* lim *<sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *<sup>z</sup> <sup>j</sup>*, <sup>⋯</sup>, *zk*, <sup>⋯</sup>, *zN*!<sup>1</sup>

variable *x <sup>j</sup>*, *xk*

*gi*

**175**

ð Þ*j* . Definition:

*Research on Polling Control System in Wireless Sensor Networks*

*DOI: http://dx.doi.org/10.5772/intechopen.93507*

ð Þ¼*<sup>j</sup>* lim *<sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi*, <sup>⋯</sup>, *zN*!<sup>1</sup>

*gi*

*∂*2

*gi*

length of information packets at site *i* is:

ð Þ *j*, *k* .

expressed by *gi*

**Figure 1.**

#### **2. Three basic polling system models**

The basic model of the polling system consists of a logical server (relay site) and *N* sites. The server queries each site to provide services according to the predetermined service rules. The performance of the polling system is usually determined by the order of querying each site, the service policy of the site and the service order of information packets within the site. The system model is shown in **Figure 1**. When the system is running, the polling order is as follows: at *tn* time, the server provides services for site *i*; after the service is completed, the server provides services for site *i* + 1 at *tn*þ<sup>1</sup> time.

#### **2.1 Exhaustive service polling system**

The exhaustive service system is when the server starts to serve the site, it not only transmits the previously arrived information packets in the site, but also transmits the newly arrived information packets during the service period. Its probability generating function at *tn* time is:

$$\begin{aligned} &G\_{i+1}(z\_1, z\_2, \dots, z\_i, \dots, z\_N) = \lim\_{t \to \phi} E\left[\prod\_{j=1}^N x\_j^{z\_j(n+1)}\right] \\ &= R\left[\prod\_{j=1}^N A\left(z\_j\right)\right] G\_i\left(z\_1, z\_2, \dots, z\_{i-1}, B\left(\prod\_{j=1 \neq i}^N A\left(z\_j\right) F\left(\prod\_{j=1 \neq i}^N A\left(z\_j\right)\right)\right), z\_{i+1}, \dots, z\_N\right) \end{aligned} \tag{1}$$

*Research on Polling Control System in Wireless Sensor Networks DOI: http://dx.doi.org/10.5772/intechopen.93507*

communication, the users who get the transmission right exclusively enjoy the allocated channel resources, so that the network can realize the conflict-free transmission of information. Due to its unique conflict-free transmission mode, pollingbased MAC protocol has always been a hot topic in WSNs research [5, 6]. With the development of research, its service mode has been continuously expanded [7–9]. Kunikawa and Yomo proposed a polling MAC protocol based on EH-WSN, which improves the throughput of WSNs nodes [10]. Adan and his collaborators proposed a dual-queue polling model, and then analyzed the equilibrium distribution of the system by using the compensation method and a reduction to a boundary value problem respectively [11]. Abidini et al. studied the vacation queuing model and the single-server multi-queue polling model [12]. The polling system is mainly divided into three categories: gated, exhaustive and limited according to the service strategy [13]. Researchers have been studying all kinds of polling systems focusing on the optimization and improvement of system performance [14]. With the rapid development of modern network technology, a single service strategy has been unable to meet the needs, such as priority business and multi-business tasks. Therefore, it is necessary to make comprehensive use of various service strategies, but at this time the difficulty of system analysis is greatly increased. Yang and Ding analyzed the polling system with mixed service, but did not give an accurate analysis of the

*Wireless Sensor Networks - Design, Deployment and Applications*

Herein, we first analyze the three basic polling systems, and then propose a two-

The basic model of the polling system consists of a logical server (relay site) and

The exhaustive service system is when the server starts to serve the site, it not only transmits the previously arrived information packets in the site, but also transmits the newly arrived information packets during the service period. Its

*N* sites. The server queries each site to provide services according to the predetermined service rules. The performance of the polling system is usually determined by the order of querying each site, the service policy of the site and the service order of information packets within the site. The system model is shown in **Figure 1**. When the system is running, the polling order is as follows: at *tn* time, the server provides services for site *i*; after the service is completed, the server provides

> *j*¼1 *z j ξ <sup>j</sup>*ð Þ *n*þ1 " #

> > 0 @

> > > *j*¼16¼*i*

*A z <sup>j</sup>*

� �*<sup>F</sup>* <sup>Y</sup>*<sup>N</sup>*

0 @

*j*¼16¼*i*

*A z <sup>j</sup>* � �

1 A

1

A, *zi*þ1, ⋯, *zN*

1 A (1)

*Gi <sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi*�1, *<sup>B</sup>* <sup>Y</sup>*<sup>N</sup>*

level polling system model with exhaustive service in the central site and gated service in the ordinary sites, which not only solves the problem of differentiated priority business, but also ensures the delay of the system. Then the E(x) characteristics of the system such as average queue length, average query cycle and throughput are analyzed. Finally, the performance of the system is verified by

second-order characteristics of the system [15].

**2. Three basic polling system models**

services for site *i* + 1 at *tn*þ<sup>1</sup> time.

**2.1 Exhaustive service polling system**

probability generating function at *tn* time is:

*Gi*þ<sup>1</sup> *<sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi* <sup>ð</sup> , <sup>⋯</sup>, *zN*Þ ¼ lim*<sup>t</sup>*!<sup>∞</sup> *<sup>E</sup>* <sup>Y</sup>*<sup>N</sup>*

0 @

<sup>¼</sup> *<sup>R</sup>* <sup>Y</sup>*<sup>N</sup> j*¼1 *A z <sup>j</sup>* � � " #

**174**

simulation experiments.

where *F z*ð Þ¼*<sup>i</sup> ABz* ð Þ ð Þ *iF z*ð Þ*<sup>i</sup>* ; *i* ¼ 1, 2, ⋯, *N* represents the probability generating function of the random variable of the time required for the server to provide exhaustive service to the information packets entering any site in any time slot.

#### *2.1.1 Average queue length*

The average queue length of the system is defined as the average number of packets stored in the site *j* when the ordinary *i* starts to receive service at *tn* time, expressed by *gi* ð Þ*j* . Definition:

$$\mathbf{g}\_i(j) = \lim\_{x\_1, x\_2, \dots, x\_i, \dots, x\_{N-1}} \frac{\partial \mathbf{G}\_i(z\_1, z\_2, \dots, z\_i, \dots, z\_N)}{\partial \mathbf{z}\_j} \tag{2}$$

According to the Eqs. (1) and (2), it can be calculated that the average queue length of information packets at site *i* is:

$$\mathbf{g}\_i(i) = \frac{N\boldsymbol{\upchi}(1-\rho)}{1 - N\rho} \tag{3}$$

#### *2.1.2 Average waiting delay*

The average waiting time of the system is the time it takes for a packet to enter the site until it is sent out, expressed by *E w*½ �. Define the joint moment of random variable *x <sup>j</sup>*, *xk* as *gi* ð Þ *j*, *k* .

$$\mathbf{g}\_i(j,k) = \lim\_{\mathbf{z}\_1, \mathbf{z}\_2, \dots, \mathbf{z}\_j, \dots, \mathbf{z}\_k, \dots, \mathbf{z}\_{N-1}} \frac{\partial^2 \mathbf{G}\_i(\mathbf{z}\_1, \mathbf{z}\_2, \dots, \mathbf{z}\_j, \dots, \mathbf{z}\_k, \dots, \mathbf{z}\_N)}{\partial \mathbf{z}\_j d\mathbf{z}\_k} i, j, k = 1, 2, \dots, N \tag{4}$$

According to Eqs. (1) and (4), the average waiting delay of packets in the exhaustive-service polling system is calculated as follows:

$$E[w] = \frac{1}{2} \left\{ \frac{R''(1)}{\gamma} + \frac{1}{1 - N\rho} [(N - 1)\gamma + (N - 1)\rho + N\lambda B''(1)] + \frac{\rho A''(1)}{\lambda^2 (1 - N\rho)} \right\} \tag{5}$$

#### **2.2 Gated service polling system**

The gated service polling system means that when the server queries the site, it only provides services for the packets that currently arrive at the site, and the packets arriving in the service process will not provide services until the next round of access of the server. The definitions of average queue length and average waiting delay of gated service polling system are similar to that of exhaustive service polling system, and its probability generating function at *tn* time is:

$$\begin{aligned} G\_{i+1}(z\_1, z\_2, \dots, z\_i, \dots, z\_N) &= \lim\_{t \to \infty} E\left[\prod\_{j=1}^N x\_j^{\xi\_j(n+1)}\right] \\ = R\left[\prod\_{j=1}^N A(z\_j)\right] G\_i\left(z\_1, z\_2, \dots, z\_{i-1}, B\left(\prod\_{j=1}^N A(z\_j)\right), z\_{i+1}, \dots, z\_N\right) \end{aligned} \tag{6}$$

#### *2.2.1 Average queue length*

According to Eqs. (2) and (6), the average queue length of the gated service polling system is:

$$\mathbf{g}\_i(i) = \frac{N\lambda\gamma}{\mathbf{1} - N\rho} \tag{7}$$

*Gi*þ<sup>1</sup> *<sup>z</sup>*1*; <sup>z</sup>*2*;* <sup>⋯</sup>*; zi* <sup>ð</sup> *;* <sup>⋯</sup>*; zN*Þ ¼ lim*n*!<sup>∞</sup> *<sup>E</sup>* <sup>Y</sup>

*DOI: http://dx.doi.org/10.5772/intechopen.93507*

"

*Research on Polling Control System in Wireless Sensor Networks*

*Aj zj* � � " # *Bi*

<sup>¼</sup> *<sup>R</sup>* <sup>Y</sup> *N*

*2.3.1 Average queue length*

polling system is:

polling system is:

following conditions:

distribution is symmetric.

measured in time slots.

Poisson distribution.

**177**

steady-state condition P*<sup>N</sup>*

*gi*

*2.3.2 Average waiting delay*

*E w*ð Þ¼ *<sup>R</sup>*″ð Þ<sup>1</sup> 2*γ*

*j*¼1

ðÞ¼ *<sup>i</sup> <sup>N</sup>*

<sup>þ</sup> <sup>1</sup> <sup>þ</sup> *<sup>ρ</sup>*

1 � *Nρ* � �*γA*″ð Þþ <sup>1</sup>

**2.4 Performance comparison of three polling systems**

*N*

*j*¼1 *zj ξj*ð Þ *n*þ1 " #

*zi*

According to Eqs. (2) and (9), the average queue length of the limited service

*Nλ*<sup>3</sup>

According to Eqs. (2) and (9), the average waiting delay of the limited service

<sup>þ</sup> <sup>2</sup>*Nγρ* <sup>þ</sup> ð Þ *<sup>N</sup>λγ* <sup>þ</sup> *<sup>ρ</sup> <sup>A</sup>*″ð Þ<sup>1</sup> *<sup>=</sup>λ*<sup>2</sup> <sup>þ</sup> *<sup>N</sup>λB*″ð Þþ <sup>1</sup> *<sup>N</sup>λR*″ð Þ� <sup>1</sup>

1.The parameters of each station obey the same distribution law, i.e., the

2.Arrival time, query conversion time, and waiting time for service are all

3.The number of packets arriving at any time slot at each station obeys the

4.The polling systems with three different service strategies all satisfy the

*<sup>i</sup>*¼<sup>1</sup>*λiβ<sup>i</sup>* <sup>¼</sup> *<sup>N</sup>λβ* <sup>≤</sup>1.

The above analysis method of embedded Markov chain and probability generating function are used to obtain the accurate expressions of the average queue length and average waiting time of three different service strategies, i.e., exhaustive, gated and limited service polling systems. In this section, the performance characteristics of three different service strategy polling systems are compared by setting the working conditions and operating parameters of the system. The system meets the

þ 1*=*f2 1½ � � *Nλ γ*ð Þ þ *β* g½ð Þ *N* � 1 *γ* þ ð Þ *N* � 1 *ρ*

*<sup>γ</sup>B*″ð Þ<sup>1</sup> 1 � *Nρ*

<sup>þ</sup> *<sup>λ</sup>*<sup>2</sup>

*Gi z*1*; z*2*;* ⋯*; zi* ½ ð Þ *;* ⋯*; zN*

*γ ρ*ð Þ � *γ*

1 � *Nρ*

*<sup>R</sup>*″ð Þg <sup>1</sup>

#

(9)

(10)

(11)

Y *N*

*Aj zj* � � " # <sup>1</sup>

�*Gi*ð*z*1*; z*2*;* ⋯*; zi*�1*;* 0*; zi*þ1*;* ⋯*; zN*Þ� þ *Gi*ð Þ *z*1*; z*2*;* ⋯*; zi*�1*;* 0*; zi*þ1*;* ⋯*; zN*

2 1½ � � *<sup>N</sup>λ γ*ð Þ <sup>þ</sup> *<sup>β</sup>* <sup>f</sup>2*λγ*ð Þþ <sup>1</sup> � *λγ* ð Þ *<sup>N</sup>* � <sup>1</sup> *<sup>λ</sup>*<sup>2</sup>

*j*¼1

#### *2.2.2 Average waiting delay*

According to Eqs. (4) and (6), the average waiting delay of the gated service polling system is:

$$\begin{split} E[w] &= \frac{1}{2} \left\{ \frac{R''(\mathbf{1})}{\gamma} + \frac{\mathbf{1}}{\mathbf{1} - N\rho} \left[ (N - \mathbf{1})\gamma + (N - \mathbf{1})\rho + 2N\eta\rho + N\lambda B''(\mathbf{1}) \right. \\ &\left. + \frac{(\mathbf{1} + \rho - N\rho)A''(\mathbf{1})}{\lambda^2} \right] \right\} \end{split} \tag{8}$$

#### **2.3 Limited service polling system**

In the polling system with limited service, it is assumed that there are *N* terminal stations in the system, and the *N* terminal stations are queried by a server in turn. The server only serves one packet when polling each terminal station, and the rest of the packets is queued with the newly arrived packets to be sent in the next cycle with the same service rules. The average queue length and average delay of the limited service polling system are also consistent with those of the exhaustive service polling system, and its probability generating function at *tn* time is:

*Research on Polling Control System in Wireless Sensor Networks DOI: http://dx.doi.org/10.5772/intechopen.93507*

$$\begin{aligned} \left[ G\_{i+1}(z\_1, z\_2, \cdots, z\_i, \cdots, z\_N) = \lim\_{n \to \infty} E \left[ \prod\_{j=1}^N z\_j^{\xi\_j(n+1)} \right] \\ = R \left[ \prod\_{j=1}^N A\_j(z\_j) \right] \left[ B\_i \left[ \prod\_{j=1}^N A\_j(z\_j) \right] \frac{1}{z\_i} \left[ G\_i(z\_1, z\_2, \cdots, z\_i, \cdots, z\_N) \right] \right. \\ \left. - G\_i(z\_1, z\_2, \cdots, z\_{i-1}, 0, z\_{i+1}, \cdots, z\_N) \right] + G\_i(z\_1, z\_2, \cdots, z\_{i-1}, 0, z\_{i+1}, \cdots, z\_N) \right] \end{aligned} \tag{9}$$

#### *2.3.1 Average queue length*

According to Eqs. (1) and (4), the average waiting delay of packets in the

� �

The gated service polling system means that when the server queries the site, it

*N*

*j*¼1 *z j ξ <sup>j</sup>*ð Þ *n*þ1 " #

According to Eqs. (2) and (6), the average queue length of the gated service

ðÞ¼ *<sup>i</sup> <sup>N</sup>λγ* 1 � *Nρ*

According to Eqs. (4) and (6), the average waiting delay of the gated service

In the polling system with limited service, it is assumed that there are *N* terminal stations in the system, and the *N* terminal stations are queried by a server in turn. The server only serves one packet when polling each terminal station, and the rest of the packets is queued with the newly arrived packets to be sent in the next cycle with the same service rules. The average queue length and average delay of the limited service polling system are also consistent with those of the exhaustive service polling system, and its probability generating function at *tn* time is:

*N*

*j*¼1

*A z <sup>j</sup>* � � !

ð Þ *<sup>N</sup>* � <sup>1</sup> *<sup>γ</sup>* <sup>þ</sup> ð Þ *<sup>N</sup>* � <sup>1</sup> *<sup>ρ</sup>* <sup>þ</sup> <sup>2</sup>*Nγρ* <sup>þ</sup> *<sup>N</sup>λB*″ð Þ<sup>1</sup>

�� (8)

! (6)

, *zi*þ1, ⋯, *zN*

only provides services for the packets that currently arrive at the site, and the packets arriving in the service process will not provide services until the next round of access of the server. The definitions of average queue length and average waiting delay of gated service polling system are similar to that of exhaustive service polling

*Gi <sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi*�1, *<sup>B</sup>* <sup>Y</sup>

*gi*

½ð Þ *<sup>N</sup>* � <sup>1</sup> *<sup>γ</sup>* <sup>þ</sup> ð Þ *<sup>N</sup>* � <sup>1</sup> *<sup>ρ</sup>* <sup>þ</sup> *<sup>N</sup>λB*″ð Þ<sup>1</sup> � þ *<sup>ρ</sup>A*″ð Þ<sup>1</sup>

*λ*2

ð Þ 1 � *Nρ*

(5)

(7)

exhaustive-service polling system is calculated as follows:

*Wireless Sensor Networks - Design, Deployment and Applications*

system, and its probability generating function at *tn* time is:

*Gi*þ<sup>1</sup> *<sup>z</sup>*1, *<sup>z</sup>*2, <sup>⋯</sup>, *zi* <sup>ð</sup> , <sup>⋯</sup>, *zN*Þ ¼ lim*<sup>t</sup>*!<sup>∞</sup> *<sup>E</sup>* <sup>Y</sup>

1 1 � *Nρ*

*E w*½ �¼ <sup>1</sup> 2 *<sup>R</sup>*″ð Þ<sup>1</sup> *γ* þ

**2.2 Gated service polling system**

<sup>¼</sup> *<sup>R</sup>* <sup>Y</sup> *N*

*2.2.1 Average queue length*

*2.2.2 Average waiting delay*

*<sup>R</sup>*″ð Þ<sup>1</sup> *γ* þ

**2.3 Limited service polling system**

<sup>þ</sup> ð Þ <sup>1</sup> <sup>þ</sup> *<sup>ρ</sup>* � *<sup>N</sup><sup>ρ</sup> <sup>A</sup>*″ð Þ<sup>1</sup> *λ*2

�

1 1 � *Nρ* �

polling system is:

polling system is:

**176**

*E w*½ �¼ <sup>1</sup> 2

*j*¼1

*A z <sup>j</sup>* � � " #

According to Eqs. (2) and (9), the average queue length of the limited service polling system is:

$$\begin{split} \mathbf{g}\_{i}(\mathbf{i}) &= \frac{N}{2[\mathbf{1} - N\boldsymbol{\lambda}(\mathbf{y} + \boldsymbol{\rho})]} \{ 2\boldsymbol{\lambda}\boldsymbol{\gamma}(\mathbf{1} - \boldsymbol{\lambda}\boldsymbol{\gamma}) + \frac{(N-1)\boldsymbol{\lambda}^{2}\boldsymbol{\gamma}(\boldsymbol{\rho} - \boldsymbol{\gamma})}{\mathbf{1} - N\boldsymbol{\rho}} \\ &+ \left[ \mathbf{1} + \frac{\boldsymbol{\rho}}{\mathbf{1} - N\boldsymbol{\rho}} \right] \boldsymbol{\chi}\boldsymbol{\mathcal{A}}''(\mathbf{1}) + \frac{N\boldsymbol{\lambda}^{3}\boldsymbol{\gamma}\mathbf{B}''(\mathbf{1})}{\mathbf{1} - N\boldsymbol{\rho}} + \boldsymbol{\lambda}^{2}\boldsymbol{R}''(\mathbf{1}) \} \end{split} \tag{10}$$

#### *2.3.2 Average waiting delay*

According to Eqs. (2) and (9), the average waiting delay of the limited service polling system is:

$$\begin{split} E(w) &= \frac{R''(\mathbf{1})}{2\gamma} + \mathbf{1} / \{2[\mathbf{1} - N\lambda(\mathbf{y} + \boldsymbol{\beta})] \} [(N-\mathbf{1})\boldsymbol{\gamma} + (N-\mathbf{1})\boldsymbol{\rho} \\ &+ 2N\boldsymbol{\gamma}\boldsymbol{\rho} + (N\lambda\boldsymbol{\gamma} + \boldsymbol{\rho})A''(\mathbf{1})/\lambda^2 + N\lambda B''(\mathbf{1}) + N\lambda R''(\mathbf{1}) \} \end{split} \tag{11}$$

#### **2.4 Performance comparison of three polling systems**

The above analysis method of embedded Markov chain and probability generating function are used to obtain the accurate expressions of the average queue length and average waiting time of three different service strategies, i.e., exhaustive, gated and limited service polling systems. In this section, the performance characteristics of three different service strategy polling systems are compared by setting the working conditions and operating parameters of the system. The system meets the following conditions:


It can be seen from **Figures 2** and **3**, the performance indicators of the polling systems with three different service policies, i.e., the average queue length and the average waiting delay are different. The average queue length of the exhaustive service polling system is the smallest, the gated service polling system takes the second place, and the average queue length of the limited service polling system is the largest, and the average waiting delay also satisfies the same law. From the perspective of fairness, on the contrary, the fairness of the limited service polling system is the best, while that of the exhaustive service polling system is the worst. The polling systems with three different service strategies have their own characteristics and advantages. In the actual situation, the appropriate polling service strategy should be selected according to the scope of application and application conditions to meet different application needs. When the system requires high fairness, select the limited service strategy; when the system requires high real-time performance, choose the exhaustive service strategy; when the system requires both real-time and fairness, choose the gated service strategy.

**3. Exhaustive-gated two-level polling system**

*DOI: http://dx.doi.org/10.5772/intechopen.93507*

*Research on Polling Control System in Wireless Sensor Networks*

guaranteed first.

**Figure 4.**

**179**

*Two-level polling system model.*

Based on the basic polling system and the requirements of different priority business in WSNs, an exhaustive-gated two-level polling access control strategy is proposed. The principle of the exhaustive-gated service two-level control polling system is as follows: the polling system is composed of *N* ordinary sites and a central site h. The server serves the central site according to the exhaustive service rule and the ordinary sites according to the gated service rule. The system model is shown in **Figure 4**. After the polling starts, the server first provides exhaustive service to the central site, i.e., the information arrived before the start of the service and the information arrived during the service until the site is empty, and then go to query

the ordinary sites. If the ordinary site *i* is not empty, the server will serve it

*tn* time. *ξh*ð Þ *n* is the number of information packets queued for service in the memory of the central station at *tn* time. The state variable of the whole system at *tn* time is f g *ξ*1ð Þ *n* , *ξ*2ð Þ *n* , ⋯, *ξi*ð Þ *n* , ⋯, *ξN*ð Þ *n* , *ξh*ð Þ *n* ; at *tn* <sup>∗</sup> time, the state of the system is f g *ξ*1ð Þ *n* ∗ , *ξ*2ð Þ *n* ∗ … *ξN*ð Þ *n* ∗ , *ξh*ð Þ *n* ∗ . At *tn*þ<sup>1</sup> time, the state of the whole system can be expressed as f g *ξ*1ð Þ *n* þ 1 , *ξ*2ð Þ *n* þ 1 … *ξN*ð Þ *n* þ 1 , *ξh*ð Þ *n* þ 1 . Then the *N* + 1 states of

the system constitute a Markov chain, which is aperiodic and ergodic.

according to the gated service rule. When the service of the site *i* is finished, it will turn to query the central site h. After the central site completes the prescribed service, it starts to serve the ordinary site *i* + 1 again. The exhaustive-gated twolevel control polling system distinguishes between the central site and the ordinary sites by always giving priority to the central site, and the service of the central site is

We use the methods of stochastic process and probability generating function to analyze the performance of the system. The random variable *ξi*ð Þ *n* is defined as the number of information packets queued for service in the memory of the site *i* at the

**Figure 2.** *Relationship between average queue length and arrival rate.*

**Figure 3.** *Relationship between average waiting delay and arrival rate.*
