Queuing Management in Wireless Sensor Networks for QoS Measurement

Data transmission in multimedia WSNs are required high bandwidth and reliable transfer because of large amount of data size. However, some applications of WSNs are required high quality. In this context, main factor in quality of services (QoS) metrics in WSNs becomes longevity of the network and high quality. In sensor nodes, choosing relevant transceiver and microcontroller components plays important role in assembling sensor devices, in which data controls should be designed so that packet loss is minimized. Available QoS metrics based on queuing/buffer management in wired and other wireless networks don’t applicable in WSNs because of its unique characteristics. In this paper the simplest model of QoS model-bufferless system were proposed. In the proposed model, measurement of the probability of blocking of the arrival packets was suggested by using queuing theory in order to increase QoS. Given probability of blocking (PB) illustrates clear picture how system specification should be chosen so that blocking state would be minimized.


Introduction
Wireless Sensor Networks (WSNs) are a widely investigated area in the last decades.WSNs consist of tiny, limited resourced, low-cost and wirelessly connected devices called sensor node [1].The sensor nodes connect with each other on the basis of multi-hop network.The nodes are embedded with the sensor boards to sense the environmental phenomenon and are scattered over the unattended areas in order to collect sensing data and send them to the destination node called sink.As, in general, the sensor nodes aren't reusable, it is assembled of lowcost and off-the-shelf devices in order to keep its cost cheaper.Considering the fact that the nodes have resource constraints, they are able to perform low tasks that require less computation.Furthermore the batteries of the nodes are irreplaceable, which in term create many challenges in the node and network design.As a main problem-energy consumption should be taken into account in all the research topics related to WSNs, such as network design and protocols, network management, error correction and etc.Each sensor node performs environmental monitoring and simultaneously plays a role of router.It sends gathered data to the sink through mediate nodes and receives the packet coming from the neighbor nodes.A battery-depleted or failed nodes change network topology and directly or indirectly shorten the life of the sen-sor networks [2].
Because of limited resource, the sensor nodes have application-specific characteristics.Namely, the software programs in the nodes are designed based on the environmental phenomenon in order to consume less energy.Another factor that affects negatively energy consumption is data routing protocol.The major factor in designing of routing protocols is to do less computation in order to conserve energy.Therefore transmission error checking, path selection and etc. should be chosen so that it would be aimed to the purpose given above [3].
In traditional sensor networks a size of delivered packets is quite small to be delivered from the source node to the destination node.In the case of multimedia data where a size is measured in megabyte (Mbytes), it is a big challenge to transfer the data.The bigger the data, the more computation and energy are required to deliver the packets.
Therefore wireless multimedia sensor networks (WMSNs) are required different routing protocols, modified sensor nodes with high speed processors that could process the multimedia data.In WMSNs energy consumption still remains the main problem.As we increase hardware specifications, more energy will be consumed and vice versa.One of the ways to prolong the life of nodes is to add additional power supply such as a solar cell.However, it will increase the cost of the sensor nodes and therefore will squeeze the application areas [4].Regardless of the challenges mentioned above, there should be trade-off between energy consumption and resource utilization.However, service time for each arrival packets increases as the size expands, therefore, number of packets waiting in queue in the buffer are swelled.The loss of some video and voice packets might not seriously affect overall data in destination, so that remaining packet can convey the necessary message to the listener.In the case of loss of image packet, it is difficult to rearrange whole frame in order to get original picture back.In this paper we gave Quality of Service measurement by analyzing the packets in the queue by using Queueing Theory.

System Overview of Multimedia Wireless
Sensor Networks (WSNs) A wireless sensor nodes consist of several sensor nodes wirelessly connected with each other.Each sensor nodes are composed of processor unit (CPUs, microcontrollers), memories (random access memory (RAM) and low-sized flash memory), power supply, a RF transceivers (to connect with other sensor nodes) and sensor board (to sense the environmental process) [5].

Hardware Architecture
Sensor nodes in multimedia WSNs are embedded with low-cost video cameras or sound recorders as well as sensor boards.When sensors act in detection of intruders or any environmental phenomenon then video cameras or sound recorders are activated.For data generation, operation and communication additional power supplies are necessary to keep the lifetime of the nodes long [7].Depending on an application of multimedia WSNs the network topology is changed based on the network architecture, where the changes should serve for reducing the multimedia data.It is fact that the bigger queue in each node, the bigger the probability of data loss.

