# A Feedback Approach for QoS-Enhanced MAC in Wireless Sensor Network

Authors: Ang Gao; Yansu Hu
Journal: Journal of Sensors
 (2016)

---

## Abstract

WSN as well as Wireless Multimedia Sensor Network (WMSN) has demands for QoS provision and differentiated service. The various types of data, such as video, voice, and network management, need to be periodically or best-effect transmitted. Since MAC layer forces the final physical medium accessing, it is the best choice to implement the QoS support for efficiency. This paper addresses the problem of QoS support in WSN from a renewed view of control theory and proposes FD-MAC architecture. By means of CSMA/CA, FD-MAC dynamically adjusts contention widow size according to the MAC frames’ priorities and their actual QoS metrics. The architecture can be modeled as a linear time-invariant system by system identification, and Least-Beat controller is designed to drive the system output to the desired value, which means the ratio of actual QoS metrics can be controlled to a prefixed value. The higher priorities enjoy a comparatively lower node-to-node delay while the lower priorities can still operate without being oversacrificed.


---

## Body

## 1. Introduction

As the semiconductor developing, the embedded processor is getting more powerful and energy-saving, which makes WSN have the ability to do more than data collection and network transmission. The concern about QoS on multihop wireless network is necessary and supportable.WSN has provided ability to sense and connect the physical environment and the cyber space. Moreover, in many fields such as target tracking in battlefields and rescue activity in earthquake ruins, the real-time data delivery from hot-points plays a more crucial role than the common data. Wireless Multimedia Sensor Network (WMSN) in which WSN node carries tiny cameras and microphones also requires QoS provision and differentiated service. The various types of data, such as video, voice, and network-management, need to be periodically or best-effect transmitted. Since MAC layer forces the final physical medium accessing, it is the best choice to implement the QoS support for efficiency.Most existing WSN MAC protocols can be divided into two classes: Time Division Multiple Access- (TDMA-) based MAC and CSMA/CA-based MAC [1]. Although TDMA-based MAC protocols have higher link utilization efficiency in heavy network load, they suffer from the problems of complex clock synchronization and lack of sensitivity to network traffic. On the contrary, many solutions have been proposed for the prioritized CSMA/CA-based MAC protocols in WSN for their simple implementation and acceptable performance, such as RCS-MAC [2], QS-MAC [3], PQ-MAC [4], EQ-MAC [5], Diff-MAC [6], and AMP-MAC [7].To the best of our knowledge, in these researches, QoS is controlled by assigning different accessing priority to MAC frames and the accessing priority is enforced by adjusting the contention window. This is a subjective design and has been proved effective by simulations and experiments. Some researches have also proposed the adapted contention window (CW) according to the dynamic traffic [3, 5–7]. Saxena et al. [3] and Yigitel et al. [6] both developed all-in-one QoS-aware MAC protocols with common features of CW size and duty cycle adaptation. Their differences lie in the mechanics of CW adjustment approaches. Compared with QS-MAC proposed by Saxena et al., Diff-MAC proposed by Yigitel et al. adjusts CW size continuously regardless of the neighboring nodes, so it chooses CW faster [8].However, all these papers are from the view of architecture realization without theoretically analyzing the system stability and dynamic performance. Can the multiqueueing architecture of MAC always converge or sometimes diverge? How long can the multiqueueing system reach the steady state and what factors will affect the system stability? In this paper, we are trying to address these problems from a renewed view of control theory and finally propose FD-MAC to support differentiated node-to-node delay control. Our FD-MAC improves the CW size control by system identification and Least-Beat controller design. Compared with Diff-MAC in Section4, the convergence of system can be ensured and the jitter of output as well as oscillation is small.We take Diff-MAC as competitor for two reasons:(1) Diff-MAC is an all-in-one MAC protocol including network layer adaptive fragmentation, adaptively duty-cycling to balance the energy consumption, as well as intranode and intraqueue prioritization feature. FD-MAC can be easily integrated with its CW size adjusting method without affecting other QoS features. (2) There are two classic service differentiation models for QoS control in conventional computer networks: integrated services (IntServ) and differentiated services (DiffServ). Lightweight and easy-to-implement DiffServ can easily be adapted to WSN in a multihop manner. Although papers have actually used DiffServ in adaptive contention window or duty cycle, Diff-MAC is the minority to point out that the essential of differentiated service in TDMA-based MAC is to treat each of these traffic classes differently by managing the resource sharing among them [8–10]. The intention of Diff-MAC matches DiffServ well and FD-MAC also use proportional delay differentiation (PDD) in system modeling, which is one of the most important models in DiffServ.The remainder of the paper is organized as follows: In Section2, the architecture of FD-MAC is proposed and three compositions for the general QoS-enhanced MAC as well as our FD-MAC are reenforced and formulated. In Section 3, FD-MAC is modeled as a linear time-invariant system. The system order and parameters can be determined by system identification. Finally, a Least-Beat controller is designed to drive the FD-MAC to the desired output. In Section 4, the experiments show the dynamic and static statistics performances of FD-MAC as well as the comparison with Diff-MAC.


## 2. Feedback-Based Diff-MAC Architecture

### 2.1. Overview

The typical factors effecting QoS on the network layer are the end-to-end delay, throughput, bandwidth throttle, package drop rate, and so forth, which also exist in WSN. The data transmission is so important for the real-time surveillance in WSN/WMSN that this paper chooses end-to-end delay (also named as node-to-node delay) as the main QoS metric to drive our approach. Other QoS metric-driven methods are similar but just different in the bottleneck resources scheduling [11].Because of the medium resource limitation and energy efficient features of WSN/WMSN, for every node, a major issue for FD-MAC is how to control the winning probability in the medium accessing contention. We reenforce and formulate three compositions for the general QoS-enhanced MAC as well as our FD-MAC. They areFrame Classification,Performance Isolation, andAccessing Priority Control. Figure 1 shows the brief architecture of our FD-MAC.Figure 1
Feedback-based Diff-MAC architecture.(
1) Frame Classification. According to four-layered network architecture of IEEE, the classification can be enforced at network layer, datalink layer, and physical layer. Correspondingly, there are datagram-based, packet-based, and frame-based classification methods. But, in WSN nodes, the resources starvation leads to an obscure boundary between network layer and application layer, especially for some Reduced Function Device (RFD). This paper uses a cross-layered classification; that is, different WSN applications are classified into different categories, and all the datagrams from the same application are marked by a flag calledPriority_Flag. This flag is passed cross the network so MAC layer can identify the priority of the frame encapsulation. The classification strategy may be prefixed or dynamically negotiated and broadcasted by higher protocol, which is not in the scope of this paper.(
2) Performance Isolation. Queuing theory has been used to model and analyze WSN MAC frames transmission [12]. To support differentiated service, frames of different categories are serviced in isolated queues waiting to be transmitted in the manner of First-In-First-Out (FIFO), as well as the frame receiving. The QoS feedback control is enforced on the sender node and the frame transmission procedure is shown as Figure 1.(
3) Accessing Priority Control. MAC frames are contending for medium accessing according to their priorities. Thanks to CSMA/CA mechanism, the accessing probability can be controlled by assigning different size of back-off windows. Our mechanism is to decrease the probability of collisions for high priority by enhancing other priorities’ initial up boundary of back-off time.Service Level Agreement (SLA) is a service contract between the service provider (either internal or external) and the end user which defines the service level expected from the service provider. Researchers [13, 14] have brought out this concept in WSN. SLA is an application layer protocol which administrates, manages, and negotiates how to set QoS parameters. Supposing the applications’ priorities are prefixed or set by SLA, we take the relative differentiated service and the proportional differentiation model to realize a differentiated service. On the one hand, the higher priority application, such as real-time voice and video transition, should suffer a relatively better QoS compared with other applications, which means a lower latency in this paper. On the other hand, the lower priority will not be oversacrificed and thus the fairness is also sustained.


## 2.1. Overview

The typical factors effecting QoS on the network layer are the end-to-end delay, throughput, bandwidth throttle, package drop rate, and so forth, which also exist in WSN. The data transmission is so important for the real-time surveillance in WSN/WMSN that this paper chooses end-to-end delay (also named as node-to-node delay) as the main QoS metric to drive our approach. Other QoS metric-driven methods are similar but just different in the bottleneck resources scheduling [11].Because of the medium resource limitation and energy efficient features of WSN/WMSN, for every node, a major issue for FD-MAC is how to control the winning probability in the medium accessing contention. We reenforce and formulate three compositions for the general QoS-enhanced MAC as well as our FD-MAC. They areFrame Classification,Performance Isolation, andAccessing Priority Control. Figure 1 shows the brief architecture of our FD-MAC.Figure 1
Feedback-based Diff-MAC architecture.(
1) Frame Classification. According to four-layered network architecture of IEEE, the classification can be enforced at network layer, datalink layer, and physical layer. Correspondingly, there are datagram-based, packet-based, and frame-based classification methods. But, in WSN nodes, the resources starvation leads to an obscure boundary between network layer and application layer, especially for some Reduced Function Device (RFD). This paper uses a cross-layered classification; that is, different WSN applications are classified into different categories, and all the datagrams from the same application are marked by a flag calledPriority_Flag. This flag is passed cross the network so MAC layer can identify the priority of the frame encapsulation. The classification strategy may be prefixed or dynamically negotiated and broadcasted by higher protocol, which is not in the scope of this paper.(
2) Performance Isolation. Queuing theory has been used to model and analyze WSN MAC frames transmission [12]. To support differentiated service, frames of different categories are serviced in isolated queues waiting to be transmitted in the manner of First-In-First-Out (FIFO), as well as the frame receiving. The QoS feedback control is enforced on the sender node and the frame transmission procedure is shown as Figure 1.(
3) Accessing Priority Control. MAC frames are contending for medium accessing according to their priorities. Thanks to CSMA/CA mechanism, the accessing probability can be controlled by assigning different size of back-off windows. Our mechanism is to decrease the probability of collisions for high priority by enhancing other priorities’ initial up boundary of back-off time.Service Level Agreement (SLA) is a service contract between the service provider (either internal or external) and the end user which defines the service level expected from the service provider. Researchers [13, 14] have brought out this concept in WSN. SLA is an application layer protocol which administrates, manages, and negotiates how to set QoS parameters. Supposing the applications’ priorities are prefixed or set by SLA, we take the relative differentiated service and the proportional differentiation model to realize a differentiated service. On the one hand, the higher priority application, such as real-time voice and video transition, should suffer a relatively better QoS compared with other applications, which means a lower latency in this paper. On the other hand, the lower priority will not be oversacrificed and thus the fairness is also sustained.


