π Lecture 34 β Wireless Sensor Networks Part I
π Overview: This lecture introduces Wireless Sensor Networks (WSNs), a class of ad hoc networks composed of densely deployed, self-organizing sensor nodes. It covers the fundamental architecture, key applications across military, environmental, health, and commercial domains, the critical factors influencing WSN design (fault tolerance, scalability, power, cost), and the unique protocol stack challenges that differentiate WSNs from traditional networks.
ποΈ Topics Covered
This lecture begins with an introduction to WSNs, defining a sensor node and comparing sensor networks to traditional ad hoc networks. It then explores diverse applications in military, environmental, health, home, and commercial settings. Core design factors such as fault tolerance, scalability, production costs, hardware constraints, topology, and power consumption are detailed. The communication architecture, including the protocol stack and the roles of the application, transport, network, and data link layers, is explained. Finally, the lecture outlines major challenges in WSNs, including cross-layer design, topology control, and data aggregation, before introducing TinyOS as a simulation and development platform.
π Lecture Summary
Introduction to WSNs
A sensor network is composed of a large number of sensor nodes densely deployed either inside the phenomenon or very close to it. Its key features are random deployment, self-organizing capabilities, cooperative capabilities, and local computation.
A sensor is a small-sized, low-power, low-cost Micro-Electro-Mechanical Systems (MEMS) device capable of sensing, computing, and communicating. A typical sensor node might have an 8 MHz processor, 512K bytes of flash, 8k bytes of SRAM, a radio frequency of 916 MHz/2.4 GHz (ISM band), a data rate of 40 Kbits/Sec, a radio range of 100 feet, and power from 2 AA batteries. π‘ Why this matters: These severe hardware constraints define every aspect of WSN protocol design.
Sensor networks VS ad hoc networks
Key differences include:
- Scalability: The number of nodes in a sensor network can be several orders of magnitude higher than in an ad hoc network.
- Deployment: Sensor nodes are densely deployed.
- Failure Rate: Sensor nodes are prone to failures.
- Highly Dynamic topology: Topology changes very frequently.
- Communication Paradigm: Sensor nodes mainly use broadcast, while most ad hoc networks are based on point-to-point (p2p) communication.
- Power Limitation: Sensor nodes are severely limited in power, computational capacities, and memory.
- Unique IDs: Sensor nodes may not have a global ID.
Applications of sensor networks
- Military: Monitoring friendly forces, battlefield surveillance, reconnaissance, battle damage assessment, and nuclear/biological/chemical attack detection.
- Environmental: Forest fire detection, biocomplexity mapping, flood detection, and precision agriculture.
- Health: Telemonitoring of physiological data, tracking patients/doctors in hospitals, and drug administration.
- Home: Home automation and smart environments.
- Commercial: Environmental control in buildings, interactive museums, inventory control, vehicle tracking, and car theft detection.
Factors influencing sensor network design
- Fault tolerance: The ability to sustain network functionalities without interruption due to sensor node failures.
- Scalability: Measures the density of sensor nodes. The formula is: π Formula: Density = ΞΌ(R) = (NΟRΒ²)/A, where N is the number of nodes, R is the radio range, and A is the area.
- Production costs: The cost of a single node is critical to justify the overall network cost.
- Hardware constraints: Nodes have limited computational capacity, memory, and power.
- Sensor network topology: Consists of three phases: pre-deployment/deployment, post-deployment, and re-deployment of additional nodes.
- Power consumption: A fundamental constraint. Communication is the most energy-intensive activity. π Example: 3000 instructions can be executed for the same energy cost of sending a bit 100m by radio.
- Environment: WSNs must operate in diverse and harsh environments like busy intersections, oceans, tornados, or chemically contaminated fields.
Communication architecture of sensor networks
- Protocol Stack: The stack is managed by three planes:
- Power Management Plan: Turns off the receiver after a message to avoid duplicates and conserve energy; informs neighbors of low battery.
- Mobility Management Plan: Detects and registers node movement to maintain routes and track neighbors.
- Task Management Plan: Balances and schedules sensing tasks in a region to conserve power.
- Application layer: Uses protocols like Sensor Management Protocol (SMP), Task Assignment and Data Advertisement Protocol (TADAP), and Sensor Query and Data Dissemination Protocol (SQDDP).
- Transport layer: Needed for Internet/external network access, but remains an open research area with few proposed schemes.
- Network layer: Focuses on power efficiency, data-centric routing, attribute-based addressing, and location awareness. Routing protocols include:
- Maximum Available Power (PA) route: Route 2
- Minimum Energy (ME) route: Route 1
- Minimum Hop (MH) route: Route 3
- Maximum minimum PA node route: Route 3
- Minimum longest edge route: Route 1
- Data link layer: Responsible for Medium Access Control (MAC) and error control.
- MAC creates the network infrastructure and shares resources fairly.
- Power saving modes are energy efficient only if the time spent in that mode exceeds a threshold.
- Error control uses Forward Error Correction (FEC) (low-complexity codes preferred) and Automatic Repeat Request (ARQ).
Challenges in WSN
- Cross-layer approach: A grand challenge, as the traditional layered approach is good for abstraction but bad for energy efficiency and performance in WSNs.
- Topology Control
- Coverage
- Data Aggregation
- Temporal/Spatial Correlation
- Localization / Synchronization
- Energy Efficient Data Dissemination
- QoS Framework
- Network Monitoring and Management
- Integration into Next-Generation Wireless Internet (NGWI)
Simulation for Sensor Networks
Simulation provides a controlled, reproducible testing environment and is a cost-effective alternative for exploring and improving design space.
TinyOS
TinyOS is an open-source operating system designed for WSNs. It promotes reliable application development by providing a convenient and safe abstraction of hardware resources. Key components include:
- NesC: A programming language and model for TinyOS.
- TOSSIM: A simulator for TinyOS.
- TinyDB: A sensor database for TinyOS.
β Key Takeaways
Wireless Sensor Networks are fundamentally different from ad hoc networks due to their extreme constraints in power, cost, and computational capacity, requiring specialized protocols. The most critical design factors are power consumption (communication is far more expensive than computation), scalability (high node density, formula ΞΌ(R) = NΟRΒ²/A), and fault tolerance. The protocol stack must be managed by cross-layer planes (power, mobility, task) to maximize efficiency. Routing is data-centric and must balance metrics like maximum available power, minimum energy, and minimum hops. A grand challenge is moving away from a strict layered architecture toward a cross-layer approach to improve energy efficiency and performance.
π§ Quick Revision Questions
- What are the key differences between sensor networks and traditional ad hoc networks in terms of scalability, communication paradigm, and unique IDs?
- Explain the formula for node density and its significance in a WSN.
- Why is the transport layer in a WSN considered a challenging open research area?
- List and distinguish the three management planes (Power, Mobility, Task) in the WSN protocol stack.
- What is the "3000 instructions" metric, and what does it illustrate about power consumption in WSNs?
π Lecture 35 β MAC Protocols for WSN Part II
π Overview: This lecture continues the exploration of MAC protocols for Wireless Sensor Networks, focusing on energy-efficient designs that address the unique challenges of WSNs. It covers several specific MAC protocols including S-MAC, T-MAC, DS-MAC, TRAMA, DMAC, and contention-free approaches, explaining their mechanisms, advantages, and limitations.
ποΈ Topics Covered
This lecture covers challenges in WSNs, important attributes of MAC protocols, and an overview of MAC protocol categories (contention-based and contention-free). It then delves into energy efficiency in MAC design, followed by detailed examination of specific protocols: S-MAC with its periodic listen/sleep mechanism, T-MAC with adaptive duty cycling, DS-MAC for dynamic duty cycle adjustment, TRAMA for traffic-adaptive scheduling, DMAC for convergecast communication, and ASAND for asynchronous contention-free slot assignment.
π Lecture Summary
Challenges in WSNs
Wireless Sensor Networks face multiple challenges including power consumption, fault tolerance, scalability, topology changes, and cost constraints. These challenges directly influence the design of MAC protocols, which must balance energy efficiency with other performance metrics.
Attributes of MAC Protocol
Important attributes of MAC protocols include collision avoidance as the basic task of medium access control, energy efficiency, scalability and adaptivity as the number of nodes changes over time, latency, fairness, throughput, and bandwidth utilization.
Overview of MAC protocols
Contention-based protocols include CSMA (Carrier Sense Multiple Access) used in Ethernet, though it is insufficient for wireless due to collision at the receiver. MACA (Multiple Access with Collision Avoidance) uses RTS/CTS to address the hidden terminal problem with RTS/CTS/DATA exchange. MACAW improves over MACA by adding RTS/CTS/DATA/ACK for fast error recovery at the link layer, and IEEE 802.11 DCF is largely based on MACAW.
Protocols from voice communication include TDMA (low duty cycle, energy efficient), FDMA (each channel has different frequency), and CDMA (frequency hopping or direct sequence).
Energy Efficiency in MAC
Energy is the primary concern in sensor networks. Causes of energy waste include collisions, control packet overhead, overhearing unnecessary traffic, overemitting, and long idle time which is dominant in sensor nets due to bursty traffic. Idle listening consumes 50-100% of the power for receiving.
TDMA vs. contention-based protocols: TDMA can easily avoid or reduce energy waste from all sources, while contention protocols need to work hard in all directions. However, TDMA has limited scalability and adaptivityβit is hard to dynamically change frame size or slot assignment when new nodes join, and it restricts direct communication within a cluster. Contention protocols easily accommodate node changes and support multi-hop communications.
S-MAC: Periodic Listen & Sleep
S-MAC (Sensor-MAC) uses a periodic listen and sleep mechanism. A frame consists of a listen interval and a sleep interval. Duty cycle is defined as (Listen Interval / Frame Length). Nodes are free to choose their own listen/sleep schedule, but neighboring nodes must synchronize together. They exchange schedules periodically using SYNC packets during the synchronization period (SP). Nodes communicate in receivers' scheduled listen times.
Frame Schedule Maintenance involves three scenarios:
- Choosing a schedule: Listen to the medium for at least SP; if nothing heard, choose a schedule and broadcast a SYNC packet
- Following a schedule: If a schedule is received before choosing/announcing, follow that schedule and broadcast a SYNC packet
- Adopting multiple schedules: If a schedule is received after choosing/announcing, either discard or follow both schedules (suffering more energy loss)
Once RTS/CTS is established, data is sent in the sleep interval. Adaptive Listening allows overhearing nodes to wake up at the end of the current transmission using the duration field in RTS/CTS.
Drawbacks of S-MAC: The active (Listen) interval is long enough to handle the highest expected load, so if message rate is lower, energy is still wasted in idle-listening. S-MAC's fixed duty cycle is NOT OPTIMAL. It also suffers from high latency and synchronization maintenance issues. Clock drifts are not a major concern since listen time (0.5s) is 10β΅ times longer than typical drift rates, but long-term drifts require schedule updating using SYNC packets (sender ID, its next scheduled sleep timeβrelative). The listen interval is split into two partsβfor SYNC and RTS/CTS.
π Definition β Duty Cycle: (Listen Interval / Frame Length) β the proportion of time a node is actively listening versus sleeping
π Formula: Duty Cycle = Listen Interval / Frame Length β The fraction of time the radio is on and ready to receive
T-MAC: Preliminaries
T-MAC (Timeout-MAC) uses an adaptive duty cycle. A node remains in active mode until no activation event occurs for time TA. Activation events include periodic frame timer event, receive, carrier sense, send-done, and knowledge of other transmissions ending. Communication and frame schedule maintenance are similar to S-MAC/802.11.
Choosing TA: The requirement is that a node should not sleep while its neighbors are communicating (potential next receiver). TA > C+R+T, where C = contention interval length, R = RTS packet length, T = turn-around time (time between end of RTS and start of CTS). TA is set to 1.5 * (C+R+T).
Pros: Performs better under variable traffic load. Cons: Higher overheads than S-MAC to maintain variable wakeup schedule, unfairness and unpredictable delay.
π‘ Why this matters: T-MAC solves S-MAC's problem of wasting energy during idle listening under low traffic by dynamically adjusting the active period based on actual activity.
Dynamic Sensor-MAC (DSMAC)
DSMAC provides a simple solution to static duty cycle. All nodes start with the same duty cycle. If one-hop latency is observed higher by the receiver, it doubles its duty cycle. Nodes share their one-hop latency values with neighbors during the SYNC period. The transmitter also doubles its duty cycle if the destination reported higher one-hop latency. This change does not affect the schedule of other neighbors. TMAC improves latency in S-MAC at the cost of complexity, while DSMAC provides a simpler solution.
Traffic-Adaptive MAC (TRAMA)
TRAMA (Traffic-Adaptive MAC) divides time into random-access and scheduled-access (transmission) periods. The random-access period establishes two-hop topology information. The MAC layer can calculate the needed transmission duration (SCHEDULE_INTERVAL). The node calculates the number of slots for which it will have the highest priority among two-hop neighbors and announces the slots it will use (with intended receivers) as well as slots it has highest priority for but will not use, using a schedule packet. The schedule packet indicates intended receivers using a bitmap whose length equals the number of its neighbors.
Advantages: Higher percentage of sleep time and less collision probability compared to CSMA-based protocols. Since intended receivers are indicated by a bitmap, less communication is performed for multicast and broadcast communication patterns.
Disadvantages: Transmission slots are set to be seven times longer than the random-access period, meaning the duty cycle is at least 12.5% (idle time) without considering transmissions and receptions.
DMAC
DMAC supports the convergecast communication model where a data-aggregation tree is formed from sources to the sink node. It is an improved slotted ALOHA algorithm. Slots are allotted according to the level of the tree from leaf to root. It incurs low latency but has no collision avoidance for nodes at the same level.
A minimum period u consists of one packet transmission and reception. The wakeup period in the tree is skewed depending on depth d, so du is the wakeup time. A node at a higher layer will be in receive state when lower layer nodes are in transmit state. Nodes on the path wake up sequentially to forward packets to the next hop, achieving low latency with efficient energy consumption.
Contention-Free MAC protocols
Asynchronous Slot Assignment is used in contention-free MAC protocols. Each node locally discretizes its local time. The number of slots in a time frame (frame size, denoted by Ξ) is set to 2δ². Having the same frame size at all nodes ensures that overlapping time slots remain the same.
ASAND Protocol (Asynchronous Slot Assignment and Neighborhood Discovery): A node first discretizes its local time into equal-sized frames of Ξ slots. Each node selects a conflict-free time slot in its frame. Initially, node i is nonready and selects randomly and uniformly a slot Οi in its frame. In slot Οi, node i broadcasts a "beacon" message mi to its neighborhood. In all other slots, it listens and marks each slot where a garbled signal is received. In the next frame, i transmits in all slots that were marked in the previous frameβthis is called conflict reporting, which forces hidden terminals to refrain from obtaining overlapping time slots.
If node i's initial broadcast in slot Οi was collision-free, it concludes that none of its neighbors has selected an overlapping time slot. It broadcasts a second time in slot Οi in the next frame. If this is also collision-free, it concludes that none of its 2-hop neighbors selected a conflicting time slot, and i becomes ready. Otherwise, when i detects a collision in either broadcast, it goes back to the initial state and tries a new random slot.
Conflict Reporting: When 2-hop neighbors u and v are unaware they have selected conflicting time slots (their transmissions collide on w), node w observes the collision at local time t and transmits at time t+Ξ, creating a spurious conflict with both u and v. This reduces a conflict between hidden terminals to a conflict between neighbor nodes. After t+Ξ, u and v will be forced to select new slots. Node i reports each collision exactly Ξ slots after it happened.
This basic approach brings up fundamental issuesβit is usually not possible to detect collisions for a wireless device during its own transmission. A novel collision detection scheme based on a special modulation scheme utilizing unique IDs of nodes is proposed.
π Definition β Conflict Reporting: A technique where a node that observes a collision between two hidden terminals transmits at a later time to force both terminals to detect a conflict and select new slots
π Formula: Ξ = 2δ² β Frame size equals twice the square of the maximum node degree Ξ΄
β Key Takeaways
The most critical concepts from this lecture are the five main MAC protocols for WSNs and their energy-saving mechanisms. S-MAC uses periodic listen/sleep with fixed duty cycles, requiring neighbor synchronization but wasting energy under variable loads. T-MAC improves upon S-MAC with adaptive duty cycling where nodes sleep after TA time without activity, performing better under variable traffic but adding complexity. DSMAC provides a simpler solution by allowing nodes to double their duty cycle based on observed one-hop latency. TRAMA uses traffic-adaptive scheduling with random-access and scheduled-access periods, achieving higher sleep time but with minimum 12.5% idle duty cycle. DMAC supports convergecast by skewing wakeup times based on tree depth for low-latency data forwarding to sinks. The primary energy waste sources are collisions, control overhead, overhearing, overemitting, and especially idle listeningβwhich dominates in sensor networks due to bursty traffic patterns.
π§ Quick Revision Questions
- What are the five main causes of energy waste in WSN MAC protocols, and which one is considered dominant?
- How does S-MAC's frame structure work, and what is the difference between a node choosing a schedule versus following one?
- What is the formula for TA in T-MAC, and why is TA set to 1.5 times the sum of C, R, and T?
- How does DMAC achieve low latency for convergecast communication using skewed wakeup times?
- Explain the conflict reporting mechanism in ASANDβwhat problem does it solve and how does it force hidden terminals to reselect slots?
π Lecture 36 β Routing in WSN Part III
π Overview: This lecture continues the study of routing in Wireless Sensor Networks by examining key routing challenges and design issues, then presenting a comprehensive survey of major routing protocols. It covers flat, hierarchical, location-based, and QoS-based protocols including SPIN, Directed Diffusion, ACQUIRE, LEACH, TEEN/APTEEN, GAF, GEAR, and SPEED, explaining their mechanisms, advantages, and limitations for exam-relevant comparison.
ποΈ Topics Covered
The lecture begins with routing challenges and design issues including node deployment, data routing methods, heterogeneity, fault tolerance, network dynamics, transmission media, connectivity, coverage, data aggregation, and QoS. It then categorizes and explains routing protocols: flat protocols (SPIN, Directed Diffusion, ACQUIRE), hierarchical protocols (LEACH, TEEN/APTEEN), location-based protocols (GAF, GEAR), and real-time protocols (SPEED). Each protocol is detailed with its operation, pros, cons, and comparisons.
π Lecture Summary
Routing challenges and design issues
Routing in WSNs faces multiple design challenges. Node deployment can be manual (predetermined path) or random (requires optimal clustering for connectivity and energy-efficiency, multi-hop routing). Data routing methods are application-specific: time-driven (periodic monitoring), event-driven (respond to sudden changes), query-driven (respond to queries), or hybrid. Node/link heterogeneity means homogeneous sensors vs. heterogeneous nodes with different roles, e.g., cluster heads with more energy handle transmissions to BS. Fault tolerance addresses sensor failure from power loss, damage, or interference β solutions include adjusting transmission power, changing sensing rate, or rerouting through regions with more power. Network dynamics considers mobile nodes, mobile events (target tracking), and reactive vs. periodic reporting. Transmission media is wireless with limited bandwidth (1β100Kbps); MAC can be contention-free (TDMA, CDMA) or contention-based (CSMA, MACA, 802.11). Connectivity depends on high density and random deployment; sensors may die after battery depletion. Coverage is limited per sensor, making area coverage an important design factor. Other issues include data aggregation and Quality of Service (bounded delay, energy efficiency for longer network lifetime).
π‘ Why this matters: These design issues directly determine which routing protocol is suitable for a given WSN application β a key exam topic.
Routing Protocols in WSNs
Protocols are categorized into four types: I. Flat, II. Hierarchical, III. Location-based, IV. QoS-based. Flooding is a baseline but suffers from too much waste, implosion (node D receives duplicate copies from multiple neighbors), and overlap (two sensors covering overlapping region send same data). Data-centric routing uses naming based on data attributes with no globally unique ID β examples include SPIN and Directed Diffusion.
SPIN (Sensor Protocols for Information via Negotiation)
SPIN solves flooding inefficiencies using negotiation. Before transmitting data, a node advertises data via an ADV message. Interested neighbors respond with a REQ message, and only then does the source send the actual DATA. This negotiation reduces energy consumption compared to flooding. Pros: Each node only needs to know its one-hop neighbors; significantly reduces energy consumption compared to flooding. Cons: Data advertisement cannot guarantee delivery; if interested nodes are far from the source, data will not be delivered; not suitable for applications requiring reliable data delivery (e.g., intrusion detection).
Direct Diffusion: Motivation and Elements
Directed Diffusion is data-centric with no central authority, resource-constrained nodes, ties to physical locations, and generally stationary nodes that may not know topology. It has four key elements:
-
Naming: Data is named using attribute-value pairs (content-based naming). Example: animal tracking β Interest:
Type = four-legged animal, Interval = 20 ms, Duration = 1 minute, Location = [-100, -100; 200, 400]; Reply (Node data):Type = four-legged animal, Instance = elephant, Location = [125, 220], Confidence = 0.85, Time = 02:10:35. -
Interests: A sink requests data by sending interests for named data. The sink periodically broadcasts interest messages to neighbors. Each node maintains an interest cache β each item corresponds to a distinct interest; allows interest aggregation for identical type and overlapping rectangles. Each cache entry has fields: Timestamp (last received matching interest) and several gradients (data rate, duration, direction).
-
Gradients: Gradients are set up within the network to "draw" events (data matching the interest). The user requests low-data-rate events; interest is sent and propagated (black arrow); gradients are set up (blue arrow); events are sent along gradients (red arrow, thin for low data rate).
-
Reinforcement: The sink reinforces particular neighbors to draw higher quality events (higher data rate). The user reinforces the best path in terms of delay (green arrow); thick red arrow shows high data rate. If a node fails, no high-data-rate events are received; the sink reinforces a low-data-rate path to recover.
Data propagation: Sensor node computes the highest requested event rate among all its outgoing gradients. When a node receives data, it finds matching interest entry, examines gradient list, sends data by rate; cache keeps track of recent data items for loop prevention; data messages are unicast individually to relevant neighbors.
Pros of Directed Diffusion: Data-centric with neighbor-to-neighbor communication, no node addressing mechanism needed; each node can do aggregation and caching. Cons: On-demand, query-driven β inappropriate for applications requiring continuous data delivery (e.g., environmental monitoring); attribute-based naming scheme is application dependent and must be defined a priori, causing extra processing overhead.
ACQUIRE (Active Query forwarding In sensoR nEtworks)
ACQUIRE views a WSN as a distributed database. The base station (BS) sends a complex query. Each node tries to answer the query using precached info and forwards the query to another node. If cached info is not fresh, the node gathers info from neighbors within a lookahead of d hops. Once the query is resolved completely, it is sent back to BS via reverse path or shortest path. ACQUIRE can deal with complex queries β Directed Diffusion cannot due to too much flooding. ACQUIRE can adjust d for efficient query processing: if d = network diameter, ACQUIRE becomes similar to flooding; if d is too small, queries travel more. Provides mathematical modeling for optimal d in a grid, but no experiments performed.
LEACH (Low Energy Adaptive Clustering Hierarchy)
LEACH is a cluster-based protocol. Each node randomly decides to become a cluster head (CH). CH chooses the code for CDMA between clusters. CH broadcasts Adv; each node decides its cluster based on received signal strength. CH creates a TDMA transmission schedule in the cluster β nodes can sleep when not their turn to transmit. CH compresses data from cluster nodes and sends aggregated data to BS. CH is rotated randomly.
π Definition β Cluster Head (CH): A node elected to coordinate a cluster, aggregate data from member nodes, and communicate with the base station.
π Formula: CH rotation is random per round β ensures energy load distribution across all nodes.
Pros: Distributed, no global knowledge required; energy saving due to aggregation by CHs. Shortcomings: LEACH assumes all nodes can transmit with enough power to reach BS if necessary (e.g., elected as CHs); each node should support both TDMA and CDMA. Extension of LEACH adds high-level negotiation (similar to SPIN) β only data providing new info is transmitted to BS.
TEEN (Threshold sensitive Energy Efficient Network protocol)
TEEN is a reactive, event-driven protocol for time-critical applications. A node senses the environment continuously but turns radio on and transmits only if sensor value changes drastically β no periodic transmission, saving energy when data is not critical. CH sends members a hard threshold and a soft threshold:
- Hard threshold: Member sends data to CH only if data values are in the range of interest.
- Soft threshold: Member sends data only if its value changes by at least the soft threshold.
Every node in a cluster takes turns to become CH for a cluster period. Supports hierarchical clustering (multi-level).
π Example: In a fire detection sensor network, hard threshold = temperature above 50Β°C; soft threshold = temperature change of at least 5Β°C since last report. A node at 48Β°C won't report; if it jumps to 55Β°C, it reports; then it reports again only if temperature changes by another 5Β°C (e.g., to 60Β°C).
Pros: Good for time-critical applications; significant energy saving (less than proactive approaches); soft threshold can be adapted; hard threshold can be adapted depending on applications. Cons: Inappropriate for periodic monitoring (e.g., habitat monitoring); ambiguity between packet loss and unimportant data (no drastic change).
APTEEN (Adaptive Threshold sensitive Energy Efficient Network protocol)
APTEEN extends TEEN to support both periodic sensing and reacting to time-critical events. Unlike TEEN, a node must sample and transmit data if it has not sent data for a time period equal to CT (count time) specified by CH. Compared to LEACH, TEEN and APTEEN consume less energy (TEEN consumes the least). Network lifetime: TEEN β₯ APTEEN β₯ LEACH. Drawbacks: Overhead and complexity of forming clusters in multiple levels and implementing threshold-based functions.
GAF (Geographic Adaptive Fidelity)
GAF is an energy-aware location-based protocol mainly designed for MANET. Each node knows its location via GPS and associates itself with a point in a virtual grid. Nodes associated with the same grid point are considered equivalent in terms of packet routing cost. For example, if Node 1 can reach any of nodes 2, 3, and 4, then nodes 2, 3, and 4 are equivalent β any two can sleep without affecting routing fidelity. GAF has three states: Discovery (determine neighbors in a grid), Active, and Sleep. Each node estimates its time of leaving the grid and sends it to neighbors; sleeping neighbors adjust their sleeping time to keep routing fidelity.
GEAR (Geographic and Energy Aware Routing)
GEAR restricts the number of interest floods in Directed Diffusion by considering only a certain region of the network rather than flooding the entire network. Each node keeps an estimated cost and a learning cost of reaching the sink through its neighbors.
π Formula: Estimated cost = f(residual energy, distance to the destination)
Learned cost is propagated one hop back every time a packet reaches the sink, allowing route setup adjustment for the next packet.
Phase 1 β Forwarding packets towards the region: Forward a packet to the neighbor minimizing cost function f (closest to sink and highest remaining energy). If all neighbors are further than itself, there is a hole β pick a neighbor based on learned cost.
Phase 2 β Forwarding within the target region: Apply either recursive forwarding (divide region into four subareas, send four copies of packet, repeat until regions with only one node are left) or restricted flooding (when node density is low). GEAR delivers significantly more packets than GPSR (Greedy Perimeter Stateless Routing).
SPEED: A real-time routing protocol for WSN
SPEED ensures real-time routing in WSNs. It guarantees single-hop delay D and end-to-end deadline is D Γ (L/K + 1) where L is path length and K is some constant. Cons: No energy consideration; per-hop delay differs greatly; coordination challenges.
β Key Takeaways
The most critical concepts from this lecture are the routing challenges (deployment type determines clustering needs, heterogeneity allows specialized roles, fault tolerance requires adaptive mechanisms) and the comparative understanding of major routing protocols. SPIN uses negotiation to reduce flooding waste but cannot guarantee delivery. Directed Diffusion uses interests, gradients, and reinforcement for on-demand data-centric routing, but is unsuitable for continuous monitoring. ACQUIRE treats the network as a distributed database with adjustable lookahead d for complex queries. LEACH uses randomized cluster head rotation with TDMA/CDMA for energy-efficient aggregation. TEEN and APTEEN use thresholds for event-driven and adaptive sensing, with TEEN being most energy-efficient but unsuitable for periodic monitoring. Location-based protocols GAF and GEAR use geographic information to reduce energy waste, while SPEED provides real-time delay guarantees. The key exam comparisons are: flooding vs. SPIN vs. Directed Diffusion, LEACH vs. TEEN vs. APTEEN, and the role of thresholds, gradients, and reinforcement in protocol operation.
π§ Quick Revision Questions
- What are the four key elements of Directed Diffusion, and how does reinforcement recover from node failure?
- Compare SPIN and Directed Diffusion in terms of data advertisement, energy efficiency, and suitability for continuous data delivery applications.
- How does ACQUIRE differ from Directed Diffusion in handling complex queries, and what is the role of lookahead d?
- Explain the difference between hard threshold and soft threshold in TEEN, and why TEEN is unsuitable for periodic monitoring.
- How does GEAR reduce flooding compared to Directed Diffusion, and what happens when a hole is encountered in Phase 1?
π Lecture 37 β Transport Protocols/Security in WSN Part IV
π Overview: This lecture explores transport protocols specifically designed for Wireless Sensor Networks, explaining why traditional TCP/UDP are unsuitable. It covers three key protocolsβPSFQ, ESRT, and CODAβfor reliable transport and congestion control, then transitions into security threats and the TinySec link-layer security framework for WSNs.
ποΈ Topics Covered
The lecture covers transport protocols for WSN including PSFQ (Pump Slow Fetch Quickly) for sink-to-node reliable transport, ESRT (Event-to-Sink Reliable Transport) for event-driven reliability with congestion control, and CODA (Congestion Detection and Avoidance) for managing congestion. It then discusses security threats unique to WSNs, motivations for link-layer security, and the TinySec design goals including security properties, performance considerations, and ease of use.
π Lecture Summary
Transport Protocols for WSN
The lecture categorizes WSN transport protocols by communication direction. Sink-to-Node(s) Transport includes PSFQ (Pump Slow Fetch Quickly), RMST (Reliable Multi-Segment Transport), and Garuda. Nodes-to-Sink Transport includes ESRT (Event-to-Sink Reliable Transport) and End-to-End Reliable Event Transfer in WSNs. Congestion Control protocols include CODA (Congestion Detection and Avoidance), Mitigating Congestion in WSNs, TEEN/APTEEN, GAF, GEAR, and SPEED.
Why not TCP or its variants for WSN?
TCP is unsuitable for WSN due to several critical reasons. Higher overheads exist for short data transmissions. Flow and congestion control cause unfair bandwidth allocation for farther nodes. Throughput degrades under wireless conditions due to higher packet losses. End-to-end congestion needs longer time to mitigate, causing more congestion to occur. End-to-end reliability consumes more energy and bandwidth than hop-by-hop approaches. TCP provides packet-based reliability, which is not required for event-driven applications.
Why not UDP?
UDP has lower overheads but lacks essential features: no congestion control, no flow control, and no reliability.
Pump Slowly, Fetch Quickly (PSFQ)
PSFQ is designed for application reprogramming or re-tasking of sensor networks. Nodes broadcast fragments in-sequence to the next hop, which stores and forwards. If a node detects a gap, it broadcasts a NACK (Negative Acknowledgment). The protocol operates on a hop-by-hop store and forward mechanism.
Features: NACK-based recovery, in-sequence caching, assumes loss due to transmission drops not congestion, hop-by-hop error recovery.
Goals: Operate under high error rates with minimum support from underlying layers, low latency, and minimize number of transmissions for lost detection and recovery.
Messages: Pump, Fetch, and Report messages.
PSFQ Operations:
- Pump Operation: A user node broadcasts a packet to its neighbors every Tmin. It decrements the TTL and schedules a transmission where Tmin < Ttransmit < Tmax. If a node hears the same transmission four times before Ttransmit, it cancels its own transmission.
- Fetch Operation: When a sequence number gap is detected, the node sends a NACK message upstream (scope is 1 hop). NACKs are generated every Tr (where Tr << Tmax). NACKs can be cancelled if neighbors have sent similar NACKs. The node enters 'proactive fetch' mode if the last segment hasn't been received and no packet has been delivered after Tpro = a * (Smax - Smin) * Tmax.
- Report Operation: Used as a feedback/monitoring mechanism.
Problems with PSFQ:
- Uniformly distributed channel error model
- Need fine tuning of timers for good results (Tmin, Tmax, Tr)
- First Packet Delivery issues
- Cache size limitation
Event-to-Sink Reliable Transport (ESRT) for Wireless Sensor Networks
ESRT provides event-to-sink reliability with self-configuration, energy awareness (low power consumption requirement), and congestion control. It features variation in complexity at source and sink.
ESRT's Definition of Reliability:
- Reliability is measured in terms of the number of packets received, or reporting frequency (number of packets per decision interval).
- Observed reliability: number of received data packets in a decision interval at the sink.
- Desired reliability: number of packets required for reliable event detection.
- Normalized reliability = observed / desired.
π Formula: Normalized Reliability = Observed Reliability / Desired Reliability β This ratio tells us whether the sink is receiving enough packets to reliably detect an event.
Algorithm for ESRT:
- If congestion and low reliability: decrease reporting frequency aggressively (exponential decrease).
- If congestion and high reliability: decrease reporting to relieve congestion, no compromise on reliability (multiplicative increase).
- If no congestion and low reliability: increase reporting frequency aggressively (multiplicative increase).
- If no congestion and high reliability: decrease reporting slowly (half the slope).
π‘ Why this matters: The ESRT algorithm dynamically adjusts the reporting frequency of sensor nodes based on both congestion and reliability conditions, balancing energy consumption with reliable event detection.
Drawback: Event-based reporting frequency is not good for all nodes.
CODA: Congestion Detection and Avoidance
CODA addresses that the transport of event impulses is likely to lead to varying degrees of congestion. CODA uses channel sampling to detect congestion and broadcasts this information to upstream nodes.
General Purpose: Event-to-sink applications.
Features: Uses buffer occupancy and channel sampling to detect congestion, assumes event occurrence as source of congestion (not wireless links or interference).
Goals: Minimize congestion, both transient and persistent.
Description: Open-loop hop-by-hop backpressure, Closed-loop multi-source regulation.
CODA Components:
- Congestion Detection: Accuracy and efficiency are important. Buffer queue length or buffer occupancy is not a good measure of congestion. Channel loading β sample channel at appropriate time to detect congestion.
- Open loop, hop-by-hop backpressure: A node broadcasts backpressure messages to upstream nodes as long as it detects congestion. An upstream node decides whether to further propagate the message or not, depending on its own local network condition.
- Closed-loop, multi-source regulation: When a source event rate is greater than some maximum theoretical throughput, it is more likely to contribute to congestion, so it enters sink regulation. The sink sends ACKs at some predefined rate or a certain number of ACKs over a predefined period. If the source does not receive necessary ACKs, it decreases its rate.
Security threats in Sensor Networks
The use of wireless communications means adversaries can easily eavesdrop on, intercept, inject, and alter transmitted data. Adversaries can interact with networks from a distance using inexpensive radio transceivers and powerful workstations. Resource consumption attacks allow adversaries to repeatedly send packets to drain nodes' batteries and waste network bandwidth, and they can steal nodes. However, these threats are not all addressed; the focus is on guaranteeing message authenticity, integrity, and confidentiality.
TINYSEC
TinySec is a lightweight and efficient link-layer security package designed as a research platform that is easily extensible and has been incorporated into higher-level protocols. Developers can easily integrate it into sensor network applications.
Motivation for Link layer security in Sensor Networks
End-to-end security mechanisms are suitable only for conventional networks using end-to-end communications where intermediate routers only need to view message headers. They are not suitable for sensor networks because if message integrity is checked only at the destination, the network may route packets injected by an adversary many hops before they are detected, wasting precious energy. In sensor networks, in-network processing is done to avoid redundant messages, requiring intermediate nodes to have access to whole message packets, not just headers. A link-layer security mechanism can detect unauthorized packets when they are first injected onto the network.
Design Goals β Security Goals
A link-layer security protocol should satisfy three basic security properties:
- Access control and Message integrity: prevent unauthorized parties from participating.
- Confidentiality: keeping information secret from unauthorized parties.
- Explicit omission: Replay protection: an adversary eavesdropping a legitimate message sent between two authorized parties replays it at some time later.
Design goals β Performance goals
A system using cryptography will incur increased overhead in message length. Overhead limitations are REQUIRED. Increased message length results in decreased message throughput, increased latency, and increased power consumption (especially in sensor networks). It is necessary to carefully tune the strength of security mechanisms for reasonable security while limiting overheads.
Design Goals β Ease of Use
- Security Platform: Higher-level security protocols can use TinySec to create secure pairwise communication between neighboring nodes.
- Transparency: Application programmers are unsure of security parameters and can disable if standardized APIs are not provided. It should be transparent to the user.
- Portability: Should fit into the radio stack so that porting the radio stack from one platform to another (ATmel, Intel, X86, etc.) is a simple job.
β Key Takeaways
Students must remember that traditional TCP is unsuitable for WSN due to high overhead, unfair bandwidth allocation, energy-expensive end-to-end reliability, and packet-based reliability being unnecessary for event-driven applications. PSFQ uses hop-by-hop NACK-based recovery with Pump, Fetch, and Report operations to achieve reliable sink-to-node transport under high error rates. ESRT defines reliability as normalized reliability (observed/desired) and adjusts reporting frequency based on congestion and reliability states using four algorithms. CODA detects congestion through channel sampling rather than buffer occupancy and uses open-loop backpressure and closed-loop source regulation. TinySec provides lightweight link-layer security addressing access control, message integrity, confidentiality, and replay protection while balancing security strength with performance overhead.
π§ Quick Revision Questions
- What three main reasons make TCP unsuitable for Wireless Sensor Networks, and why is packet-based reliability problematic for event-driven applications?
- In PSFQ, what triggers a NACK message during the Fetch operation, and how does the 'proactive fetch' mode work?
- How does ESRT calculate normalized reliability, and what four actions does it take based on congestion and reliability conditions?
- What two methods does CODA use for congestion detection, and how do open-loop backpressure and closed-loop source regulation differ?
- What three security properties does TinySec aim to provide, and why is link-layer security preferred over end-to-end security in sensor networks?