Back

UWB

Loading views...

UWB

Overview

UWB (Ultra-Wideband) is a short-range radio technology that uses very wide bandwidth (>500 MHz) pulses for precise time-of-flight ranging, achieving centimeter-level positioning accuracy. IEEE 802.15.4z standardizes UWB for ranging in phones, access control, and automotive keyless entry.


1. Theory & Fundamentals

  • Bandwidth: >500 MHz (typically 3.1–10.6 GHz)
  • Principle: Time-of-flight (ToF) or TDOA for ranging
  • Accuracy: ±10 cm positioning
  • Range: Up to 200m (practical: 10–50m)
  • Power: Low; impulse radio uses very short pulses
  • IEEE 802.15.4a/z: PHY standards for UWB ranging
  • Chipset: DW1000/DW3000 (Qorvo/Decawave), Apple U1, NXP SR040

2. Frame / Packet Structure

UWB uses IEEE 802.15.4 MAC frames:
  Frame Control | Seq Num | Addressing | Payload | FCS

Two-Way Ranging (TWR):
  Initiator: Poll message (T_SP)
  Responder: Response message (T_SR) after fixed delay
  Initiator: Final message (T_SF)
  Range = c × (T_round - T_reply) / 2

Symmetric Double-Sided TWR (SDS-TWR):
  Initiator Poll → Responder Response → Initiator Final → Responder Report
  Eliminates clock offset error

3. Protocol Mechanics

  • Ranging: TWR (Two-Way Ranging) or TDOA (Time Difference of Arrival)
  • Precision timestamps: Hardware timestamps with sub-nanosecond resolution
  • Channel hopping: Channels 1–15 in 3.1–10.6 GHz range; Ch5 most common
  • PRF (Pulse Repetition Frequency): 16 MHz or 64 MHz
  • Data rate: 110 kbps, 850 kbps, or 6.8 Mbps
  • CIR (Channel Impulse Response): Used for multipath analysis

4. Hardware Implementation

  • DW3000 module: Qorvo DWM3000 breakout; SPI interface
  • Antenna: UWB-specific wideband patch or monopole
  • Crystal: 38.4 MHz TCXO for accurate timing
  • Power: 3.3V; ~100mA TX; 50mW idle
  • UWB IC integrates in iPhone 11+ (U1), Samsung Galaxy (UWB chip), NXP Trimension

5. Register-Level / Configuration

// Qorvo DW3000 (Decawave) SPI init
dwt_initialise(DWT_DW_IDLE);
dwt_configure(&config); // Channel 5, PRF 64MHz, data 6.8Mbps

// Initiator: send poll and measure response timing
dwt_starttx(DWT_START_TX_IMMEDIATE);
uint64_t poll_tx_ts = get_tx_timestamp_u64();
// Wait for response
dwt_rxenable(DWT_START_RX_IMMEDIATE);
uint64_t resp_rx_ts = get_rx_timestamp_u64();
double dist = (resp_rx_ts - poll_tx_ts - antenna_delay) * DWT_TIME_UNITS * SPEED_OF_LIGHT / 2;

6. Driver / Software Development

  • Initialize hardware peripheral or SoC block
  • Implement send/receive with interrupt or DMA
  • Handle errors: timeout, CRC, NAK, bus-off
  • Use circular buffers for RX data flow
  • Implement retry logic for reliability

7. Debugging & Testing

  • Decawave EVK1000: Reference kit with two DW1000 boards, demo software
  • Scope/logic analyzer on SPI for command verification
  • CIR analysis: Plot channel impulse response to identify multipath
  • Common issues: Antenna placement (avoid metal); crystal tolerance affects range accuracy
  • Range test tool: Measure RSSI and range vs physical distance

8. Real-World Applications

  1. Apple AirTag / Find My (iPhone U1 precise finding)
  2. Automotive keyless entry with relay attack prevention
  3. Indoor positioning (warehouse, hospital asset tracking)
  4. Secure access control (sub-10cm proximity verification)
  5. AR/VR device position tracking

9. Advanced Topics & Edge Cases

  • Apple Nearby Interaction framework: iOS API for UWB ranging
  • FiRa Consortium: Standard for UWB interoperability in phones/access
  • CCC Digital Key: UWB-based digital car key standard
  • RTLS: Real-Time Location System using 4+ anchors for 3D positioning
  • Multipath mitigation: First-path detection in CIR for NLOS

10. Standards & Variants

System Tech Accuracy Range Cost
UWB Impulse radio ±10cm 200m High
BLE AoA BLE 5.1 ±30cm 50m Medium
Wi-Fi FTM 802.11mc ±1m 50m Low
GPS Satellite ±3m Global Medium

💡 Practical Examples

Ex 1: Two-way ranging

Initiator sends Poll → Responder timestamps → sends Response → Initiator calculates distance.

Ex 2: TDOA positioning

4 anchors receive tag's blink; server calculates tag position from time differences.

Ex 3: iPhone UWB

Use Nearby Interaction framework: NISession, get distance and direction to accessory.


🧪 Practice Questions

Beginner

  1. What frequency range does UWB use?
  2. How accurate is UWB ranging?
  3. What does ToF stand for?
  4. Name 2 devices that include UWB.
  5. What is TDOA?

Intermediate

  1. Explain Two-Way Ranging (TWR) step by step.
  2. How does UWB prevent relay attacks in car key systems?
  3. Calculate range from TWR timestamps.
  4. What causes NLOS error in UWB and how to mitigate?
  5. Set up DW3000 for 6.8 Mbps data rate.

Advanced

  1. Design a 3D RTLS using 6 UWB anchors.
  2. Implement SDS-TWR to eliminate clock offset error.
  3. Build an RTLS server that processes TDOA from 4 anchors.
  4. Optimize UWB for 10-year battery in an asset tag.
  5. Implement UWB CCC Digital Key protocol.

Projects

  1. Asset Tracker: UWB RTLS with DW3000 anchors, plot positions on map.
  2. Proximity Lock: Door unlocks only when phone is within 20cm.
  3. Indoor Navigation: 4-anchor UWB system guiding user to target.

Checklist

  • [ ] Understand ToF and TDOA ranging principles
  • [ ] Initialize DW3000 via SPI
  • [ ] Implement basic TWR between two nodes
  • [ ] Achieve <20cm ranging accuracy
  • [ ] Set up RTLS with 4 anchors
  • [ ] Use iOS Nearby Interaction API
  • [ ] Debug with CIR analysis
  • [ ] Handle NLOS conditions
  • [ ] Design UWB antenna correctly
  • [ ] Implement FiRa-compatible ranging session