## 3. System Modeling and Controller Design

### 3.1. Proportional Delay Differentiation

Suppose there areN types of frame categories in WSN. The control object is to maintain the actual QoS parameters to meet (1)ζiζj=δiδj,i,j=1,…,N.Generally,i and j are the consecutive integers. In this paper, ζi is the average node-to-node delay between the sender and receiver, and δi is the priority parameter of class i set by SLA. The class with smaller δ is higher priority and expects a lower delay.


### 3.2. Linear-Differ Binary Exponential Back-off Scheme

In IEEE 802.11 distributed coordination function (DCF), the node which has buffered MAC frames starts carrier sense with a random back-off. The back-off time is an integer measured with the time slots number. The initial value of back-off time is randomly chosen in the range of[0,W0-1], where W0=Wmin. Once the collision is detected, the node performs another random back-off in the range of [0,Wτ-1], τ≤τmax-1, where τ is the time that the medium is consecutively sensed to be busy. After τmax times of back-off, the current frame is discarded. Let Wτ=min⁡(2τWmin,Wmax), τ=0,…,τmax-1, where Wmin and Wmax are the predefined default parameters. This back-off protocol is known as binary exponential back-off (BEB).In order to provide the differentiated accessing probability, we design a Linear-Differ binary exponential back-off (LD-BEB) scheme by adopting different initial up boundary of back-off time dynamically, which is the system manipulation. At thekth sampling time, the system input is (2)Xk=x1k,x2k,…,xN-1kT,1≤xik≤WmaxWmin.To maximize the medium utilization, the initial up boundary of back-off time for the highest priority must always start with Wmin, which means x=1. So X(k) has only I=N-1 independent variables.During thekth and k+1th sampling time, the initial back-off time is randomly chosen in the range of [0,xi(k)Wmin-1]. Once the initial back-off time is set, this frame starts contention for medium accessing. If collision is detected, the back-off time is reset in the range of [0,Wτ-1] without recalculating xi(k): (3)0,Wτ-1,Wτ=min⁡xik·2τWmin,Wmax,where τ is the collision times consecutively detected. Notice that X(k) is not related to the back-off time resetting when the collision happens, which guarantees the fairness of different priorities.


### 3.3. System Modeling

Figure2 shows the control model of FD-MAC. Define yi(k) and yidesire as the normalized delay and normalized desired QoS value according to (1):(4)yik=ζik∑l=1Nζlk,yidesire=δi∑l=1Nδl,1≤i≤N.Because of ∑i=1N‍yi(k)=1 and ∑i=1N‍yidesire=1, the system output also has O=N-1 independent variables. Supposing(5)Yk=y1k,y2k,…,yN-1kT,Ydesire=y1desire,y2desire,…,yN-1desireT,E(k) is the deviation between the measured normalized delay and its desired value: (6)Ek=Yk-Ydesire.The QoS controller operates by responding to the deviation, that is, adjusting the accessing probability by changing the up boundary of MAC frames’ back-off time. Thus the proportional delay differentiation is sustained. Despite the uncertainty of medium accessing, the inherent self-stabilization of feedback mechanism liberates us from calculating the back-off time for every frame precisely.Figure 2
Control model of FD-MAC.


### 3.4. System Identification and Validation

The input and output of FD-MAC model are shown as in Figure2. Strictly speaking, we require a discrete and nonlinear model for FD-MAC. However, such a nonlinear model is not amenable to the straightforward theoretical design and analysis. So the following linear model is used to approximate the system. Supposing r-order could be precise enough, the corresponding difference equation is(7)Yk=∑j=1rajYk-j+bjXk-j,and the z-domain transformation is(8)Az-1Yk=Bz-1Xk+Ek,where E(k)=[ε1(k),ε2(k),…,εN-1(k)]T is O-order white noise sequence. Consider (9)Az-1=I-A1z-1-⋯-Arz-r,Ai∈RO×O,0<i≤r.Bz-1=B1z-1+⋯+Brz-r,Bj∈RO×I,0<j≤r,so (8) can be rewritten as (10)Yk+1=ΘΦk+εk+1,where Θ=[B1,…,Br,A1,…,Ar], k≥r-1, Φ(k)=[XT(k),…,XT(k-r+1),YT(k),…,YT(k-r+1)]r, and Θ∈RO×[O×2×r].We take Recursive Least Square (RLS) algorithm to estimate the parameter matrixΘ and F-test to determinate the system order.


#### 3.4.1. Determining Parameter MatrixΘ

First, we design the system identification experiment. The pseudorandom sequence with white noise similarity is used as the impulse to stimulate WSN system. At every sampling time, the up boundary of back-off time is set different value according to the pseudorandom sequence, which is generated as (11). We set p=7 and q=12. Consider(11)ϵk=ϵk-p+ϵk-qmod  4.Suppose this WSN generates and transfers two categories of MAC frames; that is, N=2. The initial up boundary of back-off time is adjusted according to Table 1 and (3).Table 1
Relation ofϵ(k) and X when p=7, q=12.
ϵ
(
k
)
x
1
(
k
+
1
)
x
2
(
k
+
1
)
0
1
2
0
1
1
2
3
2
1
2
6
3
1
2
9SupposeΘ^q is the estimation of Θ from the former q(q≥r-1) sampled data. After the q+1th sampling time, Θ^q can be revised as (12)Θ^q+1=Θ^q+Yk+1-Θ^qΦkΦTkPqλ+ΦTkPqΦk,where(13)Pq+1-1=Pq-1+1+λ-1ΦTkPqΦkΦTkΦk2ΦkΦTk,Pq is the covariance matrix, and λ is the forgetting factor. Φ, Y are measured by QoS monitor. By selecting appropriate Θ^0 and P0, we could get the estimation of parameter matrix.


#### 3.4.2. Determining System Orderr

Second, we need to determine the system orderr by F-test. We define aloss functionj(r) to describe the variance between the identified Y^ and its measured value: (14)jr=∑k=rM+r-1Yk+1-Y^k+12=∑k=rM+r-1Yk+1-Θ^qΦk2,where · is vector norm 2 and M is the sampling amount.Supposingr1 and r2 are the consecutive orders of system (r2>r1), then statistics variable H is constructed as follows: (15)Hr1,r2=jr1-jr2jr2M-2r22r2-r1.If M is large enough, H(r1,r2) obeys F-distribution: (16)H~F2r2-r1,M-2r2.Algorithm 1 shows the pseudocode for j(r).Algorithm 1:FD-MAC system identification.
(1)Begin
(2) Setr be the maximum possible order, that is, r=rmax⁡.
(3)q=0, k=r-1, chose an appropriate θ^0 and P0.
(4)Φ(k) is constructed according to the former [k-r+1,k] sample data.
(5)θ^q+1 and Pq+1 is calculated as (12).
(6)k=k+1, q=q+1.
(7) IFk≤M, goto (4); Else θ^M-r+1 is the RLS estimation of this r-order system.
(8)j(r) is calculated as (14).
(9)r=r-1.
(10) IFr≥1, goto (3).
(11)End.ThenJ=[j(1),j(2),…,j(rmax)]T is obtained, where j(r) is the loss function value in r-order system. Our experiments are operated by ZigBit 900 hardware module, which is a 784/868/915 MHz IEEE 802.15.4 OEM module. The details of FD-MAC hardware implementations are in Section 4.1. We deploy 20 ZigBit 900 nodes with the positions in the radius of 100 meters. The transmitted power is 1 mW, Wmin=23, Wmax=28, and τmax=3. The average frame length is 105 bytes and the symbol rate is 256 kbps. The pseudorandom sequence is generated as (11) and xi(k+1) is taken as in Table 1.Figure3 shows the system identification results on different nodes. The upper subfigure shows the convergence of Θ^ and the lower subfigure shows the comparison between the measured value y1(k) and the identified value y^1(k+1)=Θ^Φ(k).Figure 3
Value convergence of matrixΘ^ and the comparison between identified value and the actual measurement.
(a)
Node 1
(b)
Node 2
(c)
Node 3
(d)
Node 4
(e)
Node 5At each node, we sample 160 points for identification. According to Algorithm2, set the significance level α=5%; thus F0.05(2,154)≈3.055. Because all the Hi(2,3)<F0.05(2,154) (we only show 5 out of 20 nodes’ Hi(2,3) in Figure 3), there is no significant performance difference when the system order changes from 3 to 2. So the FD-MAC can be modeled as a second-order linear time-invariant system. Take Node 1 as an example; the estimation of Y(k+1) is(17)Yk+1=yk+1=Θ^Φk=b^1,b^2,a^1,a^2yk,yk-1,xk,xk-1T.As shown in Figure 3, Θ^ is different on different nodes and stabilized after about 25 seconds, which means the system model can be identified after 50 sampling cycles. Take Figure 3(a) as an example; Θ^1 converges to [0.5174,-0.0372,0.0251,0.4736] on Node 1, so the system transfer function in z-domain is(18)Gz=YzXz=a^1z-1+a^2z-21-b^1z-1-b^2z-2=0.5174z-0.0372z2-0.0251z-0.4736=z-0.0719z-0.7009z+0.6758.From (18), the open loop zeros and poles of Node 1 are all in the unit circle, so the FD-MAC model on Node 1 is a stable system. Similarly, we can get that other WSN nodes in this configuration are stabilized as well.Algorithm 2:Hypothesis testing.
(1)Establishing the null hypothesis:
There is no significant difference betweenj(r) and j(r-1),
when system order changes formr to r-1;
(2)Calculating statistics variable:
FromJ, we can get H according to (15);
(3)Judgement:
Chosen significance levelα=0.05, Searching critical value
table forF-test with freedom of 2 and M-2r, that is,
Fα(2,M-2r)
(4)IF  Hi(r-1,r)≤Fα(2,M-2r), the null hypothesis can
be accepted and rejected conversely.


