Analytics & ML · Study deck

Particle Filters for Localization

Picture a powered wheelchair in a care home where two nearby halls produce similar beacon readings.

Data Dora is your guide for this deck.

datafusionparticle
Data Dora, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: That progression advances the chapter's narrative: particle filters earn their cost when ambiguity or non-linearity matters, and their claim remains reviewable only with model, likelihood, particle-count, and degeneracy evidence.
  • Explain: Continuing the resampling-trigger example above, the cumulative weights are 0.62, 0.80, 0.90, 0.96, and 1.00 for particles P0 through P4.
  • Explain: If the belief can be multimodal, sharply bounded by maps, or driven by nonlinear likelihoods, particles preserve evidence that a single mean can hide.
  • Explain: This matters when an IoT state is nonlinear, constrained, or non-Gaussian.
iotclass.org

Major section

Start With the Story

One dot on a map may jump through a wall, while two possible paths still fit the evidence.

  • A smooth moving dot is not proof of a sound estimate.
  • This opening does not claim that this method is always best.
  • Practitioner decides when several possible states matter.
iotclass.org

Major section

Particle Filters Track States

A particle filter is a sequential Monte Carlo estimator.

  • Instead of forcing the state belief into one Gaussian mean and covariance, it carries many particles.
  • This matters when an IoT state is nonlinear, constrained, or non-Gaussian.
  • A person may be equally likely to be near two corridors until a new BLE beacon reading arrives.

Key terms

If one compact Gaussian
If one compact Gaussian is honest enough, a Kalman-style estimator is usually cheaper.
Particle filters keep multiple weighted location hypotheses alive, then repeat prediction, sensor weighting, and resampling as fresh evidence arrives.
Particle filters keep multiple weighted location hypotheses alive, then repeat prediction, sensor weighting, and resampling as fresh evidence arrives.
iotclass.org

Major section

Particle Filters Track States (continued)

A robot cannot pass through a wall even if the motion model says the straight-line path is short.

  • A noisy radio fingerprint can create several plausible positions instead of one symmetric uncertainty ellipse.
  • If one compact Gaussian is honest enough, a Kalman-style estimator is usually cheaper.
  • Too few particles lose smaller but valid modes.
iotclass.org

Major section

Particle Filters Track States (continued)

Wi-Fi, BLE, UWB, and floor-plan constraints can create several possible positions.

  • If the belief can be multimodal, sharply bounded by maps, or driven by nonlinear likelihoods, particles preserve evidence that a single mean can hide.
  • The cloud of particles, not one dot, is the state belief.
  • Wrong motion noise can make the filter overconfident.
iotclass.org

Major section

Particle Filters Track States (continued)

That progression advances the chapter's narrative: particle filters earn their cost when ambiguity or non-linearity matters, and their claim remains reviewable only with model, likelihood, particle-count, and degeneracy evidence.

  • Weight A relative score based on how likely the latest measurement is if that particle were the true state.
  • Resampling A step that copies high-weight particles and removes low-weight particles so compute stays focused.
  • Latency and battery budget can limit update rate.
iotclass.org

Major section

Predict, Weight, Resample

The common bootstrap particle filter has four operating steps.

  • Resample when the particle set has collapsed too far onto a few hypotheses.
  • The likelihood model is the engineering contract.
  • For a range sensor it may be a Gaussian error model around distance.
  • For BLE localization it may compare observed RSSI against a fingerprint map.

Numbers to remember

12.0 mThe 12.0 m particle is not impossible
iotclass.org

Major section

Predict, Weight, Resample (continued)

For a map-aware robot it may assign near-zero likelihood to poses that imply the robot crossed a wall.

  • A shoe-mounted pedestrian dead-reckoning system shows why that map-aware weighting matters in practice.
  • The 12.0 m particle is not impossible, but it contributes little evidence.
  • Particle impoverishment removes diversity and hides alternate modes.
iotclass.org

Major section

Degeneracy and Compute Limits

A particle filter usually fails in one of two ways.

  • Degeneracy happens when nearly all probability mass sits on a few particles, so most compute is wasted.
  • Particle impoverishment happens after repeated resampling when the surviving particles become too similar, so the filter stops representing uncertainty.
  • Both problems are operational, not just mathematical.
