📡 Wireless Sensor Networks

Comprehensive Study Guide for Undergraduate Communication Engineering

1. Introduction to Wireless Sensor Networks

1.1 Definition

A Wireless Sensor Network (WSN) is a distributed network consisting of spatially distributed autonomous sensors that monitor physical or environmental conditions, such as temperature, sound, pressure, motion, or pollutants, and cooperatively pass their data through the network to a main location or sink node.

Key Characteristics of WSNs:

  • Large Scale: Hundreds to thousands of sensor nodes
  • Ad-hoc Deployment: Nodes are randomly deployed
  • Resource Constraints: Limited energy, memory, and processing power
  • Self-Organization: Nodes organize themselves into a network
  • Multi-hop Communication: Data travels through multiple nodes to reach the sink
  • Data-Centric: Focus on data rather than individual node addresses

1.2 Historical Development

The concept of WSNs emerged from military applications in the 1970s with the Distributed Sensor Networks (DSN) program by DARPA. The modern era of WSNs began in the late 1990s with advancements in MEMS (Micro-Electro-Mechanical Systems) technology, wireless communications, and digital electronics, enabling the development of small, low-cost sensor nodes.

1.3 WSN vs Traditional Networks

Feature Traditional Networks Wireless Sensor Networks
Primary Goal Data communication Data gathering and processing
Number of Nodes Tens to hundreds Hundreds to thousands
Power Source Unlimited (mains powered) Limited (battery powered)
Node Deployment Planned and pre-determined Random and ad-hoc
Node Failure Not tolerated Expected and tolerated
Topology Fixed infrastructure Dynamic and changing

2. Network Architecture

2.1 Node Architecture

A typical sensor node consists of five main components:

Sensor Node Architecture

Sensing Unit
Sensors (temperature, humidity, light, etc.) + ADC
Processing Unit
Microcontroller/Processor + Memory (RAM, Flash)
Communication Unit
Transceiver (Radio Module)
Power Unit
Battery + Energy Harvesting (optional)
Additional Components
Location Finding System, Mobilizer, Power Generator

2.2 Network Architecture Types

Flat Architecture

In flat architecture, all nodes have equal roles and responsibilities. Each node participates in routing and data forwarding. This architecture is simple but suffers from scalability issues as the network grows.

Hierarchical (Clustered) Architecture

Nodes are organized into clusters with a cluster head (CH) responsible for data aggregation and communication with the sink. This reduces energy consumption and improves scalability.

Cluster Head Selection Probability:
Pi(t) = k / (N - k × (r mod N/k)) if i ∈ G
Pi(t) = 0 otherwise

Where:
k = desired percentage of cluster heads
N = total number of nodes
r = current round
G = set of nodes not selected as CH in last 1/P rounds

2.3 Communication Architecture

Single-Hop vs Multi-Hop

Data-Centric vs Address-Centric

3. Hardware Components

3.1 Sensor Devices

Sensors convert physical phenomena into electrical signals. Common types include:

3.2 Microcontrollers

Popular microcontrollers in WSNs:

Platform Processor Memory Power Features
Arduino ATmega328P 32KB Flash, 2KB SRAM ~20mA active Easy programming, large community
ESP32 Dual-core Xtensa 4MB Flash, 520KB SRAM ~240mA (WiFi) WiFi, Bluetooth, high performance
nRF52840 ARM Cortex-M4 1MB Flash, 256KB RAM ~4.6mA TX Bluetooth 5, Thread, Zigbee
MSP430 16-bit RISC Up to 256KB Flash ~1mA active Ultra-low power, popular in WSNs

3.3 Communication Modules

Radio Technologies

Free Space Path Loss (FSPL):
FSPL(dB) = 20log₁₀(d) + 20log₁₀(f) + 20log₁₀(4π/c)

Where:
d = distance (meters)
f = frequency (Hz)
c = speed of light (3×10⁸ m/s)

Simplified: FSPL(dB) = 20log₁₀(d) + 20log₁₀(f) - 147.55

3.4 Power Sources

4. Communication Protocols

4.1 Protocol Stack

The WSN protocol stack differs from the traditional OSI model to address specific constraints:

WSN Protocol Stack

Application Layer
Query processing, data aggregation, application-specific services
Transport Layer
Reliable data transport, congestion control, flow control
Network Layer
Routing, topology management, address allocation
Physical Layer
Modulation, transmission, reception, channel encoding
Power Management Plane
Energy-aware operation, sleep scheduling
Mobility Management Plane
Tracking node movement, maintaining connectivity
Task Management Plane
Task allocation, scheduling, load balancing

4.2 Physical Layer

The physical layer is responsible for:

Modulation Techniques

4.3 IEEE 802.15.4 Standard

The foundation for many WSN protocols including Zigbee, Thread, and 6LoWPAN:

Maximum Theoretical Throughput:
Throughput = (Payload × 8) / (PHY Header + MAC Header + Payload + Inter-frame spacing) × Symbol Rate