Processor
Up-to-date microcontroller used in WSNs is a small computer on a single integrated circuit containing a processor core, memory, and programmable I/O peripherals.Unlike microprocessors used personal computers, laptops and etc., microcontrollers are designed for embedded applications.There are several key components in selection of microcontrollers that are essential for designing of sensor nodes, such as power, voltage, cost and support for other external devices.As a main problem, energy must be less consumed during the installation and implantation.Therefore selection of relevant microcontroller family should be carefully determined.To determine trade-off between energy consumption and computation is the most important metric.Peak power consumption might not always be suitable for the task specified on curtain applications.Microcontrollers in sensor nodes consume subtle energy during the sleep mode.During the sleep mode CPU stops its work and shifts to the save mode where very less energy is needed for computation.Furthermore, the processor has to be awake in order to maintain the systems memory and time synchronization [8,9].Figure 1 is illustrated basic hardware architecture of a sensor node.In the next topics we will analyze processing unit where the buffer is placed in order to increase Quality of Services.

Protocol Stack and Queuing Management
In this paper we mainly focus on analyzing of queue at MAC layer in order to determine some QoS metrics.
However we will touch other layers briefly, but MAC and Physical Layer detailed.Although there are different standards for WSNs, such as WirelessHART, ISA100, IEEE 1451, ZigBee/802.15.4,common accepted protocol stack is determined in five levels (Figure 2). A. Application Layer: It is the layer that provides us interface to connect to the platform in order to run deployed software depending on experiment type.Moreover, all the services, tasks and other background applications used in the networking connectivity, data analyzing and etc. run at this layer.
B. Transport layer: It controls data flow from the application layer to network layer.Segmentation of data and reassembling arrival segments are generated in this layer.
C. Network layer: This layer is responsible for routing schema, path selection.In addition, addressing, encapsulation and decapsulation are taken place in this layer.
D. Data Link layer: is the layer that makes link between software and medium.Data Link layer are divided into two sub-layers: 1) Upper sub layer-Logical Link Control (LLC) layer and 2) Lower layer-Medium Access Control (MAC) layer.
LLC Layer acts as an interface between the MAC layer and the network layer.Its main responsibilities to provide services to the network layer protocols and particularly to control frame synchronization, flow control and error check.
MAC Layer determines the media access controlling on hardware devices and provides data analyzing based on physical signaling requirements of the medium.Since medium in WSNs is made of wireless technologies, enhancing the radio design and effective MAC protocols that will decrease power consumption in a radio is a main channeling issue in protocol design in MAC sub layer.Functionalities of MAC protocol are changed depending on the Network layer requirements, hardware specifications and network topologies [3] (see Figure 2).
As proposed in [10] MAC layer QoS can be classified mainly into channel assess policies, scheduling and buffer management and error control.In this paper we addressed buffering problem in MAC layer in order to improve QoS in data transmission.

Processor Memory Physical Layer
Processing Unit  In this paper we took Physical layer and MAC sub layer together as one "service point" and remaining layers together as second "service point" to determine QoS metric based on the data queue stored in MAC layer.

Sensing Board Transceiver
As we mentioned above big size of multimedia traffic and low computational ability of the sensor nodes result in buffer overflow at the receiver.Since there are significantly different between multimedia WSNs and other wireless networks, such as ad-hoc, mobile, in terms of traffics classes and their size, queueing process and scheduling context of them in the MAC layer will be different [11].Queueing process in the MAC layer has been extensively researched and several schemes with varying levels of complexity were proposed.Queueing process directly related to the energy consumption.So that data packet loss because of buffer overload leads to retransmission of the same packets several times, which in turn consume additional energy.
To show an importance of queueing model in multimedia WSNs, we illustrated the big picture of the queueing process in

