APC Module 3
APC Module 3
Module 3
22-02-2026 1
Source: [Link]
22-02-2026 2
Location Awareness in Pervasive Computing
• The ability of a computing system to determine and use the geographical
position of a user or device.
• The system knows where you are, and uses that information to provide
better services.
22-02-2026 3
Network-Centric Localization
• In network-centric approaches, the responsibility of estimating the
user or device location lies with the network infrastructure rather than
the mobile device.
22-02-2026 4
Network-Centric Localization
22-02-2026 5
Network-Centric Localization: Cell of Origin (COO)
• Advantages:
• Simple and low-cost
• No additional hardware required
• Works with basic mobile phones
• Limitations:
• Very poor accuracy
• Not suitable for precise applications
• Depends heavily on cell size
22-02-2026 6
Network-Centric Localization: Angle of Arrival (AOA)
• The intersection of angles from two or more stations gives the estimated position.
• Each base station measures an angle θ with respect to a reference axis. If two
stations measure angles θ₁ and θ₂, the intersection of the two rays determines
the location of the user.
22-02-2026 7
Angle of Arrival (AOA): Formulation
22-02-2026 8
Angle of Arrival (AOA): Example
Given:
• B₁(0, 0), θ₁ = 45°
• B₂(10, 0), θ₂ = 135°
Equation 1: y = x Equation 2: y = −x + 10
Solution
• x=5
• y=5
Estimated user location = (5, 5)
Limitations:
• Requires complex directional antennas
• Sensitive to signal reflection and noise
• Accuracy reduces in urban environments
22-02-2026 9
Angle of Arrival (AOA): Example
Given:
• B₁(0, 0), θ₁ = 45°
• B₂(10, 0), θ₂ = 135°
Equation 1: y = x Equation 2: y = −x + 10
Solution
• x=5
• y=5
Estimated user location = (5, 5)
Limitations:
• Requires complex directional antennas
• Sensitive to signal reflection and noise
• Accuracy reduces in urban environments
22-02-2026 10
Angle of Arrival (AOA): Example
Given:
• B₁(0, 0), θ₁ = 45°
• B₂(10, 0), θ₂ = 135°
Equation 1: y = x Equation 2: y = −x + 10
Solution
• x=5
• y=5
Estimated user location = (5, 5)
Limitations:
• Requires complex directional antennas
• Sensitive to signal reflection and noise
• Accuracy reduces in urban environments
22-02-2026 11
Time-Based Localization
• In pervasive computing, devices are no longer fixed to a single place. Mobile phones, wearable
sensors, smart tags, and IoT nodes continuously move through environments such as homes,
hospitals, campuses, malls, and cities. For these systems to behave “intelligently,” they must know
where the device is, often in real time.
• Traditional localization techniques like GPS fail indoors due to signal blockage. Signal-strength-
based methods (RSSI) are inexpensive but unreliable because signal strength fluctuates due to
walls, people, and interference. This leads us to time-based localization techniques, which rely
on the fundamental principle that signals travel at a known speed.
• Time-based methods measure how long a signal takes to travel or how arrival times differ across
receivers. Because time can be measured extremely precisely using modern hardware, these
methods are widely used in pervasive and ubiquitous computing systems.
22-02-2026 12
Time-Based Localization
Both aim to estimate distance using time measurements, but they differ
fundamentally in how time is measured and how synchronization is handled.
22-02-2026 13
Time of Arrival (TOA): Fundamental
22-02-2026 14
Time of Arrival (TOA): Fundamental
• TOA (Time of Arrival) measures the time taken by a signal to travel from a transmitter to a
receiver.
• Since we know signal speed (≈ speed of light for radio signals) and time taken, we can
compute distance.
• Core idea
Distance = Speed × Time
So, if a signal takes t seconds to arrive:
𝑑 =𝑐×𝑡
Where, 𝑑= distance,
𝑐= speed of light ≈ 3 × 108 m/s,
𝑡= time of arrival
22-02-2026 15
Time of Arrival (TOA): Work Flow
• In a real pervasive computing environment, TOA does not rely on a single receiver.
Instead, multiple reference nodes (base stations or anchors) are deployed at known
locations.
• Each distance defines a circle centered at a base station. The mobile device lies
somewhere on that circle. With three base stations, the intersection of three circles gives
the unique 2D position of the device. This method is called trilateration.
22-02-2026 16
Time of Arrival (TOA): Work Flow
22-02-2026 17
Time of Arrival (TOA): How it works
Step-by-step:
• A mobile device sends a signal
• Multiple reference nodes (base stations) receive it
• Each base station records arrival time
• Distance to each base station is calculated
• Device position is computed using trilateration
• Why trilateration?
1 distance → circle
2 distances → 2 intersection points
3 distances → unique 2D location
22-02-2026 18
Time of Arrival (TOA): Mathematical Formulation
Assume:
• Mobile node at unknown position 𝑥 𝑦
• Three base stations at known locations
𝑥1 𝑦1 , 𝑥2 𝑦2 , 𝑥3 𝑦3
• Distances computed from TOA: If the measured arrival times are 𝑡1 , 𝑡2 , 𝑡3 ,then distances
are: 𝑑𝑖 = 𝑐 ⋅ 𝑡𝑖
• Equations: ൬𝑥 − 𝑥1 )2 + ቀ𝑦 − 𝑦1 )2 = 𝑑12
൬𝑥 − 𝑥2 )2 + ቀ𝑦 − 𝑦2 )2 = 𝑑22
൬𝑥 − 𝑥3 )2 + ቀ𝑦 − 𝑦3 )2 = 𝑑32
22-02-2026 19
Time of Arrival (TOA): Example
Given:
• Signal speed 𝑐 = 3 × 108 m/s
• Measured arrival time 𝑡 = 0.000002seconds
Distance:
𝑑 = 𝑐 × 𝑡 = 3 × 108 × 2 × 10−6 = 600 m
The node is 600 meters away from that base station.
22-02-2026 20
Time of Arrival (TOA): Clock Synchronization
• For example:
• 1 nanosecond error → 0.3 meters error
• 10 nanoseconds error → 3 meters error
• In large pervasive systems with hundreds of low-cost IoT devices, maintaining such
synchronization is extremely difficult and expensive.
• This limitation motivates the need for alternative techniques, leading us to EOTD.
22-02-2026 21
Time of Arrival (TOA): Clock Synchronization
Problem:
• Perfect synchronization is hard in real networks
• Especially in low-cost IoT devices
• This is a major limitation of TOA.
22-02-2026 22
Time of Arrival (TOA): Advantages and Limitations
Advantages
• High accuracy
• Simple physical interpretation
• Works well in open environments
Limitations
• Requires tight clock synchronization
• Multipath and NLOS errors
• Expensive hardware
22-02-2026 23
Enhanced Observed Time Difference: Fundamental
• The network compares when the same signal arrives at different base
stations and computes time differences.
22-02-2026 24
Enhanced Observed Time Difference
• The difference in arrival times of the same signal at two different base
stations.
Instead of:
When did the signal arrive?
We ask:
How much earlier did it reach station A than station B?
22-02-2026 25
Enhanced Observed Time Difference: Work Flow
In EOTD:
• A mobile device transmits a signal.
• Two or more base stations receive the signal.
• Each base station records the arrival time.
• The network computes the difference between arrival times.
If:
arrival at BS1 = 𝑡1 , arrival at BS2 = 𝑡2
Then:
Δ𝑡 = 𝑡2 − 𝑡1
This time difference corresponds to a difference in distance from the two base stations.
Δ𝑑 = 𝑐 ⋅ Δ𝑡
22-02-2026 26
Enhanced Observed Time Difference: Hyperbolic
Localization
Unlike TOA, EOTD does not produce circles.
Instead:
• All points having the same distance difference from two fixed points lie on
a hyperbola.
So:
• One time difference → one hyperbola
• Multiple time differences → intersection of hyperbolas → device location
22-02-2026 27
Enhanced Observed Time Difference: Geometry
With:
• 2 base stations → 1 hyperbola
• 3 base stations → intersection of hyperbolas → location
22-02-2026 28
E-OTD: Mathematical Model
Let:
• Base stations at 𝑥1 𝑦1 and 𝑥2 𝑦2
• Mobile node at 𝑥 𝑦
• Distance difference:
൬𝑥 − 𝑥1 )2 + ቀ𝑦 − 𝑦1 )2 − ൬𝑥 − 𝑥2 )2 + ቀ𝑦 − 𝑦2 )2 = 𝑐 ⋅ 𝛥𝑡
• Multiple such equations are solved to find 𝑥, 𝑦.
Assume:
𝛥𝑡 = 1 microsecond
𝛥𝑑 = 3 × 108 × 10−6 = 300 meters
This means the device is 300 meters closer to one base station than the other.
22-02-2026 29
E-OTD: “Enhanced” in EOTD
• network-assisted measurements
• compensation for hardware delays
• calibration using reference data
• improved timestamp accuracy
22-02-2026 30
E-OTD: Advantages and Limitations
Advantages
• No strict clock synchronization needed at mobile
• Suitable for cellular and pervasive systems
• Lower hardware cost
Limitations
• Complex math (hyperbolas)
• Sensitive to multipath
• Needs multiple base stations
22-02-2026 31
Handset-Centric Approach
22-02-2026 32
Handset-Centric Approach
Examples:
• Smartphones
• GPS navigation devices
• Smart watches
• Vehicle navigation systems
• The most widely used handset-centric technique is GPS.
22-02-2026 33
Handset-Centric Approach: GPS
22-02-2026 34
GPS: Key Components
22-02-2026 35
22-02-2026 36
GPS: Architecture
GPS consists of three segments:
22-02-2026 37
GPS: Working
Step-by-step explanation:
• Each satellite sends a signal containing:
• Satellite position
• Transmission time
• GPS receiver notes the reception time
• Time difference gives signal travel time
• Distance to satellite is calculated
• Location is computed using distances from multiple satellites
22-02-2026 38
GPS: Distance Calculation
Let:
𝑡𝑠 =signal transmission time
𝑡𝑟 =signal reception time
𝑐= speed of light = 3 × 108 𝑚/𝑠
Distance to satellite:
𝑑 = 𝑐 × 𝑡𝑟 − 𝑡𝑠
Each satellite defines a sphere with radius 𝑑 .
22-02-2026 39
GPS: Why minimum 4 Satellites?
Using satellites:
• 1 satellite → infinite positions
• 2 satellites → circle of positions
• 3 satellites → two possible positions
• 4 satellites → exact position + clock error correction
22-02-2026 40
GPS: Estimation Equation
For four satellites: Example:
• ቆ𝑥 − 𝑥1 )2 + ൬𝑦 − 𝑦1 )2 + ቀ𝑧 − 𝑧1 )2 = 𝑑12
If signal delay = 0.07 seconds:
𝑑 = 3 × 108 × 0.07 = 21,000 𝑘𝑚
• ቆ𝑥 − 𝑥2 )2 + ൬𝑦 − 𝑦2 )2 + ቀ𝑧 − 𝑧2 )2 = 𝑑22 This matches the approximate satellite orbit
distance
• ቆ𝑥 − 𝑥3 )2 + ൬𝑦 − 𝑦3 )2 + ቀ𝑧 − 𝑧3 )2 = 𝑑32
• ቆ𝑥 − 𝑥4 )2 + ൬𝑦 − 𝑦4 )2 + ቀ𝑧 − 𝑧4 )2 = 𝑑42
Solving gives:
• User position (x, y, z)
• Clock offset
22-02-2026 41
GPS: Algorithm
Input:
• Satellite signals, Satellite positions, Transmission timestamps
Steps:
• Receive signals from at least 4 satellites
• Compute signal travel time
• Convert time to distance
• Form distance equations
• Solve for receiver position and clock bias
Output:
• Latitude, Longitude, Altitude, Time correction
22-02-2026 42
Mathematical Formulation of GPS Algorithm
• GPS is based on time-of-flight measurement.
• A GPS receiver computes its position by measuring the travel time of signals sent by
satellites.
• Distance Measurement Equation
Let:
• 𝑡𝑠 =signal transmission time (from satellite)
• 𝑡𝑟 =signal reception time (at receiver)
• 𝑐= speed of light = 3 × 108 m/s
22-02-2026 43
Position Equation for One Satellite
Let:
• Satellite 𝑖 be at position 𝑥𝑖 𝑦𝑖 𝑧𝑖
• Receiver position be 𝑥 𝑦 𝑧
• Then the geometric distance is:
ቆ𝑥 − 𝑥𝑖 )2 + ൬𝑦 − 𝑦𝑖 )2 + ቀ𝑧 − 𝑧𝑖 )2
𝜌𝑖 = ቆ𝑥 − 𝑥𝑖 )2 + ൬𝑦 − 𝑦𝑖 )2 + ቀ𝑧 − 𝑧𝑖 )2 + 𝑐 𝑏
22-02-2026 44
Position Equation for One Satellite: Why +cb?
Since the receiver clock is not perfectly synchronized with satellite clocks, the measured
time is wrong and time error becomes distance error.
22-02-2026 45
Position Equation for One Satellite: Why +cb?
22-02-2026 46
Position Equation for One Satellite: Why +cb?
𝜌 = 𝑐 𝑡𝑟 − 𝑡𝑠 + 𝑐𝑏
Now:
𝑐 𝑡𝑟 − 𝑡𝑠 =true geometric distance
𝑐𝑏= extra distance due to clock error
That is why the distance equation becomes
𝜌 = true distance + 𝑐𝑏
22-02-2026 47
Position Equation for One Satellite: Why +cb?
Because:
• If the receiver clock is ahead, it thinks the signal arrived later
• Later arrival time → larger time delay
• Larger delay → larger distance
• Hence the measured distance increases.
So the bias term appears as + c b.
22-02-2026 48
Position Equation for One Satellite : Why +cb?
Say:
• Receiver clock error 𝑏 = 1𝜇𝑠
This means:
• A tiny timing error → huge distance error
• That’s why clock bias cannot be ignored
22-02-2026 49
System of GPS Equations (Four Satellites)
To solve for: 𝑥, 𝑦, 𝑧(position), 𝑏(receiver clock bias). We need four satellites.
𝜌1 = ቆ𝑥 − 𝑥1 )2 + ൬𝑦 − 𝑦1 )2 + ቀ𝑧 − 𝑧1 )2 + 𝑐 𝑏
𝜌2 = ቆ𝑥 − 𝑥2 )2 + ൬𝑦 − 𝑦2 )2 + ቀ𝑧 − 𝑧2 )2 + 𝑐 𝑏
𝜌3 = ቆ𝑥 − 𝑥3 )2 + ൬𝑦 − 𝑦3 )2 + ቀ𝑧 − 𝑧3 )2 + 𝑐
𝜌4 = ቆ𝑥 − 𝑥4 )2 + ൬𝑦 − 𝑦4 )2 + ቀ𝑧 − 𝑧4 )2 + 𝑐 𝑏
22-02-2026 50
System of GPS Equations (Four Satellites)
Unknowns: 𝑥, 𝑦, 𝑧, 𝑏
Equations: 4 equations (from 4 satellites)
Hence:
Number of equations = Number of unknowns.
So the system can be solved.
22-02-2026 51
Final Output
After solving the equations, the GPS receiver obtains:
• Receiver position 𝑥 𝑦 𝑧
• Receiver clock bias 𝑏
• These are converted into:
• Latitude
• Longitude
• Altitude
22-02-2026 52
GPS: Limitation
GPS accuracy is affected by:
• Atmospheric delay
• Satellite clock errors
• Multipath propagation
• Signal blockage (buildings, indoors)
Typical accuracy:
• 5–10 meters (civilian GPS)
22-02-2026 54
Differential-GPS
22-02-2026Source:[Link] 55
Differential-GPS
• DGPS enhances GPS accuracy, reducing positioning errors from several
meters.
• The GPS receiver then receives these corrections. This allows it to refine
its position.
22-02-2026 56
DGPS Architecture (System View)
DGPS consists of three main components:
1. Reference Station
• Fixed at a known, surveyed location
• Receives GPS satellite signals
• Computes GPS position using the same GPS algorithm
• Compares GPS-computed position with true position
2. Correction Generator
• Computes error values in pseudorange or position
• Formats correction messages
3. DGPS Users (Rovers)
• Normal GPS receivers
• Receive correction data
• Apply corrections to GPS measurements
22-02-2026 57
Differential GPS: Mathematical Insight
Let:
• Actual distance = 𝑑𝑎𝑐𝑡𝑢𝑎𝑙
• GPS-measured distance = 𝑑𝑔𝑝𝑠
Error:
Δ𝑑 = 𝑑𝑎𝑐𝑡𝑢𝑎𝑙 − 𝑑𝑔𝑝𝑠
Corrected distance:
𝑑𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑒𝑑 = 𝑑𝑔𝑝𝑠 + Δ𝑑
Differential GPS: Working Principle
Differential GPS is an enhancement of GPS that improves accuracy by using a reference
station at a known location. The following are the basic work flow:
Receivers apply:
• Same correction values
• In real time or post-processing
22-02-2026 60
Mathematical Formulation
Step 1: Pseudorange at Reference Station
Measured pseudorange:
Where:
𝜖𝑖 =total GPS error
22-02-2026 61
Mathematical Formulation
Step 2: True Geometric Distance
Since the reference station position is known:
These corrected pseudoranges are then used in the same GPS positioning equations
22-02-2026 63
Types of DGPS
• Wide Area Augmentation System (WAAS): A satellite-based system that
provides DGPS corrections over a wide area.
22-02-2026 64
Hybrid Localization Techniques
22-02-2026 65
Hybrid Localization Technique
Hybrid localization is the integration of multiple positioning technologies to improve
accuracy, robustness, and coverage across indoor and outdoor environments.
We have seen:
• GPS → Works well outdoors
• Wi-Fi → Works indoors
• Cellular → Rough fallback
• Sensors → Short-term motion tracking
But:
• No single system works everywhere.
Therefore, modern devices use Hybrid Localization.
22-02-2026 66
Hybrid Localization Technique
• A hybrid localization approach in pervasive computing using GPS and Cell ID combines
the high accuracy of satellite-based positioning with the continuous, low-power availability
of cellular network signals to create a seamless tracking system.
• It is designed to overcome the limitations of each system alone, providing consistent
location data across both indoor and outdoor environments.
22-02-2026 67
Hybrid Localization Technique
Problems with Standalone GPS
• Signal blockage indoors
• High power consumption
• Cold start delay (TTFF - Time to First Fix)
• Multipath errors in cities
22-02-2026 68
Hybrid Localization Technique: Concept
1. Context-Aware Switching: A central unit or local algorithm (like a Kalman filter) detects
whether GPS is available. If GPS signal is lost (e.g., inside a building), it automatically falls
back to Cell ID.
2. Assisted GPS (A-GPS): The system often uses the cellular network to provide initial, quick
location fixes to the GPS receiver, reducing the "time-to-first-fix" (TTFF) and saving battery
life.
3. Data Fusion: Advanced algorithms (e.g., Kalman filters, machine learning) can combine
the data from both sources to create a, "best-estimate" location, using more weight on GPS
when outdoors, and more on cell towers when indoors.
22-02-2026 69
Hybrid Localization Technique: GPS
• GPS is based on: GPS Accuracy
Distance = 𝑐 𝑡𝑟 − 𝑡𝑠 •Civilian GPS: 5-10
Where: 𝑐= speed of light, 𝑡𝑠 =transmission time𝑡𝑟 =reception time m
•DGPS: 1-3 m
•A-GPS: Faster
• GPS Positioning Equation acquisition
For satellite 𝑖:
𝜌𝑖 = ቆ𝑥 − 𝑥𝑖 )2 + ൬𝑦 − 𝑦𝑖 )2 + ቀ𝑧 − 𝑧𝑖 )2 + 𝑐𝑏
22-02-2026 70
Hybrid Localization Technique: GPS
Source: [Link]
22-02-2026 [Link] 71
Hybrid Localization Technique: Cell ID
• Each mobile device connects to a Base Transceiver Station (BTS).
The network knows:
• Which cell tower you are connected to
• Which sector of the tower
Thus: User Location ≈ Location of serving cell
22-02-2026 72
Hybrid Localization Technique: Cell ID
22-02-2026 73
Hybrid Localization Technique
22-02-2026 74
Hybrid Localization Technique: Theories
• Complementarity Theory: Each technology compensates for the other's weaknesses.
• Context-Aware Adaptation Theory: Hybrid systems are not static. They adapt based on
Environment (indoor/outdoor), Signal quality, Battery level, User movement speed.
22-02-2026 75
Hybrid Localization: Theoretical Model
Suppose we have multiple location estimates:
𝐿𝐺𝑃𝑆
𝐿𝑊𝑖𝐹𝑖
𝐿𝐶𝑒𝑙𝑙
𝐿𝐼𝑀𝑈
Each gives an estimated position:
𝐿𝑖 = 𝑥𝑖 𝑦𝑖
But each has different uncertainty.
• Hybrid localization can be formally defined as:
𝐿 = 𝑓 𝐿𝐺𝑃𝑆 𝐿𝑊𝑖𝐹𝑖 𝐿𝐶𝑒𝑙𝑙 𝐿𝐼𝑀𝑈
where:
𝐿 =estimated location
𝑓 ⋅ =sensor fusion function
• Hybrid localization is fundamentally a state estimation problem.
22-02-2026 76
Hybrid Localization: Switching Model
The System switches between GPS mode and Cell ID mode based on predefined
conditions.
• If indoors → use Cell ID
• If outdoors → use GPS
If:
GPS Signal Strength > Threshold
Use GPS
Else Theoretical Issue
Use Cell ID •Abrupt transitions
•Accuracy inconsistency
•Boundary detection errors
22-02-2026 77
Hybrid Localization: Weighted Fusion Model
One common mathematical approach:
𝐿𝑓𝑖𝑛𝑎𝑙 = 𝑤𝑖 𝐿𝑖
Where:
• 𝑤𝑖 =weight based on confidence
• σ 𝑤𝑖 = 1
Example:
𝐿𝑓𝑖𝑛𝑎𝑙 = 𝑤1 𝐿𝐺𝑃𝑆 + 𝑤2 𝐿𝑊𝑖𝐹𝑖
If GPS signal is weak:
• 𝑤𝐺𝑃𝑆 small
• 𝑤𝑊𝑖𝐹𝑖 large
22-02-2026 78
Hybrid Localization: Weighted Fusion Model
Weights depend on:
• Signal quality
• HDOP (Horizontal Dilution of Precision)
• RSS level
• Example
If:
GPS confidence = 0.8
Cell ID confidence = 0.2
= 0.8PGPS + 0.2PCell
P
22-02-2026 79
Hybrid Localization: Weighted Fusion Model
Suppose:
GPS position = (100, 200) m
Cell position = (130, 240) m
Confidence:
𝑤𝐺𝑃𝑆 = 0.7
𝑤𝐶𝑒𝑙𝑙 = 0.3
22-02-2026 80
Hybrid Localization: Variance-Based Weighting
• If:
𝜎𝑖2 =variance of estimate
22-02-2026 81
Hybrid Localization: Kalman Filter Fusion
State vector: This is commonly used in:
𝑥 •Google Location Services
𝑦 •Autonomous vehicles
𝑋𝑘 = 𝑣 •Smart city systems
𝑥
𝑣𝑦
Prediction:
𝑋𝑘 = 𝐴𝑋𝑘−1 + 𝑤𝑘
Measurement:
𝑥𝐺𝑃𝑆
𝑍𝑘 = 𝑦
𝐺𝑃𝑆
Update combines both GPS and Cell measurements.
22-02-2026 82
Hybrid Localization: Error Analysis
GPS Errors Cell ID Errors
•Ionospheric delay •Large coverage area
•Multipath •Tower handoff delays
•Receiver clock bias •Signal reflection
•Satellite geometry (GDOP)
If:
2
𝐺𝑃𝑆 𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝜎𝐺𝑃𝑆 = 25
2
𝐶𝑒𝑙𝑙 𝑉𝑎𝑟𝑖𝑎𝑛𝑐𝑒 𝜎𝐶𝑒𝑙𝑙 = 900
Fused variance:
−1
2 1 1
𝜎𝐻𝑦𝑏𝑟𝑖𝑑 = 2
𝜎𝐺𝑃𝑆
+ 𝜎2 = 23.6
𝐶𝑒𝑙𝑙
22-02-2026 84
Hybrid Localization
Advantages of Hybrid Localization
• Robust indoors & outdoors
• Reduced GPS dropout issues
• Higher accuracy
• Better user experience
22-02-2026 85
Indoor Localization Techniques
22-02-2026 86
Wi-Fi Based Localization: 802.11
IEEE 802.11 is the foundational IEEE set of standards for wireless local area network
(WLAN) computer communication, commonly branded as Wi-Fi.
22-02-2026 88
802.11: Proximity-Based Localization
Concept: The user is located near the strongest Access Point.
If:
• AP1 gives strongest signal → user is near AP1.
Advantages:
• Very simple
• No complex computation
Disadvantages:
• Very low accuracy
• Works only at coarse level
• Accuracy: 5-20 meters
22-02-2026 89
802.11: Lateration (Distance-based Method)
This method estimates distance using signal strength.
Step 1: Convert RSSI to Distance
We use Log-Distance Path Loss Model
𝑑
𝑃𝑟 𝑑 = 𝑃𝑟 𝑑0 − 10𝑛𝑙𝑜𝑔10
𝑑0
Where:
𝑃𝑟 𝑑 =Received power at distance d
𝑃𝑟 𝑑0 =Power at reference distance
𝑛= Path loss exponent (204 indoors), 𝑑= Distance
Rearranged:
𝑃𝑟 𝑑0 −𝑃𝑟 𝑑
𝑑= 𝑑0 × 10 10𝑛
22-02-2026 90
802.11: Lateration (Distance-based Method)
Step 2: Trilateration
If we know distances from 3 Access Points:
Let:
AP1 at (x1, y1), AP2 at (x2, y2), AP3 at (x3, y3)
Distance equations:
൬𝑥 − 𝑥1 )2 + ቀ𝑦 − 𝑦1 )2 = 𝑑12
൬𝑥 − 𝑥2 )2 + ቀ𝑦 − 𝑦2 )2 = 𝑑22
൬𝑥 − 𝑥3 )2 + ቀ𝑦 − 𝑦3 )2 = 𝑑32
Solve simultaneous equations to get (x, y)
22-02-2026 91
802.11: Challenges with RSSI-based Distance
• Indoor environment causes:
• Multipath fading
• Reflection from walls
• Human blockage
• Furniture obstruction
• So distance estimation is noisy.
• Accuracy: 3-10 meters (depends on environment)
22-02-2026 92
802.11: Fingerprinting
This is the most widely used method.
Phase 1: Offline Training Phase
We divide building into grid points.
At each grid location:
• Measure RSSI from all APs
• Store as vector
Example:
Location L1 → [-55, -62, -70]
Location L2 → [-50, -60, -75]
Location L3 → [-65, -58, -72]
Create database.
22-02-2026 93
802.11: Fingerprinting
Phase 2: Online Localization
• User measures current RSSI:
• Example: [-52, -61, -74]
• We compare with database using:
• Euclidean Distance
• KNN
• Machine Learning
22-02-2026 94
802.11: Fingerprinting (Mathematical Formulation)
Euclidean Matching
Let:
𝑅𝑆𝑆𝐼𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑑 = 𝑟1 𝑟2 𝑟3
Database point:
𝑅𝑆𝑆𝐼𝑑𝑏 = 𝑟1′ 𝑟2′ 𝑟3′
Distance:
𝑁
𝐷= ( 𝑟𝑖 − 𝑟𝑖′ )2
𝑖=1
22-02-2026 95
802.11: Fingerprinting (Mathematical Formulation)
KNN-based Localization
• Steps:
1. Compute distance to all database points
2. Select k nearest points
3. Average their coordinates
𝑘
1
𝑥 𝑦 = ( 𝑥𝑖 𝑦𝑖
𝑘
𝑖=1
22-02-2026 96
802.11: Fingerprinting
22-02-2026 97
802.11: Fingerprinting (Mathematical Formulation)
KNN-based Localization
• Steps:
1. Compute distance to all database points
2. Select k nearest points
3. Average their coordinates
𝑘
1
𝑥 𝑦 = ( 𝑥𝑖 𝑦𝑖
𝑘
𝑖=1
22-02-2026 98
Wi-Fi Based Localization: RSSI-Based Distance
Estimation
Received Signal Strength Indicator (RSSI)
Received Signal Strength Indicator
22-02-2026 99
Wi-Fi Based Localization: Trilateration using Wi-
Fi
Using distances from three access points:
2 2
൬𝑥 − 𝑥1 ) + ቀ𝑦 − 𝑦1 ) = 𝑑12
൬𝑥 − 𝑥2 )2 + ቀ𝑦 − 𝑦2 )2 = 𝑑22
2 2
൬𝑥 − 𝑥3 ) + ቀ𝑦 − 𝑦3 ) = 𝑑32
Similar to GPS.
22-02-2026 100
Wi-Fi Fingerprinting
Phase 1: Offline (Training Phase)
At known positions:
Collect RSSI vector:
𝑅 = 𝑟1 𝑟2 𝑟3 . . . 𝑟𝑛
Store in database.
22-02-2026 101
Wi-Fi Fingerprinting
k-Nearest Neighbor (kNN) in Fingerprinting
Algorithm:
𝑘
1
𝐿𝑒𝑠𝑡 = 𝐿𝑖
𝑘
𝑖=1
22-02-2026 102
Bluetooth-Based Localization
Uses:
• BLE beacons
• Short range signals
Distance estimation similar to RSSI model.
More stable than Wi-Fi in small areas.
22-02-2026 103
Sensor-Based Localization (Dead Reckoning)
Dead Reckoning Concept
Position updated using:
𝑥𝑛𝑒𝑤 = 𝑥𝑜𝑙𝑑 + 𝑑 cos 𝜃
𝑦𝑛𝑒𝑤 = 𝑦𝑜𝑙𝑑 + 𝑑 sin 𝜃
Where:
𝑑= step length, 𝜃= heading angle
Used with:
• Accelerometer
• Gyroscope
22-02-2026 104