Module-5
Module-5
Module-5
Middleware for WSNs:
Introduction
principles
Architecture
data related functions
Performance and traffic management:
background
WSN Design issues
performance modelling of WSNs.
MIDDLEWARE ARCHITECTURE
The middleware gathers information from the application and network protocols
and determines how to support the applications and adjusts network protocol
parameters.
The middleware interfaces with the operating system directly while bypassing the
network protocol.
The middleware consists of functional elements such as
Resource management : The resource management functional element
monitors the network status and receives application requirements. It then
produces the command to adjust the network resource.
Event detection & management : The event detection and management
functional element is used to detect and manage events such as sensing.
Application programming interface (API) : The API can be invoked by
applications to achieve better performance and network utilization.
Data-Related Functions
WSN is a data-centric device, middleware would contain data management
functions such as data dissemination, data compression, and data storage.
i. Data Dissemination :
In WSNs, the sensor nodes deployed produce data. The data sensed
need to be transmitted to some special node or a sink for further
analysis, management, and control. Therefore, a data dissemination
protocol is required to provide effective data transmission from sensor
Fig : WSN
sensor nodes need small simplified operating systems and energy-efficient
communication protocols.
The new metrics of Performance modeling and evaluation for WSNs are system
lifetime and energy efficiency, and the introduction of new traffic attributes.
1. These sensor nodes have different levels of resources within them, but
they all contain at least the following physical units: a radio unit with
a transceiver, a processing unit with a microcontroller and a memory,
a sensing unit with a sensor (or multiple sensors), and a power supply
unit, usually with a battery. Sensor nodes may have an additional unit
to support mobility or be equipped with a GPS-based unit. With the
development of micro electromechanical systems (MEMSs) and the new
battery technologies, sensor nodes might be able to carry more
resources. However, the resources of sensor nodes are still constrained
compared to the practically unconstrained physical and networking
interfaces and other resources in traditional network nodes. These
constraints have a direct impact on system and protocol design.
2. WSNs usually have a multihop physical topology. In the multihop two
tier architecture,The first type organizes all sensor nodes in a
hierarchical structure , here the sensor nodes at the first layer perform
only sensing, the sensor nodes in the second layer perform sensing and
data relaying, and so on. This topology can result in more efficient
2. Routing Protocols:
The routing protocols in WSNs are for setting up one or more path(s) from
sensor nodes to the sink. Since sensor nodes have limited resources,
routing protocols should have a small overhead. Therefore, the traditional
address-centric routing protocols for Internet (e.g., the routing information
protocol, open shortest path first, border gateway protocol) do not meet the
requirements of WSNs.
Data-centric routing is more suitable for WSNs because it can be deployed
easily, and due to data aggregation, it saves energy. routing protocols for
WSNs employ certain technique to minimize energy consumption e.g., data
aggregation and in-network processing & clustering. Directed Diffusion is
a data-centric routing scheme with three phases in its operation:
i. A sink broadcasts its interest across the network in query messages
with a special query semantic at a low rate.
ii. All the nodes cache the interest. When a node senses that an event
matches the interest, it sends the data relevant to the event to all
the interested nodes. Sink will also get the initial data and
‘‘reinforce’’ one of source nodes by resending the interest at a higher
rate.
iii. After the reinforcement propagation, the source nodes send data
directly on the reinforced path.
The performance of a routing protocol can be expressed through such
measures as computational overhead, communications overhead, path
reliability, path length, convergence rate, and stability.
3. Transport protocols :
The transport protocols should handle congestion as the data streams are
convergent toward the sink, congestion is likely to occur at nodes around
the sink. Therefore, transport protocols should have mechanisms for loss
recovery; to guarantee reliability, mechanisms such as ACK and selective
ACK used in the TCP would be helpful. At the same time, reliability where
correct transmission of every packet should also be guaranteed.
The transport protocols should offer the following :
i. A hop-by-hop mechanism for congestion control - The hop-by-hop
mechanism can also lower the buffer requirement at the
intermediate nodes
ii. loss recovery
iii. Reduced packet loss & conservation of energy .
iv. Transport control protocols for WSNs should also avoid packet loss
as much as possible since packet loss translates to waste of energy.
v. it should guarantee fairness so that individual nodes can achieve
their fair throughput.
PERFORMANCE MODELING OF WSNs
The different performance measures are required to evaluate WSN.
The following are:
1. System lifetime:
(a) the duration of time until some node depletes all its energy.
(b) the duration of time until the QoS of applications cannot be
guaranteed.
(c) the duration of time until the network has been disjoined.
2. Energy efficiency:
Energy efficiency means the number of packets that can be
transmitted successfully using a unit of energy. Packet collision
at the MAC layer, routing overhead, packet loss, and packet
retransmission reduce energy efficiency.
3. Reliability: In WSNs, the event reliability is used as a measure to
show how reliable the sensed event can be reported to the sink.
For applications that can tolerate packet loss, reliability can be
defined as the ratio of successfully received packets over the total
number of packets transmitted.
4. Coverage: The coverage is defined as the ratio of the monitored
space to the entire space. Full coverage by a sensor network
means the entire space that can be monitored by the sensor
nodes.
5. Connectivity: For multihop WSNs, it is possible that the network
becomes disjointed because some nodes become dysfunctional.
The connectivity metric can be used to evaluate how well the
Basic Models
1. Traffic Model :
The four traffic models are used in WSNs:
a. Event-Based Delivery.
b. Continuous Delivery.
c. Query-Based Delivery.
d. Hybrid Delivery.
a. Event-Based Delivery :
i. sensor nodes monitor the occurrence of events passively and
continuously. When an event occurs, the sensor node begins
to report the event, and possibly an associated value, to the
sink. When delivering event data to the sink, a routing protocol
is often triggered in order to find a path to the sink. This
routing method is called routing on-demand.
ii. If an event appears frequently, at a node or a group of nodes,
the routing function is executed frequently, which results in
more energy consumption.
iii. An adaptive routing protocol may be required to set up a path
dynamically in advance if events occur frequently; otherwise,
the path is set up on-demand.
b. Continuous Delivery :
i. The data collected by the sensors need to be reported
regularly, perhaps continuously, or periodically
c. Query-Based Delivery:
i. The sink will issue query messages to sensor nodes to get the
up-to-date value for the information.
ii. Query messages may also carry a command from the sink to
the sensors about the information, reporting frequency and
other parameters of interest to the sink.
iii. In this delivery model, the sink broadcasts the query message,
a path is constructed automatically when the query arrives at
the sensor nodes, and the sensor nodes report their findings
according to the request in the query message.
d. Hybrid Delivery :
i. In some WSNs, the types of sensors and the data they sense
may be very diverse. For example, data may be reported
continuously by some nodes.
2. Energy Model:
𝑠 𝑎1
𝑑𝑚 = √
𝑎2(𝑠−1)
𝑤ℎ𝑒𝑟𝑒 𝑎1 = 2𝐸𝑐 , 𝑎2 = 𝑒1 𝑜𝑟 𝑒2
Model for communication:
i. A sensor node usually has a microcontroller or microCPU
performing computations. Low power means that the CPU
consumes low energy per clock cycle.
3. Node Model:
i. To conserve energy, a common approach is to let nodes sleep
when they have no need to transmit or receive.
ii. The sensor nodes have two states: active (A) and sleep (S). The
length of the active and sleep period are geometrically distributed
random variables with a mean value of p and q time slots,
respectively. The active phase is divided further into R and N
states. In the R state, sensor nodes can transmit or receive data
and/or generate data according to a Poisson process with an
******