For 2.4 GHz with 250 kbps and 100-byte payload:
Efficiency ≈ 70-80% due to overhead

5. Routing Protocols

5.1 Routing Challenges in WSNs

5.2 Classification of Routing Protocols

5.2.1 Flat Routing Protocols

Flooding and Gossiping

Flooding: Each node broadcasts data to all neighbors. Simple but causes implosion and overlap problems.

Gossiping: Nodes randomly select one neighbor to forward data. Reduces implosion but increases latency.

SPIN (Sensor Protocols for Information via Negotiation)

Uses metadata negotiation to eliminate redundant data transmission:

  • ADV: Advertise new data using metadata
  • REQ: Request specific data
  • DATA: Send actual data

Advantages: Energy efficiency, no data implosion. Disadvantages: Data advertisement overhead, not suitable for applications requiring continuous data delivery to sink.

Directed Diffusion

Data-centric routing protocol:

  1. Interest Propagation: Sink broadcasts interest (query) for named data
  2. Gradient Setup: Each node sets up gradient toward neighbors from which interest is received
  3. Data Propagation: Source sends data along gradient path
  4. Reinforcement: Sink reinforces best path for future data

5.2.2 Hierarchical Routing Protocols

LEACH (Low-Energy Adaptive Clustering Hierarchy)

First hierarchical routing protocol for WSNs:

  • Nodes self-organize into clusters
  • Cluster heads rotate to distribute energy load
  • CHs aggregate data and send to sink
  • Non-CH nodes communicate only with their CH
Cluster Head Election:
T(n) = P / (1 - P × (r mod 1/P)) if n ∈ G
Where P = desired percentage of CHs, r = current round, G = nodes not been CH in last 1/P rounds

TEEN (Threshold-sensitive Energy Efficient sensor Network protocol)

Designed for time-critical applications:

  • Hard Threshold (HT): Minimum value to trigger transmission
  • Soft Threshold (ST): Minimum change in sensed value to trigger transmission

Advantages: Reduces transmissions, suitable for reactive monitoring. Disadvantages: If thresholds not reached, nodes never communicate (can be solved by periodic reporting).

5.2.3 Location-Based Routing

GPSR (Greedy Perimeter Stateless Routing)

Uses geographic location for routing decisions:

  • Greedy Mode: Forward packet to neighbor closest to destination
  • Perimeter Mode: Used when greedy mode fails (local maximum), routes around void using right-hand rule

Advantages: Stateless (no route discovery), scalable. Disadvantages: Requires location information, suboptimal paths in perimeter mode.

5.3 QoS-Based Routing

Protocols that consider quality of service requirements:

6. MAC Protocols

6.1 Design Goals for WSN MAC Protocols

6.2 Sources of Energy Waste

Major Energy Wastage Sources:

  • Collision: Packets collide and must be retransmitted
  • Overhearing: Nodes receive packets not intended for them
  • Idle Listening: Listening to an idle channel
  • Control Packet Overhead: Routing and MAC control packets
  • Over-emitting: Transmitting when receiver is not ready

6.3 Classification of MAC Protocols

6.3.1 Scheduled (TDMA-based) Protocols

SMACS (Self-Organizing Medium Access Control for Sensor Networks)

  • Combines neighbor discovery and channel assignment
  • Each link uses different frequency or time slot
  • No global synchronization required
  • Good for static networks, not suitable for mobile nodes

TRAMA (Traffic Adaptive Medium Access)

  • Node-based TDMA protocol
  • Uses traffic information to schedule transmissions
  • Nodes announce their schedule to neighbors
  • High overhead for schedule exchange

6.3.2 Contention-Based Protocols

S-MAC (Sensor-MAC)

Designed specifically for WSNs:

  • Periodic Sleep-Listen: Nodes sleep periodically to save energy
  • Adaptive Listening: Nodes wake up briefly at end of transmission to reduce latency
  • Message Passing: Long messages broken into fragments with single RTS/CTS
  • Overhearing Avoidance: Nodes sleep after hearing RTS/CTS not for them
Duty Cycle:
Duty Cycle = Listen Time / (Listen Time + Sleep Time) × 100%

Typical values: 1-10% for low traffic, up to 50% for high traffic

T-MAC (Timeout-MAC)

Improvement over S-MAC:

  • Adaptive duty cycle based on traffic
  • Nodes sleep if no activation event for time TA
  • Better for variable traffic loads
  • Early sleeping problem: nodes may miss messages

B-MAC (Berkeley MAC)

Simple, low-power MAC:

  • Low Power Listening (LPL): preamble sampling
  • Nodes wake up periodically to check channel
  • Long preamble ensures receiver is awake
  • Simple implementation, no synchronization needed

6.3.3 Hybrid Protocols

Z-MAC (Zebra MAC)

Combines TDMA and CSMA:

  • Uses CSMA as baseline
  • TDMA schedule provides priority (owner has higher priority)
  • Adapts to contention level
  • High overhead for slot assignment