### 3.5. Least-Beat Controller Design

As shown in Figure2, the closed-loop transfer function in Z-domain is(19)Fz=DzGz1+DzGz.Thanks to the Least-Beat Control approach, the system output can follow the input signal in very several sampling time and can limit the steady-state error to zero (zero steady-state error system). The typical input signal in z-domain is as (20), such as unit-step function, unit-ramp function, and unit of acceleration function:(20)Ydesirez=Az1-z-1m.So the deviation E in z-domain is(21)Ez=FezYdesirez=FezAz1-z-1m,where Fe(z)=1-F(z). In order to force the system as a zero steady-state error system, according to z-transfer expiration-value theorem, the system steady-state error is(22)E∞=limz→1⁡1-z-1Ez=limz→1⁡1-z-1FezAz1-z-1m.If E(∞)=0, Fe must have factor of (1-z-1)m. In actual WSN application, the priorities of frame flow are generally constant or lower-frequency changing, so unit-step function is used as the input signal for Ydesire; that is, m=1. Put F(z)=z-1 into (19); there is(23)DzGz1+DzGz=z-1,Dz=z-11-z-1Gz.According to (18),(24)Dz=XzEz=1-b^1z-1-b^2z-2a^1+a^2-a^1z-1+a^2z-2;the corresponding Least-Beat controller difference equation on Node 1 is x(k)=1/a^1[e(k)-b^1e(k-1)-b^2e(k-2)-(a^2-a^1)x(k-1)-a^2x(k-2)]. Similarly, we can acquire the Least-Beat controllers for the other nodes as well.


## 3.1. Proportional Delay Differentiation

Suppose there areN types of frame categories in WSN. The control object is to maintain the actual QoS parameters to meet (1)ζiζj=δiδj,i,j=1,…,N.Generally,i and j are the consecutive integers. In this paper, ζi is the average node-to-node delay between the sender and receiver, and δi is the priority parameter of class i set by SLA. The class with smaller δ is higher priority and expects a lower delay.


## 3.2. Linear-Differ Binary Exponential Back-off Scheme

In IEEE 802.11 distributed coordination function (DCF), the node which has buffered MAC frames starts carrier sense with a random back-off. The back-off time is an integer measured with the time slots number. The initial value of back-off time is randomly chosen in the range of[0,W0-1], where W0=Wmin. Once the collision is detected, the node performs another random back-off in the range of [0,Wτ-1], τ≤τmax-1, where τ is the time that the medium is consecutively sensed to be busy. After τmax times of back-off, the current frame is discarded. Let Wτ=min⁡(2τWmin,Wmax), τ=0,…,τmax-1, where Wmin and Wmax are the predefined default parameters. This back-off protocol is known as binary exponential back-off (BEB).In order to provide the differentiated accessing probability, we design a Linear-Differ binary exponential back-off (LD-BEB) scheme by adopting different initial up boundary of back-off time dynamically, which is the system manipulation. At thekth sampling time, the system input is (2)Xk=x1k,x2k,…,xN-1kT,1≤xik≤WmaxWmin.To maximize the medium utilization, the initial up boundary of back-off time for the highest priority must always start with Wmin, which means x=1. So X(k) has only I=N-1 independent variables.During thekth and k+1th sampling time, the initial back-off time is randomly chosen in the range of [0,xi(k)Wmin-1]. Once the initial back-off time is set, this frame starts contention for medium accessing. If collision is detected, the back-off time is reset in the range of [0,Wτ-1] without recalculating xi(k): (3)0,Wτ-1,Wτ=min⁡xik·2τWmin,Wmax,where τ is the collision times consecutively detected. Notice that X(k) is not related to the back-off time resetting when the collision happens, which guarantees the fairness of different priorities.


## 3.3. System Modeling

Figure2 shows the control model of FD-MAC. Define yi(k) and yidesire as the normalized delay and normalized desired QoS value according to (1):(4)yik=ζik∑l=1Nζlk,yidesire=δi∑l=1Nδl,1≤i≤N.Because of ∑i=1N‍yi(k)=1 and ∑i=1N‍yidesire=1, the system output also has O=N-1 independent variables. Supposing(5)Yk=y1k,y2k,…,yN-1kT,Ydesire=y1desire,y2desire,…,yN-1desireT,E(k) is the deviation between the measured normalized delay and its desired value: (6)Ek=Yk-Ydesire.The QoS controller operates by responding to the deviation, that is, adjusting the accessing probability by changing the up boundary of MAC frames’ back-off time. Thus the proportional delay differentiation is sustained. Despite the uncertainty of medium accessing, the inherent self-stabilization of feedback mechanism liberates us from calculating the back-off time for every frame precisely.Figure 2
Control model of FD-MAC.


## 3.4. System Identification and Validation

The input and output of FD-MAC model are shown as in Figure2. Strictly speaking, we require a discrete and nonlinear model for FD-MAC. However, such a nonlinear model is not amenable to the straightforward theoretical design and analysis. So the following linear model is used to approximate the system. Supposing r-order could be precise enough, the corresponding difference equation is(7)Yk=∑j=1rajYk-j+bjXk-j,and the z-domain transformation is(8)Az-1Yk=Bz-1Xk+Ek,where E(k)=[ε1(k),ε2(k),…,εN-1(k)]T is O-order white noise sequence. Consider (9)Az-1=I-A1z-1-⋯-Arz-r,Ai∈RO×O,0<i≤r.Bz-1=B1z-1+⋯+Brz-r,Bj∈RO×I,0<j≤r,so (8) can be rewritten as (10)Yk+1=ΘΦk+εk+1,where Θ=[B1,…,Br,A1,…,Ar], k≥r-1, Φ(k)=[XT(k),…,XT(k-r+1),YT(k),…,YT(k-r+1)]r, and Θ∈RO×[O×2×r].We take Recursive Least Square (RLS) algorithm to estimate the parameter matrixΘ and F-test to determinate the system order.


### 3.4.1. Determining Parameter MatrixΘ

First, we design the system identification experiment. The pseudorandom sequence with white noise similarity is used as the impulse to stimulate WSN system. At every sampling time, the up boundary of back-off time is set different value according to the pseudorandom sequence, which is generated as (11). We set p=7 and q=12. Consider(11)ϵk=ϵk-p+ϵk-qmod  4.Suppose this WSN generates and transfers two categories of MAC frames; that is, N=2. The initial up boundary of back-off time is adjusted according to Table 1 and (3).Table 1
Relation ofϵ(k) and X when p=7, q=12.
ϵ
(
k
)
x
1
(
k
+
1
)
x
2
(
k
+
1
)
0
1
2
0
1
1
2
3
2
1
2
6
3
1
2
9SupposeΘ^q is the estimation of Θ from the former q(q≥r-1) sampled data. After the q+1th sampling time, Θ^q can be revised as (12)Θ^q+1=Θ^q+Yk+1-Θ^qΦkΦTkPqλ+ΦTkPqΦk,where(13)Pq+1-1=Pq-1+1+λ-1ΦTkPqΦkΦTkΦk2ΦkΦTk,Pq is the covariance matrix, and λ is the forgetting factor. Φ, Y are measured by QoS monitor. By selecting appropriate Θ^0 and P0, we could get the estimation of parameter matrix.


### 3.4.2. Determining System Orderr