Particle-filter predict and correct sequence showing a weighted pose cloud spreading under motion noise and reweighting near an absolute anchor.
Particle-filter predict and correct sequence showing a weighted pose cloud spreading under motion noise and reweighting near an absolute anchor.
iotclass.org

Major section

Degeneracy and Compute Limits (continued)

If all particles have equal weight, ESS is close to the particle count.

  • Many systems resample only when ESS falls below a threshold, then inject process noise so the population can keep exploring plausible states.
  • example threshold: 0.5 * N = 2.5 decision: ESS is below threshold, so resample.
  • Without noise, the copied particles can become identical and the filter may not recover when the next measurement contradicts them.
iotclass.org

Major section

Degeneracy and Compute Limits (continued)

Continuing the resampling-trigger example above, the cumulative weights are 0.62, 0.80, 0.90, 0.96, and 1.00 for particles P0 through P4.

  • A bootstrap filter uses the motion model; stronger proposals can use the latest measurement too.
  • Latency Budget Particle count, likelihood cost, and update rate must fit the edge gateway, robot, or phone that runs the filter.
  • Many particles become copies and the filter cannot recover after a turn or missed beacon.
iotclass.org

Major section

Degeneracy and Compute Limits (continued)

Particle count or likelihood calculation is too expensive for the device.

  • The UI shows one precise location while logs still support several modes.
  • The P2 = 0.42 label is a changed probability, not a teleported pose, so proposal coverage still bounds what the filter can recover.
  • Random u maps three example draws to particles, and Copy and re-noise explains why high-weight hypotheses multiply without becoming identical forever.
iotclass.org

Deck summary

Key takeaways

One dot on a map may jump through a wall, while two possible paths still fit the evidence.

  • A particle filter is a sequential Monte Carlo estimator.
  • A robot cannot pass through a wall even if the motion model says the straight-line path is short.
  • Wi-Fi, BLE, UWB, and floor-plan constraints can create several possible positions.
  • That progression advances the chapter's narrative: particle filters earn their cost when ambiguity or non-linearity matters, and their claim remains reviewable only with model, likelihood, particle-count, and degeneracy evidence.
iotclass.org

Retrieval practice

Recall check 1 of 3

Data Dora says: answer from memory, then check your reasoning.

Q1Why might an indoor localization system use a particle filter instead of publishing only a Kalman-filter mean?

ABecause representing locations as particles reduces computation by replacing matrix operations with simple position updates.
BBecause the device may have several plausible locations and map constraints can make the uncertainty non-Gaussian.
CBecause Kalman filters cannot use sensor measurements, while particles are the only filters that update from beacons.
DBecause loading the map lets the filter select the particle nearest a valid corridor as the confirmed position.
Show answer

Answer: B Particle filters are useful when the state belief may be multimodal, constrained, or nonlinear.

iotclass.org

Retrieval practice

Recall check 2 of 3

Data Dora says: answer from memory, then check your reasoning.

Q2In the worked example, why does the 10.2 m particle receive the largest normalized weight?

AIt has the smallest measurement error, so its likelihood is highest before normalization.
BIts central position in the particle set makes it the most representative estimate.
CIt has the largest position value.
DIt has the most copies after resampling, so its normalized weight is largest.
Show answer

Answer: A Particle weights come from the likelihood of the measurement under each particle hypothesis.

iotclass.org

Retrieval practice

Recall check 3 of 3

Data Dora says: answer from memory, then check your reasoning.

Q3What does a low effective sample size indicate in a particle filter?

AMost of the probability mass is concentrated in a small number of particles
BAll particles have equal weight and the filter is maximally diverse.
CThe sensor measurement has been ignored permanently.
DThe filter has become a Kalman filter.
Show answer

Answer: A ESS estimates how many particles are meaningfully contributing to the weighted belief.

iotclass.org

Print reference

Answers

Answer key.

  1. B · Particle filters are useful when the state belief may be multimodal, constrained, or nonlinear.
  2. A · Particle weights come from the likelihood of the measurement under each particle hypothesis.
  3. A · ESS estimates how many particles are meaningfully contributing to the weighted belief.
iotclass.org