6.4 Comparison of MAC Protocols

Protocol Type Energy Efficiency Latency Throughput Scalability
IEEE 802.11 Contention Low Low High Medium
S-MAC Contention High Medium Medium Medium
T-MAC Contention High Medium Medium Medium
B-MAC Contention Very High High Low High
TRAMA Scheduled High High Medium Medium
Z-MAC Hybrid Medium Low High Medium

7. Applications of WSNs

7.1 Environmental Monitoring

Forest Fire Detection

Sensor nodes deployed throughout forests monitor temperature, humidity, and smoke levels. Early detection enables rapid response to prevent large-scale fires.

Key Requirements: Long network lifetime, outdoor ruggedness, real-time alerts

Precision Agriculture

Soil moisture, temperature, and nutrient sensors help optimize irrigation and fertilization. Variable rate application reduces water usage and environmental impact.

Key Requirements: Large coverage area, low cost per node, weather resistance

Wildlife Tracking

Animals fitted with sensor collars transmit location and physiological data. Helps study migration patterns and endangered species behavior.

Key Requirements: Mobility support, GPS integration, long battery life

7.2 Industrial Applications

Machine Condition Monitoring

Vibration and temperature sensors monitor industrial equipment health. Predictive maintenance reduces downtime and maintenance costs.

Key Requirements: High sampling rates, real-time processing, reliability

Pipeline Monitoring

Acoustic and pressure sensors detect leaks in oil, gas, and water pipelines. Early leak detection prevents environmental disasters.

Key Requirements: Long-distance communication, hazardous environment operation

7.3 Healthcare Applications

Remote Patient Monitoring

Wearable sensors monitor vital signs (heart rate, blood pressure, ECG) continuously. Data transmitted to healthcare providers for chronic disease management.

Key Requirements: High reliability, security, patient comfort

Assisted Living

Sensors in homes monitor elderly residents' activities and detect falls. Enables independent living while ensuring safety.

Key Requirements: Non-intrusive, privacy protection, easy installation

7.4 Smart Cities

Smart Parking

Magnetic or ultrasonic sensors detect parking space occupancy. Mobile apps guide drivers to available spots, reducing traffic congestion.

Structural Health Monitoring

Accelerometers and strain gauges monitor bridges, buildings, and dams. Detects structural damage early to prevent catastrophic failures.

Smart Grid

Smart meters and grid sensors optimize electricity distribution. Demand response and fault detection improve grid efficiency and reliability.

7.5 Military Applications

Battlefield Surveillance

Acoustic and seismic sensors detect troop and vehicle movements. Unattended ground sensors provide persistent surveillance.

Chemical/Biological Detection

Sensor networks detect chemical weapons or biological agents. Rapid detection enables protective measures and medical response.

8. Challenges and Future Directions

8.1 Key Challenges

Energy Constraints

Sensor nodes typically operate on limited battery power. Energy harvesting and ultra-low-power design are active research areas. Protocols must be energy-aware at all layers.

Scalability

WSNs may contain thousands of nodes. Protocols must scale efficiently without excessive overhead. Addressing and routing become challenging at large scales.

Reliability and Fault Tolerance

Node failures are common due to energy depletion or environmental factors. Networks must self-heal and maintain connectivity. Data redundancy and multi-path routing improve reliability.

Security

WSNs are vulnerable to various attacks: eavesdropping, node capture, denial of service, false data injection. Limited resources make traditional security mechanisms impractical. Lightweight cryptographic protocols are needed.

Quality of Service

Different applications have different QoS requirements (latency, reliability, bandwidth). Balancing QoS with energy efficiency is challenging.

Data Management

Massive amounts of data generated need efficient storage, aggregation, and querying. In-network processing reduces communication overhead.

8.2 Emerging Trends

Future Directions in WSN Research:

  • Internet of Things (IoT) Integration: WSNs as key enablers of IoT, integration with cloud and edge computing
  • 5G and Beyond: Integration of WSNs with cellular networks for wide-area coverage
  • AI/ML at the Edge: Machine learning algorithms running on sensor nodes for intelligent decision making
  • Energy Harvesting: Self-powered sensors using solar, vibration, thermal, or RF energy
  • Underwater and Underground WSNs: Specialized networks for challenging environments
  • Mobile WSNs: Networks with mobile nodes for improved coverage and connectivity
  • Blockchain for Security: Distributed ledger technology for secure data integrity
  • Digital Twins: Virtual representations of physical sensor networks for optimization

8.3 Standardization Efforts

Summary of Key Learning Points

  • WSNs consist of resource-constrained nodes that self-organize to monitor environments
  • Energy efficiency is the primary design consideration at all protocol layers
  • Routing protocols are classified as flat, hierarchical, or location-based
  • MAC protocols balance energy efficiency with latency and throughput
  • Applications span environmental monitoring, healthcare, industrial automation, and smart cities
  • Future WSNs will integrate with IoT, AI, and next-generation communication networks