MAC protocol design issues and classification
MAC protocol design issues and classification for wireless sensor networks: energy, latency, throughput trade-offs and the main protocol families (contention-based, schedule-based, hybrid, sampling-based, receiver-initiated).
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Wireless sensor network (WSN) nodes run on batteries or energy harvesting, so the Medium Access Control (MAC) layer must carefully coordinate radios to save energy while delivering required throughput and latency. An engineer uses MAC design and classification when selecting or designing a protocol for a WSN application (e.g., environmental sensing, industrial monitoring, or smart city) to meet constraints on energy, delay, reliability and scale.
Key ideas
Start from first principles: the radio transceiver is the main energy consumer in a sensor node. MAC protocols control when nodes transmit, receive or sleep; good MAC design reduces idle listening, collisions, control overhead and overhearing.
Definitions (define before use):
- Medium Access Control (MAC): the sublayer that decides which node transmits on a shared wireless medium and when. It provides channel-sharing rules to avoid or manage collisions.
- Collision: when two transmissions overlap in time at a receiver so reception fails.
- Hidden terminal: a node A and node C cannot hear each other but both can reach node B. If A and C transmit at the same time, B receives a collision. (Draw: three nodes in a triangle; label links where A–B and C–B exist but A–C has no link.)
- Exposed terminal: node C refrains from transmitting to node D because it senses a transmission from B to A, even though C’s transmission to D would not interfere with A’s reception. (Draw: four nodes A–B–C–D in a line showing carrier sense at C but non-overlapping interference at A and D.)
- Duty cycle: fraction of time a node is awake (radio on) versus total time: duty_cycle = awake_time / period.
- Throughput: rate of successfully delivered application bits at the sink or receiver, in bits per second (bps).
- Latency: end-to-end delay between sensing event and data arrival at sink.
Design goals and trade-offs (exact statements):
- Minimize energy consumption subject to acceptable latency and throughput. (Assumption: radio is dominant energy consumer; computing is negligible compared to radio.)
- Maintain acceptable reliability (packet delivery ratio) while scaling to required number of nodes.
Primary MAC design issues (explain plainly):
- Energy efficiency — avoid idle listening, overhearing, collisions and protocol overhead. Techniques: sleep scheduling, short preambles, receiver-initiated handshakes, scheduled slots. In CSMA/CA, optional RTS/CTS (virtual carrier sensing) can mitigate hidden terminals for long packets but adds control overhead and latency; IEEE 802.11 uses it optionally, while IEEE 802.15.4 typically relies on CCA without RTS/CTS.
- Latency and throughput — sleeping increases delay; contention causes collisions and reduces throughput. Trade-offs depend on application traffic pattern (periodic, event-driven, bursty).
- Synchronization — schedule-based protocols (TDMA) require time sync; synchronization costs energy and incurs complexity.
- Scalability and adaptability — protocol should work for node density and traffic variations; static TDMA scales poorly without dynamic slot assignment.
- Complexity and memory — sensor nodes have limited CPU and RAM; MAC should be implementable on constrained hardware.
- Fairness and priority — some nodes or flows may need priority (e.g., alarm messages).
- Topology and traffic pattern — convergecast (many-to-one) patterns common in WSN; MAC must handle hotspots near sinks.
- Security and robustness — MAC-layer denial-of-service (jamming) and misbehaving nodes are concerns.
Classification of MAC protocols (exact categories and short definition):
- Contention-based MAC: nodes compete for the channel at transmit time (examples: ALOHA, CSMA/CA). No fixed schedule. CSMA/CA uses carrier sensing (CCA) and random backoff to reduce collisions.
- Schedule-based MAC (TDMA): time divided into slots and nodes assigned exclusive transmission slots to avoid collisions.
- Hybrid MAC: combines contention and scheduling (example: IEEE 802.15.4 with CAP/CFP where CAP uses CSMA/CA (slotted in beacon-enabled mode) and CFP uses GTS slots).
- Preamble-sampling (asynchronous) MAC: receivers wake periodically to sample the channel; senders transmit long preambles (examples: B-MAC, X-MAC uses strobed short preambles).
- Synchronous sleep-schedule MAC: neighbors synchronize sleep/wake schedules to reduce idle listening (example: S-MAC).
- Receiver-initiated MAC: receiver periodically beacons readiness; senders transmit when they detect beacon (example: RI-MAC).
For each class, list pros and cons briefly (exam style):
- Contention: simple, adaptive to low traffic; poor for high load and can waste energy in collisions.
- TDMA: collision-free and energy efficient when schedule fits traffic; needs sync and complex slot assignment.
- Preamble sampling: simple and asynchronous; long preambles cause energy waste for sender, optimized by strobed preambles.
- Receiver-initiated: reduces sender preamble cost and idle listening but needs frequent beacons.
Diagram instructions (what to draw and label):
- Hidden terminal: draw three circles A, B, C with radio ranges; show A and C out of range of each other, both in range of B. Label transmissions overlapping at B.
- TDMA timeline: draw horizontal time axis divided into equal slots; label slot boundaries, guard time, and show assigned slots for nodes 1..N and an example collision if two nodes share a slot.
Formulas
E = P · t
- E: energy in joules (J); P: power in watts (W); t: time in seconds (s). Applies to any constant-power period.
P = V · I
- P: power (W); V: voltage (V); I: current (A). Applies for DC supply to node.
E = V · I · t
- E: energy (J); V: voltage (V); I: current draw (A); t: time (s). Use to compute energy consumed in active or sleep state.
duty_cycle = t_awake / T_period
- duty_cycle: dimensionless fraction (0..1); t_awake: awake time per period (s); T_period: period length (s).
Throughput S = successful_packets · packet_size / time
- S: throughput (bps); successful_packets: number of successfully received packets; packet_size: bits per packet; time: seconds of measurement.
For pure ALOHA: S = G · e^{-2G}. Maximum throughput occurs at G = 0.5, with S_max = 1/(2e) ≈ 0.184.
- S: throughput (normalized to slots or channel capacity); G: offered load (attempts per packet time). Applies to unslotted ALOHA assumptions.
For slotted ALOHA: S = G · e^{-G}. Maximum throughput occurs at G = 1, with S_max = 1/e ≈ 0.368.
- Same symbols; applies when transmissions start only at slot boundaries (slotted assumption).
Average sleep delay ≈ (T_period - t_awake)/2
- Use as a rough estimate of additional latency due to duty cycling for uniformly random packet arrival within period; units seconds.
Channel utilization η = S / C
- η: utilization (0..1); S: achieved throughput (bps); C: physical channel rate (bps).
Worked examples
Example 1 — Duty cycle and daily energy calculation (numerical). Problem: A sensor node runs on 3.3 V. When radio is active it draws 20 mA; in sleep it draws 50 µA. The node is awake 100 ms every 1.0 s. Compute energy per day consumed by radio. Steps:
- Compute duty cycle: duty_cycle = 0.100 s / 1.0 s = 0.1.
- Active current I_active = 20 mA = 0.02 A; sleep current I_sleep = 50 µA = 0.00005 A.
- Average current I_avg = duty_cycle·I_active + (1 - duty_cycle)·I_sleep = 0.1·0.02 + 0.9·0.00005 = 0.002 + 0.000045 = 0.002045 A.
- Power P = V·I_avg = 3.3 V · 0.002045 A = 0.0067485 W.
- Energy per day E_day = P · t = 0.0067485 W · (24·3600 s) = 0.0067485 · 86400 = 583.0704 J. Final answer: 583.07 J per day.
Example 2 — Slotted ALOHA throughput numeric. Problem: Offered load G = 0.5 attempts/slot in slotted ALOHA. Compute throughput S (attempts successful per slot) and channel efficiency.
- Use formula S = G · e^{-G}.
- S = 0.5 · e^{-0.5} = 0.5 · 0.60653 = 0.303265.
- Efficiency is S/G = 0.303265 / 0.5 = 0.60653 or normalized utilization 0.303265 (if channel capacity is 1 attempt/slot). Final answer: S = 0.3033 successful attempts per slot (≈30.33% of channel capacity).
Example 3 — TDMA maximum nodes given slot time (small algorithmic calculation). Problem: Frame period 1 s. Each node needs 10 ms transmit slot and 0.5 ms guard time. What is the maximum number of nodes in schedule? Steps:
- Slot_total = 10 ms + 0.5 ms = 10.5 ms = 0.0105 s.
- Max_nodes = floor(1 s / 0.0105 s) = floor(95.238...) = 95. Final answer: 95 nodes.
Common mistakes
- Forgetting to include guard times when computing TDMA slot capacity.
- Using pure ALOHA throughput formula for a slotted system (or vice versa).
- Not converting mA to A or ms to s in energy formulas (units error).
- Assuming duty-cycle reduction always reduces energy without considering synchronization overhead or control messages.
- Equating physical data rate to throughput without accounting for MAC overhead, retransmissions and collisions.
For your exam
Types of questions:
- Definitions: define MAC, duty cycle, hidden/exposed terminal, receiver-initiated MAC.
- Short notes: list MAC design issues; compare TDMA and CSMA for WSN.
- Derivations: derive throughput formula for slotted ALOHA (show Poisson/independent attempt assumption leading to S = G e^{-G}).
- Numericals: compute duty cycle energy, number of TDMA slots, throughput given G.
- Diagrams: draw hidden/exposed terminal and TDMA slot timeline with guard time. What full-marks answers include:
- Clear definitions with bolded key terms (exam style), units for numbers, step-by-step calculations with unit conversion, stated assumptions (e.g., Poisson arrivals for ALOHA), and labelled diagrams as requested.
Quick check
- What is the main energy waste in idle listening?
- State the slotted ALOHA throughput formula.
- In a TDMA frame of 2 s, if each slot is 20 ms including guard time, how many slots fit?
Answers: Idle listening wastes energy when radio is on but no packets arrive;S = G · e^{-G}for slotted ALOHA; floor(2 s / 0.020 s) = 100 slots.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?