Second, we need to determine the system orderr by F-test. We define aloss functionj(r) to describe the variance between the identified Y^ and its measured value: (14)jr=∑k=rM+r-1Yk+1-Y^k+12=∑k=rM+r-1Yk+1-Θ^qΦk2,where · is vector norm 2 and M is the sampling amount.Supposingr1 and r2 are the consecutive orders of system (r2>r1), then statistics variable H is constructed as follows: (15)Hr1,r2=jr1-jr2jr2M-2r22r2-r1.If M is large enough, H(r1,r2) obeys F-distribution: (16)H~F2r2-r1,M-2r2.Algorithm 1 shows the pseudocode for j(r).Algorithm 1:FD-MAC system identification.
(1)Begin
(2) Setr be the maximum possible order, that is, r=rmax⁡.
(3)q=0, k=r-1, chose an appropriate θ^0 and P0.
(4)Φ(k) is constructed according to the former [k-r+1,k] sample data.
(5)θ^q+1 and Pq+1 is calculated as (12).
(6)k=k+1, q=q+1.
(7) IFk≤M, goto (4); Else θ^M-r+1 is the RLS estimation of this r-order system.
(8)j(r) is calculated as (14).
(9)r=r-1.
(10) IFr≥1, goto (3).
(11)End.ThenJ=[j(1),j(2),…,j(rmax)]T is obtained, where j(r) is the loss function value in r-order system. Our experiments are operated by ZigBit 900 hardware module, which is a 784/868/915 MHz IEEE 802.15.4 OEM module. The details of FD-MAC hardware implementations are in Section 4.1. We deploy 20 ZigBit 900 nodes with the positions in the radius of 100 meters. The transmitted power is 1 mW, Wmin=23, Wmax=28, and τmax=3. The average frame length is 105 bytes and the symbol rate is 256 kbps. The pseudorandom sequence is generated as (11) and xi(k+1) is taken as in Table 1.Figure3 shows the system identification results on different nodes. The upper subfigure shows the convergence of Θ^ and the lower subfigure shows the comparison between the measured value y1(k) and the identified value y^1(k+1)=Θ^Φ(k).Figure 3
Value convergence of matrixΘ^ and the comparison between identified value and the actual measurement.
(a)
Node 1
(b)
Node 2
(c)
Node 3
(d)
Node 4
(e)
Node 5At each node, we sample 160 points for identification. According to Algorithm2, set the significance level α=5%; thus F0.05(2,154)≈3.055. Because all the Hi(2,3)<F0.05(2,154) (we only show 5 out of 20 nodes’ Hi(2,3) in Figure 3), there is no significant performance difference when the system order changes from 3 to 2. So the FD-MAC can be modeled as a second-order linear time-invariant system. Take Node 1 as an example; the estimation of Y(k+1) is(17)Yk+1=yk+1=Θ^Φk=b^1,b^2,a^1,a^2yk,yk-1,xk,xk-1T.As shown in Figure 3, Θ^ is different on different nodes and stabilized after about 25 seconds, which means the system model can be identified after 50 sampling cycles. Take Figure 3(a) as an example; Θ^1 converges to [0.5174,-0.0372,0.0251,0.4736] on Node 1, so the system transfer function in z-domain is(18)Gz=YzXz=a^1z-1+a^2z-21-b^1z-1-b^2z-2=0.5174z-0.0372z2-0.0251z-0.4736=z-0.0719z-0.7009z+0.6758.From (18), the open loop zeros and poles of Node 1 are all in the unit circle, so the FD-MAC model on Node 1 is a stable system. Similarly, we can get that other WSN nodes in this configuration are stabilized as well.Algorithm 2:Hypothesis testing.
(1)Establishing the null hypothesis:
There is no significant difference betweenj(r) and j(r-1),
when system order changes formr to r-1;
(2)Calculating statistics variable:
FromJ, we can get H according to (15);
(3)Judgement:
Chosen significance levelα=0.05, Searching critical value
table forF-test with freedom of 2 and M-2r, that is,
Fα(2,M-2r)
(4)IF  Hi(r-1,r)≤Fα(2,M-2r), the null hypothesis can
be accepted and rejected conversely.


## 3.4.1. Determining Parameter MatrixΘ

First, we design the system identification experiment. The pseudorandom sequence with white noise similarity is used as the impulse to stimulate WSN system. At every sampling time, the up boundary of back-off time is set different value according to the pseudorandom sequence, which is generated as (11). We set p=7 and q=12. Consider(11)ϵk=ϵk-p+ϵk-qmod  4.Suppose this WSN generates and transfers two categories of MAC frames; that is, N=2. The initial up boundary of back-off time is adjusted according to Table 1 and (3).Table 1
Relation ofϵ(k) and X when p=7, q=12.
ϵ
(
k
)
x
1
(
k
+
1
)
x
2
(
k
+
1
)
0
1
2
0
1
1
2
3
2
1
2
6
3
1
2
9SupposeΘ^q is the estimation of Θ from the former q(q≥r-1) sampled data. After the q+1th sampling time, Θ^q can be revised as (12)Θ^q+1=Θ^q+Yk+1-Θ^qΦkΦTkPqλ+ΦTkPqΦk,where(13)Pq+1-1=Pq-1+1+λ-1ΦTkPqΦkΦTkΦk2ΦkΦTk,Pq is the covariance matrix, and λ is the forgetting factor. Φ, Y are measured by QoS monitor. By selecting appropriate Θ^0 and P0, we could get the estimation of parameter matrix.


## 3.4.2. Determining System Orderr

Second, we need to determine the system orderr by F-test. We define aloss functionj(r) to describe the variance between the identified Y^ and its measured value: (14)jr=∑k=rM+r-1Yk+1-Y^k+12=∑k=rM+r-1Yk+1-Θ^qΦk2,where · is vector norm 2 and M is the sampling amount.Supposingr1 and r2 are the consecutive orders of system (r2>r1), then statistics variable H is constructed as follows: (15)Hr1,r2=jr1-jr2jr2M-2r22r2-r1.If M is large enough, H(r1,r2) obeys F-distribution: (16)H~F2r2-r1,M-2r2.Algorithm 1 shows the pseudocode for j(r).Algorithm 1:FD-MAC system identification.
(1)Begin
(2) Setr be the maximum possible order, that is, r=rmax⁡.
(3)q=0, k=r-1, chose an appropriate θ^0 and P0.
(4)Φ(k) is constructed according to the former [k-r+1,k] sample data.
(5)θ^q+1 and Pq+1 is calculated as (12).
(6)k=k+1, q=q+1.
(7) IFk≤M, goto (4); Else θ^M-r+1 is the RLS estimation of this r-order system.
(8)j(r) is calculated as (14).
(9)r=r-1.
(10) IFr≥1, goto (3).
(11)End.ThenJ=[j(1),j(2),…,j(rmax)]T is obtained, where j(r) is the loss function value in r-order system. Our experiments are operated by ZigBit 900 hardware module, which is a 784/868/915 MHz IEEE 802.15.4 OEM module. The details of FD-MAC hardware implementations are in Section 4.1. We deploy 20 ZigBit 900 nodes with the positions in the radius of 100 meters. The transmitted power is 1 mW, Wmin=23, Wmax=28, and τmax=3. The average frame length is 105 bytes and the symbol rate is 256 kbps. The pseudorandom sequence is generated as (11) and xi(k+1) is taken as in Table 1.Figure3 shows the system identification results on different nodes. The upper subfigure shows the convergence of Θ^ and the lower subfigure shows the comparison between the measured value y1(k) and the identified value y^1(k+1)=Θ^Φ(k).Figure 3
Value convergence of matrixΘ^ and the comparison between identified value and the actual measurement.
(a)
Node 1
(b)
Node 2
(c)
Node 3
(d)
Node 4
(e)
Node 5At each node, we sample 160 points for identification. According to Algorithm2, set the significance level α=5%; thus F0.05(2,154)≈3.055. Because all the Hi(2,3)<F0.05(2,154) (we only show 5 out of 20 nodes’ Hi(2,3) in Figure 3), there is no significant performance difference when the system order changes from 3 to 2. So the FD-MAC can be modeled as a second-order linear time-invariant system. Take Node 1 as an example; the estimation of Y(k+1) is(17)Yk+1=yk+1=Θ^Φk=b^1,b^2,a^1,a^2yk,yk-1,xk,xk-1T.As shown in Figure 3, Θ^ is different on different nodes and stabilized after about 25 seconds, which means the system model can be identified after 50 sampling cycles. Take Figure 3(a) as an example; Θ^1 converges to [0.5174,-0.0372,0.0251,0.4736] on Node 1, so the system transfer function in z-domain is(18)Gz=YzXz=a^1z-1+a^2z-21-b^1z-1-b^2z-2=0.5174z-0.0372z2-0.0251z-0.4736=z-0.0719z-0.7009z+0.6758.From (18), the open loop zeros and poles of Node 1 are all in the unit circle, so the FD-MAC model on Node 1 is a stable system. Similarly, we can get that other WSN nodes in this configuration are stabilized as well.Algorithm 2:Hypothesis testing.
(1)Establishing the null hypothesis:
There is no significant difference betweenj(r) and j(r-1),
when system order changes formr to r-1;
(2)Calculating statistics variable:
FromJ, we can get H according to (15);
(3)Judgement:
Chosen significance levelα=0.05, Searching critical value
table forF-test with freedom of 2 and M-2r, that is,
Fα(2,M-2r)
(4)IF  Hi(r-1,r)≤Fα(2,M-2r), the null hypothesis can
be accepted and rejected conversely.


## 3.5. Least-Beat Controller Design

