GPS fails indoors due to signal attenuation (20-40 dB through building materials), requiring alternative technologies: BLE beacons (1-3m accuracy, low cost), Wi-Fi fingerprinting (3-5m using existing infrastructure), UWB (10-30cm precision but expensive), and ultrasonic (3cm but requires line-of-sight). Real-world applications use sensor fusion – combining GPS, Wi-Fi, BLE, and IMU with Kalman filters – to provide seamless indoor-outdoor positioning with smooth technology handoffs.
12.1 Learning Objectives
By the end of this chapter, you will be able to:
Compare Indoor Positioning Technologies: Evaluate Wi-Fi, BLE, UWB, and ultrasonic systems for accuracy, cost, and deployment trade-offs
Apply Trilateration Calculations: Compute position estimates from beacon distance measurements using RSSI path loss models
Design Sensor Fusion Systems: Combine GPS, Wi-Fi, BLE, and IMU for seamless indoor-outdoor transitions using weighted estimation
Troubleshoot Multipath Effects: Identify and mitigate RF interference in indoor environments using fingerprinting and filtering techniques
For Beginners: Indoor Positioning Technologies
Your phone’s GPS works well outside, but try using a maps app inside a large shopping mall or airport – the blue dot jumps wildly or disappears entirely. That is because GPS satellite signals are too weak to penetrate roofs and walls. Indoor positioning solves this problem using technologies already found in most buildings: Wi-Fi access points, Bluetooth beacons, and even the sensors inside your smartphone. Think of it like switching from satellite navigation to a local guide who knows the building layout. This chapter explores how these indoor technologies work and how systems combine them for accurate positioning everywhere.
Satellite signals are extremely weak (~10-16 watts received at the surface)
Building materials attenuate signals by 20-40 dB (a concrete wall alone absorbs 10-15 dB)
Multipath from walls, ceilings, and furniture creates severe interference patterns
No line-of-sight to satellites exists in most buildings
This requires alternative technologies specifically designed for indoor environments, each with distinct accuracy, cost, and infrastructure trade-offs.
12.4 Indoor Positioning Technologies
Figure 12.1: Comparison of indoor positioning technologies by accuracy and infrastructure requirements.
Technology
Accuracy
Infrastructure
Cost
Power
Use Case
BLE Beacons
1-3m
Deploy beacons
Low
Very Low
Retail, navigation
Wi-Fi RSSI
3-5m
Use existing
Free
Medium
Zone detection
UWB
10-30cm
Deploy anchors
High
Medium
Asset tracking, AR
Ultrasonic
3cm
Deploy sensors
Very High
High
Precision tracking
Camera/Vision
Variable
Deploy cameras
High
High
Analytics, AR
12.5 BLE Beacon Positioning
BLE beacons continuously broadcast identifier packets at regular intervals. Smartphones and gateways detect these signals and estimate distance based on Received Signal Strength Indication (RSSI) – the measured power of the received signal.
Figure 12.2: BLE iBeacons for Indoor Positioning
12.5.1 RSSI-Based Distance Estimation
The relationship between RSSI and distance follows the log-distance path loss model:
Let us calculate positioning accuracy and beacon deployment density for a warehouse asset tracking system:
Scenario: 10,000 m2 warehouse with UWB anchors for 20cm accuracy pallet tracking.
UWB Time-of-Flight Distance Measurement:\[
d = c \times \frac{t_{\text{ToF}}}{2}
\]
For UWB with 500 MHz bandwidth, the timing precision is the inverse of bandwidth: \[
\begin{aligned}
\text{Timing Precision} &= \frac{1}{500 \times 10^6} = 2\text{ ns} \\
\text{Distance Resolution} &= 3 \times 10^8 \times 2 \times 10^{-9} = 0.6\text{ m (single-pulse theoretical limit)}
\end{aligned}
\]
Multipath Mitigation with Leading-Edge Detection:
UWB achieves far better practical accuracy than the single-pulse limit by using leading-edge detection (isolating the first-arrival pulse from reflected copies) and correlator techniques: \[
\sigma_{\text{practical}} \approx \frac{c}{2 \cdot B \cdot \sqrt{\text{SNR}}} = \frac{3 \times 10^8}{2 \times 500 \times 10^6 \times \sqrt{30}} \approx 0.055\text{ m}
\]
With SNR of ~15 dB (linear 30) and leading-edge detection ignoring reflected paths, this achieves 10-30cm practical accuracy – well below the 0.6m single-pulse resolution.
Anchor Density Calculation:\[
N_{\text{anchors}} = \frac{A_{\text{total}}}{A_{\text{coverage}}} \times F_{\text{overlap}}
\]
For 20cm accuracy with 15m anchor range: \[
\begin{aligned}
A_{\text{coverage}} &= \pi \times 15^2 = 706.9\text{ m}^2 \\
F_{\text{overlap}} &= 2.0\text{ (each point seen by 4+ anchors)} \\
N_{\text{anchors}} &= \frac{10{,}000}{706.9} \times 2.0 \approx 28\text{ anchors}
\end{aligned}
\]
ROI: 12.7 months payback period, justifying UWB deployment for centimeter-level tracking vs. BLE beacons (3m accuracy, insufficient for pallet-level inventory).
Worked Example: BLE Beacon Trilateration in a Retail Store
Scenario: A retail store deploys BLE beacons for indoor customer navigation. The positioning system uses trilateration from RSSI measurements to estimate shopper location.
Given:
Beacon A at position (0, 0) meters, measured RSSI = -65 dBm
Beacon B at position (10, 0) meters, measured RSSI = -72 dBm
Beacon C at position (5, 8) meters, measured RSSI = -68 dBm
Calibrated path loss model: RSSI = -59 dBm at 1 meter, path loss exponent n = 2.5
Distance formula: d = 10^((TxPower - RSSI) / (10 x n))
Set up trilateration equations (three circles that ideally intersect at the device location):
Circle A: x2 + y2 = 1.742 = 3.03
Circle B: (x-10)2 + y2 = 3.312 = 10.96
Circle C: (x-5)2 + (y-8)2 = 2.292 = 5.24
Subtract Circle A from Circle B: -20x + 100 = 7.93, so x = 4.60
Substitute into Circle A: y2 = 3.03 - 21.16 (negative – circles do not perfectly intersect due to RSSI noise)
Apply least-squares estimation to find the closest point to all three circles: Position estimate approximately (1.5, 0.8) meters
Apply error bounds:
With RSSI variance of +/-3 dBm, distance error is approximately +/-30%
Position uncertainty: +/-1.2 meters (95% confidence)
Result: Shopper estimated at approximately (1.5, 0.8) meters with 1.2 meter accuracy, placing them in the “Electronics” zone near Beacon A.
Key Insight: BLE trilateration accuracy depends heavily on path loss exponent calibration. A path loss exponent error of 0.3 (using n=2.2 instead of n=2.5) would shift the position estimate by 0.8 meters. In practice, RSSI noise means circles rarely intersect perfectly, so least-squares or maximum-likelihood estimation is always used. Always calibrate path loss in the actual deployment environment, not from datasheet values.
12.6 Wi-Fi Fingerprinting
Wi-Fi fingerprinting maps RSSI patterns to physical locations by pre-surveying the space. Unlike trilateration (which estimates distance from signal strength), fingerprinting treats the entire RSSI vector as a unique location signature.
Figure 12.3: Wi-Fi Signal Fingerprinting
12.6.1 Two-Phase Process
Offline Phase (Survey):
Walk through the space with a reference device on a systematic grid
At each known location, record RSSI from all visible access points
Build a fingerprint database mapping RSSI vectors to (x, y) locations
Online Phase (Positioning):
Device scans visible APs and measures current RSSI vector
Compare current RSSI vector to database entries using distance metrics (Euclidean, Manhattan, or probabilistic)
Find the k-nearest matches and compute a weighted average to estimate position
12.6.2 Challenges with Fingerprinting
Why Wi-Fi Fingerprinting Degrades Over Time
Environmental changes: Moved furniture, added walls, relocated APs alter propagation patterns
Temporal variations: Different occupancy levels (empty vs. crowded) affect signal absorption at 2.4 GHz
Device variations: Different phone models have different antenna gains and RSSI calibration offsets
Crowd-sourced calibration (users’ movements gradually update the fingerprint database)
Hybrid approaches (combine fingerprinting with dead reckoning from IMU sensors)
Machine learning (automatically detect and adapt to environmental changes using transfer learning)
12.7 Ultra-Wideband (UWB) Positioning
UWB uses extremely short pulses (sub-nanosecond duration) across a wide frequency spectrum (3.1-10.6 GHz per IEEE 802.15.4z), enabling precise time-of-flight measurements that separate direct from reflected signal paths.
Key advantages:
10-30cm accuracy: Far exceeds BLE and Wi-Fi precision
Multipath resistant: Short pulse duration means direct and reflected paths arrive at distinguishable times
Low interference: Ultra-low power spectral density (-41.3 dBm/MHz) avoids interfering with narrowband systems
Applications:
Hospital equipment tracking (room-level and sub-room precision)
Apple AirTags and Samsung SmartTags (precise “find my” direction finding)
Autonomous robot navigation in warehouses
Augmented reality spatial anchoring
Figure 12.4: Diagram showing UWB positioning with anchors at known positions and tag at unknown position.
12.8 Sensor Fusion for Seamless Positioning
Real-world applications often require positioning that works both indoors and outdoors. Sensor fusion combines multiple positioning technologies to provide seamless coverage, dynamically weighting each source by its current reliability.
techData = {const data = {"BLE Beacons": {accuracy:"1-3 m",cost:"$2,000-$25,000",power:"Very Low (2-3 yr battery)",setup:"Deploy beacons every 5-10m",best:"Retail, museum, hospital asset tracking",pros: ["Low cost per beacon ($5-15)","Long battery life (coin cell)","Works with existing smartphones","Easy to scale (add more tags)"],cons: ["RSSI affected by body absorption","Multipath degrades accuracy","Requires beacon deployment","2.4 GHz interference possible"],color:"#16A085" },"Wi-Fi Fingerprinting": {accuracy:"3-5 m",cost:"$0-$45,000 (survey labor)",power:"Medium (device Wi-Fi)",setup:"Use existing APs, survey building",best:"Mall navigation, campus wayfinding, office occupancy",pros: ["Zero infrastructure cost (existing APs)","No tags needed (smartphones)","Good zone-level accuracy","Familiar technology"],cons: ["Requires labor-intensive survey","Degrades over time (3-6 month re-survey)","Device-dependent RSSI calibration","Sensitive to environmental changes"],color:"#3498DB" },"UWB": {accuracy:"10-30 cm",cost:"$30,000-$100,000+",power:"Medium (1-2 yr battery)",setup:"Deploy UWB anchors with precise calibration",best:"Manufacturing, autonomous robots, AR, precision asset tracking",pros: ["Centimeter-level accuracy","Multipath resistant (short pulses)","Low interference with other systems","Real-time tracking"],cons: ["High infrastructure cost ($150/anchor)","Shorter battery life than BLE","Requires anchor calibration","Limited consumer device support"],color:"#E67E22" },"Ultrasonic": {accuracy:"1-3 cm",cost:"$50,000-$200,000+",power:"High (wired or frequent charging)",setup:"Deploy ceiling-mounted transducers",best:"Laboratory automation, clean rooms, precision robotics",pros: ["Best accuracy available (<3 cm)","Not affected by RF interference","Contained propagation (room-level)","Simple time-of-flight physics"],cons: ["Requires line-of-sight","Affected by temperature/humidity","Very high cost","Limited range (10-15m typical)"],color:"#9B59B6" },"Camera/Vision": {accuracy:"Variable (cm to m)",cost:"$20,000-$150,000+",power:"High (compute-intensive)",setup:"Deploy cameras with compute backend",best:"Retail analytics, AR, robotics (SLAM)",pros: ["Rich contextual data (not just position)","Can identify objects/people","Adaptable with ML updates","Supports SLAM for robots"],cons: ["Privacy concerns (video surveillance)","High compute requirements","Affected by lighting conditions","Occlusion issues in crowds"],color:"#E74C3C" } };return data[selectedTech];}html`<div style="background: var(--bs-light, #f8f9fa); border-radius: 8px; padding: 16px; margin: 8px 0; color: var(--bs-body-color); border-left: 5px solid ${techData.color};"> <h4 style="margin: 0 0 12px 0; color: ${techData.color};">${selectedTech}</h4> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;"> <div style="padding: 8px; background: var(--bs-body-bg); border-radius: 4px;"> <strong>Accuracy:</strong> ${techData.accuracy} </div> <div style="padding: 8px; background: var(--bs-body-bg); border-radius: 4px;"> <strong>Cost:</strong> ${techData.cost} </div> <div style="padding: 8px; background: var(--bs-body-bg); border-radius: 4px;"> <strong>Power:</strong> ${techData.power} </div> <div style="padding: 8px; background: var(--bs-body-bg); border-radius: 4px;"> <strong>Setup:</strong> ${techData.setup} </div> </div> <div style="padding: 8px; background: var(--bs-body-bg); border-radius: 4px; margin-bottom: 12px;"> <strong>Best for:</strong> ${techData.best} </div> <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;"> <div> <strong style="color: #16A085;">Advantages:</strong> <ul style="margin: 4px 0; padding-left: 20px; font-size: 0.9em;">${techData.pros.map(p =>html`<li>${p}</li>`)} </ul> </div> <div> <strong style="color: #E74C3C;">Limitations:</strong> <ul style="margin: 4px 0; padding-left: 20px; font-size: 0.9em;">${techData.cons.map(c =>html`<li>${c}</li>`)} </ul> </div> </div></div>`
12.9 Worked Example: Sensor Fusion for Seamless Indoor-Outdoor Positioning
Scenario: A delivery driver app must track location seamlessly as the driver moves from outdoor parking (GPS) to indoor warehouse (Wi-Fi/BLE) for package pickup.
Given:
Outdoor GPS position: (37.7749 N, -122.4194 W) with HDOP = 1.2, accuracy = 4.8 meters
GPS signal lost upon entering building (< 4 satellites visible)
Indoor Wi-Fi fingerprint match: Warehouse Zone B, confidence 78%
BLE beacon proximity: Beacon “Dock-3” at -62 dBm (estimated 1.5m distance)
IMU dead reckoning: 12.3 meters walked at heading 045 degrees since GPS loss
Building floor plan constraint: Driver must be in accessible walkway
Steps:
Detect GPS degradation:
Satellite count drops from 8 to 3 over 5 seconds
HDOP increases from 1.2 to 6.5 (poor geometry)
Trigger: Switch to indoor positioning mode when satellites < 4 AND HDOP > 4
Initialize indoor position from last GPS fix:
Last valid GPS: (37.7749, -122.4194) at building entrance
Transform to local building coordinates: (0, 0) meters at entrance door
Fuse dead reckoning with Wi-Fi fingerprint:
IMU estimate: (8.7, 8.7) meters from entrance (12.3m at 45 degrees)
Wi-Fi fingerprint center: (10.0, 12.0) meters (Zone B centroid)
Beacon Dock-3 located at (8.5, 10.0) meters on building plan
Proximity constraint: Driver within 1.5m of Dock-3
Updated position: (8.8, 9.9) meters
Apply map constraints:
Check position against floor plan geometry
Position (8.8, 9.9) is in a valid walkway – no correction needed
If position were inside a wall or shelf, snap to nearest valid location on the walkway graph
Result: Driver position estimated at (8.8, 9.9) meters from building entrance with 2.1 meter accuracy. This corresponds to “Loading Dock 3” in the warehouse system, enabling automatic package assignment.
Key Insight: Sensor fusion requires careful weighting based on each source’s current reliability. GPS provides absolute position outdoors but fails indoors. IMU provides relative movement but drifts over time (1-3% of distance traveled). Wi-Fi fingerprinting gives zone-level position but requires a pre-surveyed database. BLE beacons provide proximity anchoring. The Kalman filter dynamically adjusts weights as sensor reliability changes, enabling sub-3-meter positioning across the indoor-outdoor transition.
Figure 12.5: Diagram showing how multiple positioning sources are combined through Kalman filter fusion.
12.10 Knowledge Check
Quiz: Indoor Positioning
12.11 Common Pitfalls
Common Mistake: Wi-Fi Fingerprinting Without Maintenance Budget
The Mistake: An office building deploys Wi-Fi fingerprinting for occupancy tracking. Engineering performs the initial survey (walks the entire building recording RSSI values). The system launches with 3-5m accuracy. Six months later, accuracy degrades to 10-15m. Users complain the system is “broken.”
Why Fingerprinting Degrades:
Office layout changed: Moved cubicle partitions, added or removed furniture (alters RF propagation)
New APs added: IT added 3 access points for capacity (changed the RSSI landscape)
Different occupancy: Initial survey during empty weekend, but system used during full occupancy (people absorb 2.4 GHz signals)
BLE beacons in conference rooms (high accuracy zones where precision matters)
Wi-Fi fingerprinting in open areas (adequate for zone detection)
BLE anchors provide calibration checkpoints (system auto-detects when Wi-Fi fingerprint drifts beyond threshold)
Lesson: Wi-Fi fingerprinting requires ongoing maintenance (re-survey every 3-6 months) or continuous calibration (crowdsourced ground truth). Budget for both setup AND maintenance, or choose a deploy-and-forget technology (BLE/UWB).
12.12 Technology Selection Guide
Worked Example: Hospital Equipment Tracking with UWB vs. BLE
Scenario: A 500-bed hospital needs to track 2,000 pieces of medical equipment (wheelchairs, IV pumps, portable monitors) to reduce time staff spend searching and prevent loss and theft.
Requirements:
Accuracy: Room-level (identify which specific patient room equipment is in)
Update rate: Real-time (locate equipment within 10 seconds of query)
Coverage: 3 floors, 120,000 sq ft
Battery life: 2+ years on coin cell (equipment moves constantly)
Power vs. Update Rate: Frequent positioning updates drain batteries faster (BLE at 2-3 years vs. UWB at 1-2 years)
Sensor Fusion Principles:
Combine multiple technologies for seamless indoor-outdoor coverage
Weight sources by reliability (GPS high outdoors, low indoors; IMU high initially, drifts over time)
Use Kalman filters to smooth transitions and handle sensor failures gracefully
Apply map constraints to prevent impossible positions (inside walls or restricted areas)
Key Takeaway
Indoor positioning requires fundamentally different technologies from outdoor GPS because satellite signals cannot penetrate buildings. The choice between BLE beacons (cheap, 1-3m), Wi-Fi fingerprinting (free infrastructure, 3-5m), and UWB (expensive, 10-30cm) depends on accuracy requirements, budget, and existing infrastructure. The most robust real-world systems use sensor fusion, combining multiple technologies through Kalman filters to smooth transitions and handle individual sensor failures. No single positioning technology works everywhere – seamless location awareness requires intelligent fusion of multiple sources weighted by their current reliability.
For Kids: Meet the Sensor Squad!
Indoor positioning is like finding your way in a building without any windows to see the sky!
12.13.1 The Sensor Squad Adventure: The Indoor Treasure Hunt
The Sensor Squad was running a treasure hunt inside a huge shopping mall. But there was a problem – GPS did not work indoors!
“My GPS says I am OUTSIDE!” cried Lila the LED, standing right in the middle of the food court. “The satellite signals can not get through the roof!”
“Do not worry!” said Sammy the Sensor. “We have INDOOR tools!”
Tool 1: Bluetooth Beacons (The Lighthouse Method)
Max the Microcontroller placed tiny Bluetooth beacons around the mall. Each one continuously shouted: “I am at the food court!” or “I am at the shoe store!” When Lila’s phone heard a beacon, it knew she was nearby.
“But how CLOSE am I?” asked Lila.
“The beacon’s signal gets WEAKER the farther you walk,” explained Sammy. “If I measure the signal strength from THREE beacons, I can figure out exactly where you are – just like GPS uses three satellites!”
Tool 2: Wi-Fi Fingerprinting (The Memory Method)
Bella the Battery had walked through every corridor last week, recording what Wi-Fi signals looked like at each spot. “At the pet store, I can see Wi-Fi networks ‘MallGuest’ at -60, ‘StoreWifi’ at -45, and ‘CoffeeShop’ at -72. This PATTERN is unique to the pet store!”
Now when someone’s phone sees that same Wi-Fi pattern, the system says “You must be near the pet store!” It is like recognizing a song by its melody!
Tool 3: UWB (The Stopwatch Method)
For the FINAL treasure (hidden on a specific shelf), they needed ultra-precise tracking. UWB sent super-quick pulses and measured the EXACT time they took to travel to the tag and back. “10 centimeters accuracy!” cheered Max. “I can tell which SHELF the treasure is on!”
The Grand Fusion
“The best part,” said Sammy, “is we can use ALL of these together! Wi-Fi gives us the general area, Bluetooth narrows it to the right store, and UWB pinpoints the exact spot. It is like using a map, then a compass, then a magnifying glass!”
12.13.2 Key Words for Kids
Word
What It Means
BLE Beacon
A tiny device that broadcasts “I am here!” using Bluetooth – like a small indoor lighthouse
Wi-Fi Fingerprint
The unique pattern of Wi-Fi signals at each location, like a musical chord that sounds different everywhere
UWB
Ultra-Wideband – sends super-fast pulses to measure distance within centimeters
Sensor Fusion
Combining multiple tools together for the best answer (like asking three friends instead of one)
Concept Relationships
Indoor Positioning Technologies connect to:
BLE Beacons - Low-power proximity detection for room-level positioning
UWB Technology - Precision ranging for centimeter-level indoor tracking