Motivation and Research Framework
As we mentioned above, in WSNs all QoS metrics should lead to less energy consumption.In the proposed model, we focused on buffering mechanism in the MAC sub layer in order to prevent the loss of arrival packets, therefore, to minimize retransmission which in turn results in less power consumption.In order to reduce the blocking probability of arrival packet with intensity λ, we divided the processor memory (see Figure 3) into two parts as separate service points.The MAC sub layer was determined as one server with service intensity μ 1 and remaining network layers were taken as a one server with service intensity μ 2 (see Figure 4).Arrival packets enter the MAC sub layer through the physical medium (physical layer) and waits in the queue if the system is busy.For simplicity and as a first case, we took bufferless system and showed the QoS metric on arrival data intensity.Based on our result it is possible to determine rate of transmission/receiving and the specification of microcontrollers.In our future works we will consider the buffer and traffic types in our model.
In Figure 5 is illustrated the state diagram based on the state spaces given as follows: (0,0), (1,0), (0,1), (1,1), b (block).The state (0,0) means the system is empty and there isn't any packet received.When the first server receives a packet and serves it, while the second server is idle, the system goes to (1,0) state.If the packet is forwarded to the second server to serve, then the system state becomes (0,1).In this state the first server must be idle.Other vise the system state will be in (1,1) state.Namely both of the servers will be busy.The state b (blocking) happens when the first server is finished its task, but the second server is still in working regime.If the first serve is not idle, then arrival packet will be dropped.
Normalizing condition for the given model is:
Using mathematical calculation we can calculate the state probabilities (π) as follow.From (1) we can get calculation of π(0,1) as given in (7).By applying (7) to (4), state probabilities π(1,1) is derived as (8). where Furthermore, considering (8) in ( 5), measurement of π(b) can be given as (9).Calculation of state probability π(1,0) can be derived by substituting (8) in (2). where Finally from normalizing condition (6) we get measurement of π(0,0): Here we are interested in the probability of blocking as a QoS Metric.In the proposed model the probability of blocking (PB) happens when the first server is busy and in the state of blocking.Eventually, we can calculate PB as below: In special case, we analyzed the case where By implementation simple substitution in ( 7)-( 12), the state probabilities can be given as follow: The probability of blocking system (PB) will be measured as below: Based on the exact formulas of state probabilities, we did numerical analyses for both cases.

Numerical Results
Since we study buferless system in our model, we were only interested in Probability of Blocking (PB) of the arrival packets.Furthermore, for simplicity we took the nature of all the traffic classes (video, sound, picture and streaming) as a single multimedia class.In each traffic class a size of the packet is quite big to transfer through the sensor networks.Minimization of the probability of data loss is a very important factor for the WSNs.Some results are shown in Figures 6-9.The curves coincide with all theoretical expectations.In both cases relationship between PB and μ 1 , μ 2 , λ are deeply analyzed.One of the main purposes of the QoS metrics is to minimize the blocking probability of the arrival packets.Probability of blocking is negatively related with the arrival intensity λ.Indeed, as λ gets big, a number of packets to be served by the server 1 also increase.In Figure 6 is given their relationship in different values of μ 1 and μ 2. Furthermore, this behavior acts the same when service intensities of the server 1 and 2 are equal (μ 1 = μ 2 ) .The best option to get less blocking probability is to maximize μ 1 if μ 2 is fixed.As given in the Figure 6 PB is bigger in μ 1 = 15, and less in μ 1 = 25.
To get a clear picture of dependence we set μ 1 equal to μ 2 as a special case.As shown in Table 1, PB increases by decreasing rate as μ goes up.Dependence of PB from μ is given in Figures 7-9.Obviously, a blocking probability should be positively related to service intensities μ 1 and μ 2 .The bigger service intensity is, the bigger a number of packets to be served; therefore a number of blocked packets become much less.It is clear from the    To get a clear picture of dependence we set μ 1 equal to μ 2 as a special case.As shown in Table 1, PB increases by decreasing rate as μ goes up.Dependence of PB from μ is given in Figures 7-9.Obviously, a blocking probability should be positively related to service intensities μ 1 and μ 2 .The bigger service intensity is, the bigger a number of packets to be served; therefore a number of blocked packets become much less.It is clear from the Figures 7 and 8 that a probability of blocking is decreasing as service intensities increase.In practice the case of μ 1 ≥ μ 2 makes sense, other vise state probability of b (blocking) will be increased, that will result in increase in queue at the first server.In Since selection of relevant specifications of microcontrollers is important, trade-off between service intensities of first and second servers should be considered as main factor affecting energy consumption.In this regards we analyzed relation between blocking probability and ratio of μ 1 and μ 2 (μ 1 /μ 2 ) (Figure 10).We took curves in three