As shown in Figure2, the closed-loop transfer function in Z-domain is(19)Fz=DzGz1+DzGz.Thanks to the Least-Beat Control approach, the system output can follow the input signal in very several sampling time and can limit the steady-state error to zero (zero steady-state error system). The typical input signal in z-domain is as (20), such as unit-step function, unit-ramp function, and unit of acceleration function:(20)Ydesirez=Az1-z-1m.So the deviation E in z-domain is(21)Ez=FezYdesirez=FezAz1-z-1m,where Fe(z)=1-F(z). In order to force the system as a zero steady-state error system, according to z-transfer expiration-value theorem, the system steady-state error is(22)E∞=limz→1⁡1-z-1Ez=limz→1⁡1-z-1FezAz1-z-1m.If E(∞)=0, Fe must have factor of (1-z-1)m. In actual WSN application, the priorities of frame flow are generally constant or lower-frequency changing, so unit-step function is used as the input signal for Ydesire; that is, m=1. Put F(z)=z-1 into (19); there is(23)DzGz1+DzGz=z-1,Dz=z-11-z-1Gz.According to (18),(24)Dz=XzEz=1-b^1z-1-b^2z-2a^1+a^2-a^1z-1+a^2z-2;the corresponding Least-Beat controller difference equation on Node 1 is x(k)=1/a^1[e(k)-b^1e(k-1)-b^2e(k-2)-(a^2-a^1)x(k-1)-a^2x(k-2)]. Similarly, we can acquire the Least-Beat controllers for the other nodes as well.


## 4. Experiments and Simulation

### 4.1. Hardware Experiments for FD-MAC in IEEE 802.15.4

Our experiments are operated by ZigBit 900 hardware module with Atmel AVR2025 software package. ZigBit 900 is a 784/868/915 MHz IEEE 802.15.4 OEM module, which contains an ATmega1281V microcontroller and AT86RF212 RF transceiver. AVR2025 is a configurable MAC stack for ZigBit 900, which provides the fundamental abstract methods for hardware operation and a secondary development supported MAC stack. The main points of our implementations based AVR2025 MAC-API are as follows.(1) Traffic Generation. At every node, traffic is generated by continuously sending packets to the other 19 nodes. Independent of traffic generation, Ad Hoc On-Demand Distance Vector (AODV) routing protocol is realized at application layer and a specific thread processes routing maintenance and routing discovery. At MAC layer, the packets are divided into MAC frames. The interval of frame transmission obeys normal distribution with the average of -T¯t/log⁡(1-G). G(0<G<1) is the offered traffic [15], which is normalized by transmission data rate. That is, G=Tt/R. T¯t (bit) is the average MAC frame length and R (bps) is data rate. The frame length in experiments follows Pareto distribution with the shape parameter of 1.1 [16] and average of 105∗8 bits.(2) Cross-Layered Classification. Every MAC frame contains a flag calledPriority_Flag representing its category. In our experiments, there are two types of MAC traffic. Actually, Ydesire is set by the specific management command, which is encapsulated in MAC payload and broadcasted to all the nodes by coordinator.(3) Multiqueueing Isolation. In AVR2025, MAC frames to be transmitted are buffered in a FIFO queue named NHLE-MAC-Queue. We improve this single queue into multiqueueing architecture. According toPriority_Flag, the frames of different categories are pushed into the corresponding queues waiting to be transmitted. The receiving procedure is also improved to multiqueue architecture.(4) Delay Calculation. Thanks to MAC API callback functions, once a frame is transmitted, a callback function will generate a software interruption. By means of this mechanism, the node-to-node delay can be measured by sender node.We developed two groups of comparison experiments to evaluate the dynamic and static performances of FD-MAC on ZigBit 900. The parameters configuration is the same as that in Section3.4. The dynamic property mainly concerns the QoS condition changing with the time on every node, and the static property concerns the system throughput and delay changing with the offered traffic from the view of statistics.


#### 4.1.1. Dynamic Performance of FD-MAC

As shown in Figure4, the first group tests the dynamic performance of the FD-MAC. The x-axis represents time in seconds. In the y-axis direction, that is, vertical axis, Figures 4(a) and 4(b) are the corresponding average node-to-node delay and delay ratio of high priority (Class 1) and low priority (Class 2). Set δ1/δ2=1/2, Ydesire=ydesire=1/3, which means the delay of Class 1 should be half of Class 2. For the picture clearness, we only show the delay ratio of ζ1(k)/ζ2(k) without normalizing and only show 5 out of 20 nodes’ statuses in z-axis as well. The sampling time is 500 milliseconds. In order to test the dynamic performance of FD-MAC compared with the CSMA/CA in IEEE 802.15.4, our experiment uses the controller off-and-then-on model. When the feedback controller is off, FD-MAC degenerates to the standard CSMA/CA. The experiment lasts 80 seconds and the feedback controller starts at about 25 seconds:(1)
At the first 25 seconds, the feedback controller is closed and the initial up boundary of back-off time of each priority is the same. So there is no difference at the average node-to-node delay and the delay ratio is around the value of 1.(2)
When the controller operates after 25 seconds, the initial up boundary of back-off time is dynamically adjusted by the Least-Beat controller according toE(k). So the average node-to-node delay of different priority is distinguished and the delay ratio is converged to the expected value of 1/2. This proves that the FD-MAC architecture has the QoS-enhanced ability.(3)
Since we have modeled FD-MAC as a feedback control model, this controller off-and-then-on model is an equivalent of a step function signal. Figure4 shows the stability and the convergence of FD-MAC outputs, that is, the actual delay ratio of Class 1 and Class 2. Taking control theory to describe the dynamic performance, the system setting time is nearly one sampling time and the steady-state error is nearly zero, which are coincident to the controller design. The system output can converge to the set point in very short time (about 0.5 seconds) and barely has bias in steady state. This demonstrates both the theoretical basis and the feasibility of FD-MAC.Figure 4
The dynamic performance of the FD-MAC.
(a)
Average node-to-node delay
(b)
Delay ratio


#### 4.1.2. Static Statistics Performance of FD-MAC

As shown in Figure5, the second group tests the static statistics performance of the FD-MAC. The x-axis represents the offered traffic per nodes. In the y-axis direction, that is, vertical axis, Figures 5(a), 5(b), and 5(c) are the corresponding node-to-node delay, delay ratio, and frame throughput of high priority (Class 1) and low priority (Class 2). In the z-axis direction, the values of δ1/δ2 are set to be 1/3, 1/2, and 2/3 successively:(1)
Obviously, the delay of high priority (Class 1) is lower than that without the controller, while the delay of low priority (Class 2) is higher than that without the controller.(2)
Figure5(a) shows that no matter what Ydesire changes—that is, corresponding δ1/δ2 varies from 0.33 to 0.5 and then to 0.66—the delay of high priority and low priority can be significantly differentiated. Figure 5(b) shows that the delay ratio always converges to the set points. This not only proves the validity of the FD-MAC again, but also reveals its robustness.(3)
We use legends of “average delay in differentiated control” and “no differentiated control” to present thetotal average delay when the controller is action and inaction in Figure 5(a), that is, FD-MAC at different δ1/δ2 and the standard CSMA/CA. The total average delay is the result of total delay divided by the total frame number, and the total delay is the cumulative summation of all the frame node-to-node delay. Comparing the total average delay in the circumstance of controller action and inaction, it is suggested that FD-MAC can also reduce the total average delay.(4)
The FD-MAC not only works on the node-to-node delay, but also has impact on throughput. As shown in Figure5(c), the throughput can also be distinguished. We use legends of “total throughput in differentiated control” and “no differentiated control” to present thetotal throughput when the controller is action and inaction. The total throughput is actually the value summation of high priority and low priority. It is worth mentioning that, by calculation, the total throughput has no significant changes compared with those when the controller is inaction. This phenomenon implies that FD-MAC has no performance lost on the throughput.Figure 5
The static statistics performances under different desired point.
(a)
Average node-to-node delay
(b)
Delay ratio
(c)
Throughput


### 4.2. Software Simulation and Comparison

#### 4.2.1. Versatility of FD-MAC in IEEE 802.11 a/b

We further take OPNET to evaluate the FD-MAC in IEEE 802.11 a/b, as well as 802.15.4. There are also 20 nodes with the positions in a radius of 100 meters. Thex-axis still represents the offered traffic per nodes. y-axis (vertical axis) represents node-to-node delay in Figure 6(a) and throughput in Figure 6(b). Unlike the former two groups of hardware experiments, z-axis presents different MAC protocols. The value of δ1/δ2 is set to 1/2; that is, Ydesire=ydesire=1/3, and the related parameters are set according to Table 2.(1)
From the comparison between the groups of lines atz-axis with δ1/δ2=0.5 in Figures 5(a) and 5(c) and the groups of lines at z-axis with IEEE 802.15.4 in Figures 6(a) and 6(b), it should be noted that, in OPNET simulation, the delay and the throughput have similar order of magnitude to those in our hardware experiments before. The high priority delay is about 2–4 milliseconds while the counterpart of low priority is about 4–6 milliseconds. The high priority throughput is generally more than 500 frames per second while the counterpart of low priority is generally less than 250 frames per second. This phenomenon proves that our simulation is effective and coincident to the reality.(2)
Besides the former dynamic and static performance evaluation of FD-MAC by ZigBit 900, this Least-Beat feedback control approach can also operate in IEEE 802.11a and IEEE 802.11b. Figure6(a) shows that the high priority’s average node-to-node delay is nearly half of low priority’s, which is also consistent with ydesire again.(3)
Figure6(b) still shows the distinguished phenomenon of throughput. The throughput of high priority is always larger than that of low priority no matter in IEEE 802.11 a/b or IEEE 802.15.4. The relationship of different priorities’ throughput is similar but only diverse in absolute value.(4)
It is worth mentioning that the relationship of throughput of different protocols still reflects their basic parameters in FD-MAC, such as frame length and data rate. It is obvious that the frame throughput is directly proportional to the data rate and inversely proportional to the frame length. On the premise of the same average frame length (see Table2), no matter high or low priority, the throughput of IEEE 802.11a is about 5 times IEEE 802.11b, which is the same multiple relationship with the default data rate. For IEEE 802.15.4, its data rate is about 1/40 of IEEE 802.11b and its average frame length is about 1/15 of IEEE 802.11b (see Table 2). The proportionality factor of 1/40 offsets the inverse proportionality factor of 1/15. So the throughput of IEEE 802.15.4 is about 3/8 (15/40=3/8) of IEEE 802.11b and similarity about 3/40 of IEEE 802.11a.Table 2
System parameters used in simulation.
IEEE 802.11b
IEEE 802.11a
IEEE 802.15.4
Transmitted power
30 mW
30 mW
1 mW
Ave. frame length
1500 bytes
1500 bytes
105 bytes
Data rate
11 Mbps
54 Mbps
250 kbps
Slot time
20μs
9μs
320μs
SIFS time
10μs
16μs
192μs
C
W
min
⁡
31
15
7
C
W
max
⁡
1023
1023
31Figure 6
FD-MAC in IEEE 802.11 a/b and 802.15.4.
(a)
Average node-to-node delay
(b)
Throughput


#### 4.2.2. Control Performance for FD-MAC and Diff-MAC Comparison

Finally, we compare the convergence of delay ratio in FD-MAC and Diff-MAC in Figure7(a), as well as their corresponding initial up boundary of contention window in Figure 7(b). The nodes arrangement is the same as that in Section 4.2.1, that is, 20 nodes randomly distributed in a radius of 100 meters. Figures 7(a) and 7(b) only show 5 out of 20 nodes; Figure 7(c) is the slice of Figures 7(a) and 7(b) for Node 1. Our comparisons are enforced in IEEE 802.15.4 and IEEE 802.11 a/b. The phenomena are similar, so Figure 7 only shows the result in IEEE 802.15.4. For the curves being clearly recognized, the value of δ1/δ2 is set to be 2 this time, which means Class 1 is not the high priority any more. The delay of Class 1 should be two times of Class 2 instead. The x-axis represents the time in second. y-axis (vertical axis) represents delay ratio in Figure 7(a) and Class 1’s up boundary of initial contention window Wτ in Figure 7(b). z-axis presents nodes number. The simulation also lasts 80 seconds and both controllers start at 25 seconds.(1)
The controller off-and-then-on model is an equivalent of a step function signal, so this simulation reveals the impulse response of FD-MAC architecture. As shown in Figure7(a), although both Diff-MAC and FD-MAC can provide a differentiated service, Diff-MAC induces the larger jitter and underdamping oscillation. We define the relative variance Ψ(Y) to be a control performance metric: (25)ΨY=∑k=1IYk-Ydesire2/IYdesire.I is the sampled number. A smaller Ψ(Y) indicates a better stability in which controller can keep Y(k) at Ydesire. Taking Node 1 as an example, by calculation, ΨFD-MAC=0.1823 and ΨDiff-MAC=0.3952; the relative variance of our Least-Beat control method is only 46% of Diff-MAC.(2)
FD-MAC outperforms Diff-MAC in tracking the desired valueYdesire(k) for two reasons. First, without the analysis of the controlled object model, the designed controller could rarely match the feature of controlled object. Second, the control method used in [6] could hardly be considered as a proportional (P) control, because the deviation E(k) is only used as an on-off quantity to control whether to decrease or increase the CW size, but the quantities of changes are a prefixed value. The consequence is that the crucial resources, that is, the CW size, may not be swiftly adjusted to a proper value. Figures 7(b) and 7(c) show some clues for this. The improper CW size causes the jitter of delay ratio, and the bad-designed controller could not correct the error by providing a right increment and polarity for CW size, which in turn exacerbates the delay ratio. In the worst case, the delay ratio may diverge, which also induces the throughput degradation and total average delay enlargement.Figure 7
FD-MAC versus Diff-MAC.
(a)
Delay ratio
(b)
Initial up boundary of CW
(c)
Slice of Node 1 for delay ratio and initial up boundary of CW


## 4.1. Hardware Experiments for FD-MAC in IEEE 802.15.4

Our experiments are operated by ZigBit 900 hardware module with Atmel AVR2025 software package. ZigBit 900 is a 784/868/915 MHz IEEE 802.15.4 OEM module, which contains an ATmega1281V microcontroller and AT86RF212 RF transceiver. AVR2025 is a configurable MAC stack for ZigBit 900, which provides the fundamental abstract methods for hardware operation and a secondary development supported MAC stack. The main points of our implementations based AVR2025 MAC-API are as follows.(1) Traffic Generation. At every node, traffic is generated by continuously sending packets to the other 19 nodes. Independent of traffic generation, Ad Hoc On-Demand Distance Vector (AODV) routing protocol is realized at application layer and a specific thread processes routing maintenance and routing discovery. At MAC layer, the packets are divided into MAC frames. The interval of frame transmission obeys normal distribution with the average of -T¯t/log⁡(1-G). G(0<G<1) is the offered traffic [15], which is normalized by transmission data rate. That is, G=Tt/R. T¯t (bit) is the average MAC frame length and R (bps) is data rate. The frame length in experiments follows Pareto distribution with the shape parameter of 1.1 [16] and average of 105∗8 bits.(2) Cross-Layered Classification. Every MAC frame contains a flag calledPriority_Flag representing its category. In our experiments, there are two types of MAC traffic. Actually, Ydesire is set by the specific management command, which is encapsulated in MAC payload and broadcasted to all the nodes by coordinator.(3) Multiqueueing Isolation. In AVR2025, MAC frames to be transmitted are buffered in a FIFO queue named NHLE-MAC-Queue. We improve this single queue into multiqueueing architecture. According toPriority_Flag, the frames of different categories are pushed into the corresponding queues waiting to be transmitted. The receiving procedure is also improved to multiqueue architecture.(4) Delay Calculation. Thanks to MAC API callback functions, once a frame is transmitted, a callback function will generate a software interruption. By means of this mechanism, the node-to-node delay can be measured by sender node.We developed two groups of comparison experiments to evaluate the dynamic and static performances of FD-MAC on ZigBit 900. The parameters configuration is the same as that in Section3.4. The dynamic property mainly concerns the QoS condition changing with the time on every node, and the static property concerns the system throughput and delay changing with the offered traffic from the view of statistics.


### 4.1.1. Dynamic Performance of FD-MAC

As shown in Figure4, the first group tests the dynamic performance of the FD-MAC. The x-axis represents time in seconds. In the y-axis direction, that is, vertical axis, Figures 4(a) and 4(b) are the corresponding average node-to-node delay and delay ratio of high priority (Class 1) and low priority (Class 2). Set δ1/δ2=1/2, Ydesire=ydesire=1/3, which means the delay of Class 1 should be half of Class 2. For the picture clearness, we only show the delay ratio of ζ1(k)/ζ2(k) without normalizing and only show 5 out of 20 nodes’ statuses in z-axis as well. The sampling time is 500 milliseconds. In order to test the dynamic performance of FD-MAC compared with the CSMA/CA in IEEE 802.15.4, our experiment uses the controller off-and-then-on model. When the feedback controller is off, FD-MAC degenerates to the standard CSMA/CA. The experiment lasts 80 seconds and the feedback controller starts at about 25 seconds:(1)
At the first 25 seconds, the feedback controller is closed and the initial up boundary of back-off time of each priority is the same. So there is no difference at the average node-to-node delay and the delay ratio is around the value of 1.(2)
When the controller operates after 25 seconds, the initial up boundary of back-off time is dynamically adjusted by the Least-Beat controller according toE(k). So the average node-to-node delay of different priority is distinguished and the delay ratio is converged to the expected value of 1/2. This proves that the FD-MAC architecture has the QoS-enhanced ability.(3)
Since we have modeled FD-MAC as a feedback control model, this controller off-and-then-on model is an equivalent of a step function signal. Figure4 shows the stability and the convergence of FD-MAC outputs, that is, the actual delay ratio of Class 1 and Class 2. Taking control theory to describe the dynamic performance, the system setting time is nearly one sampling time and the steady-state error is nearly zero, which are coincident to the controller design. The system output can converge to the set point in very short time (about 0.5 seconds) and barely has bias in steady state. This demonstrates both the theoretical basis and the feasibility of FD-MAC.Figure 4
The dynamic performance of the FD-MAC.
(a)
Average node-to-node delay
(b)
Delay ratio


### 4.1.2. Static Statistics Performance of FD-MAC