Conclusion
As we mentioned above, choosing relevant transceiver and microcontroller components plays important role in assembling sensor devices in sensor nodes, in which data controls should be designed so that packet loss is minimized.Since available QoS metrics based on queuing/buffer management in wired and other wireless networks cannot be applicable in WSNs because of its unique characteristics, new models are required to measure QoS metrics.In this paper the simplest case of queuing/buffering management system-bufferless case were proposed.In order to make trade-off between energy consumption and required hardware specification a quality of services metric-blocking probability were analyzed.Based on the proposed model it gives clear picture on how intensive rates should be chosen in order to reduce data loss.The numerical result of the model gives us the basic research on how determine desirable rate of transmission/receiving and the specification of microcontrollers.Since there are very less researches on this topic, proposed model is satisfactory to determine hardware configuration in terms of transceiver and mi-crocontroller in order to maximize utilization and minimize data loss.

Figure 1 .
Figure 1.Basic hardware architecture of a sensor node.

Figure 2 .
Figure 2. The WSNs protocol stack.E. Physical layer: This layer directly converts coming frames from MAC layer to wireless signal.Transmitted bits go through encoding process before sending via the media.Following Physical layer elements are necessary to transfer the frames: a) the physical media and connectors, b) encoding and decoding mechanism, c) transmitters and receiver circuitry embedded on sensor nodes.In this paper we took Physical layer and MAC sub layer together as one "service point" and remaining layers together as second "service point" to determine QoS metric based on the data queue stored in MAC layer.As we mentioned above big size of multimedia traffic and low computational ability of the sensor nodes result in buffer overflow at the receiver.Since there are significantly different between multimedia WSNs and other wireless networks, such as ad-hoc, mobile, in terms of traffics classes and their size, queueing process and scheduling context of them in the MAC layer will be different[11].Queueing process in the MAC layer has been extensively researched and several schemes with varying levels of complexity were proposed.Queueing process directly related to the energy consumption.So that data packet loss because of buffer overload leads to retransmission of the same packets several times, which in turn consume additional energy.To show an importance of queueing model in multimedia WSNs, we illustrated the big picture of the queueing process in Figure 3.As shown in the figure, Processor Memory is divided into logical part in order to picture the work flow distribution from the perspective of the protocol stack.

Figure 3 .
As shown in the figure, Processor Memory is divided into logical part in order to picture the work flow distribution from the perspective of the protocol stack.

Figure 5 .
Figure 5.The state diagram of system.For analyzing the model we took two cases a) general case, where general case, computation speed of the CPU should be faster than receiving and a service speed at the MAC layer.Other vice, packets flowing from the MAC layer to the up layers either will be loss or should wait in the queue.Since in our model we consider bufferless system in each part, we can propose that our model is designed to all cases under the condition of 1 2

Figure 8 . Blocking probability of arrival packets versus μ 2 .Figures 7
Figure 8. Blocking probability of arrival packets versus μ 2 .Figures 7 and 8 that a probability of blocking is decreasing as service intensities increase.In practice the case of μ 1 ≥ μ 2 makes sense, other vise state probability of b (blocking) will be increased, that will result in increase in queue at the first server.In Figure 7 the blocking probabilities of the cases λ = 40, μ 2 = 20 and λ = 40, μ 2 = 25 are given respectively.At the beginning values of PB in both cases are almost the same.However toward the end PB of the second case where μ 2 = 25 is getting

Figure 7
the blocking probabilities of the cases λ = 40, μ 2 = 20 and λ = 40, μ 2 = 25 are given respectively.At the beginning values of PB in both cases are almost the same.However toward the end PB of the second case where μ 2 = 25 is getting much bigger, which satisfies our hypothesis.The same behavior can be seen in Figure 8-relation of PB versus μ 2 , so that the best result is given in the case of μ 1 = 25, where λ = 40.Basically higher arrival intensity makes it difficult to serve the entire packet by the server.As shown in Figure 9, PB get smaller values depending on μ when λ = 20 and the highest when λ = 35.Hypothetically, it satisfies the expected results.