As shown in Figure5, the second group tests the static statistics performance of the FD-MAC. The x-axis represents the offered traffic per nodes. In the y-axis direction, that is, vertical axis, Figures 5(a), 5(b), and 5(c) are the corresponding node-to-node delay, delay ratio, and frame throughput of high priority (Class 1) and low priority (Class 2). In the z-axis direction, the values of δ1/δ2 are set to be 1/3, 1/2, and 2/3 successively:(1)
Obviously, the delay of high priority (Class 1) is lower than that without the controller, while the delay of low priority (Class 2) is higher than that without the controller.(2)
Figure5(a) shows that no matter what Ydesire changes—that is, corresponding δ1/δ2 varies from 0.33 to 0.5 and then to 0.66—the delay of high priority and low priority can be significantly differentiated. Figure 5(b) shows that the delay ratio always converges to the set points. This not only proves the validity of the FD-MAC again, but also reveals its robustness.(3)
We use legends of “average delay in differentiated control” and “no differentiated control” to present thetotal average delay when the controller is action and inaction in Figure 5(a), that is, FD-MAC at different δ1/δ2 and the standard CSMA/CA. The total average delay is the result of total delay divided by the total frame number, and the total delay is the cumulative summation of all the frame node-to-node delay. Comparing the total average delay in the circumstance of controller action and inaction, it is suggested that FD-MAC can also reduce the total average delay.(4)
The FD-MAC not only works on the node-to-node delay, but also has impact on throughput. As shown in Figure5(c), the throughput can also be distinguished. We use legends of “total throughput in differentiated control” and “no differentiated control” to present thetotal throughput when the controller is action and inaction. The total throughput is actually the value summation of high priority and low priority. It is worth mentioning that, by calculation, the total throughput has no significant changes compared with those when the controller is inaction. This phenomenon implies that FD-MAC has no performance lost on the throughput.Figure 5
The static statistics performances under different desired point.
(a)
Average node-to-node delay
(b)
Delay ratio
(c)
Throughput


## 4.1.1. Dynamic Performance of FD-MAC

As shown in Figure4, the first group tests the dynamic performance of the FD-MAC. The x-axis represents time in seconds. In the y-axis direction, that is, vertical axis, Figures 4(a) and 4(b) are the corresponding average node-to-node delay and delay ratio of high priority (Class 1) and low priority (Class 2). Set δ1/δ2=1/2, Ydesire=ydesire=1/3, which means the delay of Class 1 should be half of Class 2. For the picture clearness, we only show the delay ratio of ζ1(k)/ζ2(k) without normalizing and only show 5 out of 20 nodes’ statuses in z-axis as well. The sampling time is 500 milliseconds. In order to test the dynamic performance of FD-MAC compared with the CSMA/CA in IEEE 802.15.4, our experiment uses the controller off-and-then-on model. When the feedback controller is off, FD-MAC degenerates to the standard CSMA/CA. The experiment lasts 80 seconds and the feedback controller starts at about 25 seconds:(1)
At the first 25 seconds, the feedback controller is closed and the initial up boundary of back-off time of each priority is the same. So there is no difference at the average node-to-node delay and the delay ratio is around the value of 1.(2)
When the controller operates after 25 seconds, the initial up boundary of back-off time is dynamically adjusted by the Least-Beat controller according toE(k). So the average node-to-node delay of different priority is distinguished and the delay ratio is converged to the expected value of 1/2. This proves that the FD-MAC architecture has the QoS-enhanced ability.(3)
Since we have modeled FD-MAC as a feedback control model, this controller off-and-then-on model is an equivalent of a step function signal. Figure4 shows the stability and the convergence of FD-MAC outputs, that is, the actual delay ratio of Class 1 and Class 2. Taking control theory to describe the dynamic performance, the system setting time is nearly one sampling time and the steady-state error is nearly zero, which are coincident to the controller design. The system output can converge to the set point in very short time (about 0.5 seconds) and barely has bias in steady state. This demonstrates both the theoretical basis and the feasibility of FD-MAC.Figure 4
The dynamic performance of the FD-MAC.
(a)
Average node-to-node delay
(b)
Delay ratio


## 4.1.2. Static Statistics Performance of FD-MAC

As shown in Figure5, the second group tests the static statistics performance of the FD-MAC. The x-axis represents the offered traffic per nodes. In the y-axis direction, that is, vertical axis, Figures 5(a), 5(b), and 5(c) are the corresponding node-to-node delay, delay ratio, and frame throughput of high priority (Class 1) and low priority (Class 2). In the z-axis direction, the values of δ1/δ2 are set to be 1/3, 1/2, and 2/3 successively:(1)
Obviously, the delay of high priority (Class 1) is lower than that without the controller, while the delay of low priority (Class 2) is higher than that without the controller.(2)
Figure5(a) shows that no matter what Ydesire changes—that is, corresponding δ1/δ2 varies from 0.33 to 0.5 and then to 0.66—the delay of high priority and low priority can be significantly differentiated. Figure 5(b) shows that the delay ratio always converges to the set points. This not only proves the validity of the FD-MAC again, but also reveals its robustness.(3)
We use legends of “average delay in differentiated control” and “no differentiated control” to present thetotal average delay when the controller is action and inaction in Figure 5(a), that is, FD-MAC at different δ1/δ2 and the standard CSMA/CA. The total average delay is the result of total delay divided by the total frame number, and the total delay is the cumulative summation of all the frame node-to-node delay. Comparing the total average delay in the circumstance of controller action and inaction, it is suggested that FD-MAC can also reduce the total average delay.(4)
The FD-MAC not only works on the node-to-node delay, but also has impact on throughput. As shown in Figure5(c), the throughput can also be distinguished. We use legends of “total throughput in differentiated control” and “no differentiated control” to present thetotal throughput when the controller is action and inaction. The total throughput is actually the value summation of high priority and low priority. It is worth mentioning that, by calculation, the total throughput has no significant changes compared with those when the controller is inaction. This phenomenon implies that FD-MAC has no performance lost on the throughput.Figure 5
The static statistics performances under different desired point.
(a)
Average node-to-node delay
(b)
Delay ratio
(c)
Throughput


## 4.2. Software Simulation and Comparison

### 4.2.1. Versatility of FD-MAC in IEEE 802.11 a/b

We further take OPNET to evaluate the FD-MAC in IEEE 802.11 a/b, as well as 802.15.4. There are also 20 nodes with the positions in a radius of 100 meters. Thex-axis still represents the offered traffic per nodes. y-axis (vertical axis) represents node-to-node delay in Figure 6(a) and throughput in Figure 6(b). Unlike the former two groups of hardware experiments, z-axis presents different MAC protocols. The value of δ1/δ2 is set to 1/2; that is, Ydesire=ydesire=1/3, and the related parameters are set according to Table 2.(1)
From the comparison between the groups of lines atz-axis with δ1/δ2=0.5 in Figures 5(a) and 5(c) and the groups of lines at z-axis with IEEE 802.15.4 in Figures 6(a) and 6(b), it should be noted that, in OPNET simulation, the delay and the throughput have similar order of magnitude to those in our hardware experiments before. The high priority delay is about 2–4 milliseconds while the counterpart of low priority is about 4–6 milliseconds. The high priority throughput is generally more than 500 frames per second while the counterpart of low priority is generally less than 250 frames per second. This phenomenon proves that our simulation is effective and coincident to the reality.(2)
Besides the former dynamic and static performance evaluation of FD-MAC by ZigBit 900, this Least-Beat feedback control approach can also operate in IEEE 802.11a and IEEE 802.11b. Figure6(a) shows that the high priority’s average node-to-node delay is nearly half of low priority’s, which is also consistent with ydesire again.(3)
Figure6(b) still shows the distinguished phenomenon of throughput. The throughput of high priority is always larger than that of low priority no matter in IEEE 802.11 a/b or IEEE 802.15.4. The relationship of different priorities’ throughput is similar but only diverse in absolute value.(4)
It is worth mentioning that the relationship of throughput of different protocols still reflects their basic parameters in FD-MAC, such as frame length and data rate. It is obvious that the frame throughput is directly proportional to the data rate and inversely proportional to the frame length. On the premise of the same average frame length (see Table2), no matter high or low priority, the throughput of IEEE 802.11a is about 5 times IEEE 802.11b, which is the same multiple relationship with the default data rate. For IEEE 802.15.4, its data rate is about 1/40 of IEEE 802.11b and its average frame length is about 1/15 of IEEE 802.11b (see Table 2). The proportionality factor of 1/40 offsets the inverse proportionality factor of 1/15. So the throughput of IEEE 802.15.4 is about 3/8 (15/40=3/8) of IEEE 802.11b and similarity about 3/40 of IEEE 802.11a.Table 2
System parameters used in simulation.
IEEE 802.11b
IEEE 802.11a
IEEE 802.15.4
Transmitted power
30 mW
30 mW
1 mW
Ave. frame length
1500 bytes
1500 bytes
105 bytes
Data rate
11 Mbps
54 Mbps
250 kbps
Slot time
20μs
9μs
320μs
SIFS time
10μs
16μs
192μs
C
W
min
⁡
31
15
7
C
W
max
⁡
1023
1023
31Figure 6
FD-MAC in IEEE 802.11 a/b and 802.15.4.
(a)
Average node-to-node delay
(b)
Throughput


### 4.2.2. Control Performance for FD-MAC and Diff-MAC Comparison

Finally, we compare the convergence of delay ratio in FD-MAC and Diff-MAC in Figure7(a), as well as their corresponding initial up boundary of contention window in Figure 7(b). The nodes arrangement is the same as that in Section 4.2.1, that is, 20 nodes randomly distributed in a radius of 100 meters. Figures 7(a) and 7(b) only show 5 out of 20 nodes; Figure 7(c) is the slice of Figures 7(a) and 7(b) for Node 1. Our comparisons are enforced in IEEE 802.15.4 and IEEE 802.11 a/b. The phenomena are similar, so Figure 7 only shows the result in IEEE 802.15.4. For the curves being clearly recognized, the value of δ1/δ2 is set to be 2 this time, which means Class 1 is not the high priority any more. The delay of Class 1 should be two times of Class 2 instead. The x-axis represents the time in second. y-axis (vertical axis) represents delay ratio in Figure 7(a) and Class 1’s up boundary of initial contention window Wτ in Figure 7(b). z-axis presents nodes number. The simulation also lasts 80 seconds and both controllers start at 25 seconds.(1)
The controller off-and-then-on model is an equivalent of a step function signal, so this simulation reveals the impulse response of FD-MAC architecture. As shown in Figure7(a), although both Diff-MAC and FD-MAC can provide a differentiated service, Diff-MAC induces the larger jitter and underdamping oscillation. We define the relative variance Ψ(Y) to be a control performance metric: (25)ΨY=∑k=1IYk-Ydesire2/IYdesire.I is the sampled number. A smaller Ψ(Y) indicates a better stability in which controller can keep Y(k) at Ydesire. Taking Node 1 as an example, by calculation, ΨFD-MAC=0.1823 and ΨDiff-MAC=0.3952; the relative variance of our Least-Beat control method is only 46% of Diff-MAC.(2)
FD-MAC outperforms Diff-MAC in tracking the desired valueYdesire(k) for two reasons. First, without the analysis of the controlled object model, the designed controller could rarely match the feature of controlled object. Second, the control method used in [6] could hardly be considered as a proportional (P) control, because the deviation E(k) is only used as an on-off quantity to control whether to decrease or increase the CW size, but the quantities of changes are a prefixed value. The consequence is that the crucial resources, that is, the CW size, may not be swiftly adjusted to a proper value. Figures 7(b) and 7(c) show some clues for this. The improper CW size causes the jitter of delay ratio, and the bad-designed controller could not correct the error by providing a right increment and polarity for CW size, which in turn exacerbates the delay ratio. In the worst case, the delay ratio may diverge, which also induces the throughput degradation and total average delay enlargement.Figure 7
FD-MAC versus Diff-MAC.
(a)
Delay ratio
(b)
Initial up boundary of CW
(c)
Slice of Node 1 for delay ratio and initial up boundary of CW


## 4.2.1. Versatility of FD-MAC in IEEE 802.11 a/b

We further take OPNET to evaluate the FD-MAC in IEEE 802.11 a/b, as well as 802.15.4. There are also 20 nodes with the positions in a radius of 100 meters. Thex-axis still represents the offered traffic per nodes. y-axis (vertical axis) represents node-to-node delay in Figure 6(a) and throughput in Figure 6(b). Unlike the former two groups of hardware experiments, z-axis presents different MAC protocols. The value of δ1/δ2 is set to 1/2; that is, Ydesire=ydesire=1/3, and the related parameters are set according to Table 2.(1)
From the comparison between the groups of lines atz-axis with δ1/δ2=0.5 in Figures 5(a) and 5(c) and the groups of lines at z-axis with IEEE 802.15.4 in Figures 6(a) and 6(b), it should be noted that, in OPNET simulation, the delay and the throughput have similar order of magnitude to those in our hardware experiments before. The high priority delay is about 2–4 milliseconds while the counterpart of low priority is about 4–6 milliseconds. The high priority throughput is generally more than 500 frames per second while the counterpart of low priority is generally less than 250 frames per second. This phenomenon proves that our simulation is effective and coincident to the reality.(2)
Besides the former dynamic and static performance evaluation of FD-MAC by ZigBit 900, this Least-Beat feedback control approach can also operate in IEEE 802.11a and IEEE 802.11b. Figure6(a) shows that the high priority’s average node-to-node delay is nearly half of low priority’s, which is also consistent with ydesire again.(3)
Figure6(b) still shows the distinguished phenomenon of throughput. The throughput of high priority is always larger than that of low priority no matter in IEEE 802.11 a/b or IEEE 802.15.4. The relationship of different priorities’ throughput is similar but only diverse in absolute value.(4)
It is worth mentioning that the relationship of throughput of different protocols still reflects their basic parameters in FD-MAC, such as frame length and data rate. It is obvious that the frame throughput is directly proportional to the data rate and inversely proportional to the frame length. On the premise of the same average frame length (see Table2), no matter high or low priority, the throughput of IEEE 802.11a is about 5 times IEEE 802.11b, which is the same multiple relationship with the default data rate. For IEEE 802.15.4, its data rate is about 1/40 of IEEE 802.11b and its average frame length is about 1/15 of IEEE 802.11b (see Table 2). The proportionality factor of 1/40 offsets the inverse proportionality factor of 1/15. So the throughput of IEEE 802.15.4 is about 3/8 (15/40=3/8) of IEEE 802.11b and similarity about 3/40 of IEEE 802.11a.Table 2
System parameters used in simulation.
IEEE 802.11b
IEEE 802.11a
IEEE 802.15.4
Transmitted power
30 mW
30 mW
1 mW
Ave. frame length
1500 bytes
1500 bytes
105 bytes
Data rate
11 Mbps
54 Mbps
250 kbps
Slot time
20μs
9μs
320μs
SIFS time
10μs
16μs
192μs
C
W
min
⁡
31
15
7
C
W
max
⁡
1023
1023
31Figure 6
FD-MAC in IEEE 802.11 a/b and 802.15.4.
(a)
Average node-to-node delay
(b)
Throughput


## 4.2.2. Control Performance for FD-MAC and Diff-MAC Comparison

Finally, we compare the convergence of delay ratio in FD-MAC and Diff-MAC in Figure7(a), as well as their corresponding initial up boundary of contention window in Figure 7(b). The nodes arrangement is the same as that in Section 4.2.1, that is, 20 nodes randomly distributed in a radius of 100 meters. Figures 7(a) and 7(b) only show 5 out of 20 nodes; Figure 7(c) is the slice of Figures 7(a) and 7(b) for Node 1. Our comparisons are enforced in IEEE 802.15.4 and IEEE 802.11 a/b. The phenomena are similar, so Figure 7 only shows the result in IEEE 802.15.4. For the curves being clearly recognized, the value of δ1/δ2 is set to be 2 this time, which means Class 1 is not the high priority any more. The delay of Class 1 should be two times of Class 2 instead. The x-axis represents the time in second. y-axis (vertical axis) represents delay ratio in Figure 7(a) and Class 1’s up boundary of initial contention window Wτ in Figure 7(b). z-axis presents nodes number. The simulation also lasts 80 seconds and both controllers start at 25 seconds.(1)
The controller off-and-then-on model is an equivalent of a step function signal, so this simulation reveals the impulse response of FD-MAC architecture. As shown in Figure7(a), although both Diff-MAC and FD-MAC can provide a differentiated service, Diff-MAC induces the larger jitter and underdamping oscillation. We define the relative variance Ψ(Y) to be a control performance metric: (25)ΨY=∑k=1IYk-Ydesire2/IYdesire.I is the sampled number. A smaller Ψ(Y) indicates a better stability in which controller can keep Y(k) at Ydesire. Taking Node 1 as an example, by calculation, ΨFD-MAC=0.1823 and ΨDiff-MAC=0.3952; the relative variance of our Least-Beat control method is only 46% of Diff-MAC.(2)
FD-MAC outperforms Diff-MAC in tracking the desired valueYdesire(k) for two reasons. First, without the analysis of the controlled object model, the designed controller could rarely match the feature of controlled object. Second, the control method used in [6] could hardly be considered as a proportional (P) control, because the deviation E(k) is only used as an on-off quantity to control whether to decrease or increase the CW size, but the quantities of changes are a prefixed value. The consequence is that the crucial resources, that is, the CW size, may not be swiftly adjusted to a proper value. Figures 7(b) and 7(c) show some clues for this. The improper CW size causes the jitter of delay ratio, and the bad-designed controller could not correct the error by providing a right increment and polarity for CW size, which in turn exacerbates the delay ratio. In the worst case, the delay ratio may diverge, which also induces the throughput degradation and total average delay enlargement.Figure 7
FD-MAC versus Diff-MAC.
(a)
Delay ratio
(b)
Initial up boundary of CW
(c)
Slice of Node 1 for delay ratio and initial up boundary of CW


## 5. Conclusion

In order to provide WSN QoS and the differentiated node-to-node delay control, we propose a FD-MAC architecture by dynamically adjusting the medium accessing probability, which is enforced by adopting different initial up boundary of back-off time. The actual delay ratio is guaranteed to be a prefixed value by the Least-Beat control.By means of system identification, for every WSN node, the system can be modeled as a difference linear time-invariant equation. So the specific controller can be designed to drive the system output to the desired value, which means that the higher priority can enjoy comparatively lower delay while the lower priority can also operate without being oversacrificed.The hardware experiments show that the FD-MAC operates effectively in providing proportional delay differentiation in IEEE 802.15.4 and the extended simulations also prove the effectiveness in IEEE 802.11 a/b as well. Compared with the CSMA/CA in IEEE 802.11 a/b and IEEE 802.15.4, the feedback control approach not only has a less average delay and the same throughput, but also has the advantages of QoS-enhanced ability. Compared with Diff-MAC, WSN has a better step response in FD-MAC, which reveals only 48% relative variance compared to that of Diff-MAC.In the future work, we intend to adopt online system identification and self-adaptive control instead of the two separated offline steps, that is, “system identification and controller design.” The extended tests in real WMSN environment that contains the real-time video/audio traffic are also underway.



---

*Source: 8365217-2015-12-21.xml*