· Module 02

UWB 02 | The UWB Positioning Algorithm: Nonlinear Least Squares in Python

Dr. Redmond R. Shamshiri
Assistant Professor of Robotics · University of Southern Denmark (SDU)

Study UWB 02 | The UWB Positioning Algorithm: Nonlinear Least Squares in Python. Use the accompanying model, numerical example and practical task to connect the topic to a measurable engineering result. Notes are original supplemental material, not a transcript.

Lecture video: https://www.youtube.com/watch?v=FRvlZSu8Tnw

Learning Objectives

  • Explain the role of range-based localization in the engineering system.
  • Calculate the worked quantity with consistent units.
  • Design a measurement that can reveal an implementation failure.

Study guide

Original companion notes. These notes support the topic of this lesson. They are not a transcript or a claim about the exact contents, hardware settings or examples in the video.

Lesson focus: UWB 02 | The UWB Positioning Algorithm: Nonlinear Least Squares in Python

Define the input, measured output, units and pass/fail condition before running the experiment.

Range-based localization

Ranges constrain a tag to circles in a two-dimensional model or spheres in three dimensions. Position requires enough independent anchor geometry. A small residual does not guarantee accuracy when measurements share a bias or anchor coordinates are wrong.

Model, units and assumptions

\[\hat p=\arg\min_p\sum_i w_i\left(\lVert p-a_i\rVert-d_i\right)^2\]

p is unknown tag position, ai is anchor position, di is measured range, and wi is a positive weight such as inverse range variance. The 2D model assumes a stated height correction or coplanar geometry.

Worked engineering example

A tag at (3,4) m is 5 m from an anchor at (0,0) m. Moving an anchor by 0.20 m without updating its coordinates creates a systematic model error that averaging cannot remove.

Practical task and evidence

Apply the following procedure to the topic of this lesson: UWB 02 | The UWB Positioning Algorithm: Nonlinear Least Squares in Python.

  • Survey and label anchor coordinates in one frame before collecting ranges.
  • Compare open line-of-sight and deliberately obstructed data at a measured reference point.
  • Plot residual per anchor, position error and update age rather than only the estimated track.

Submit: a diagram or interface table, a short timestamped dataset, the calculation with units, and a paragraph explaining the largest observed limitation.

Check your understanding

Question. What is the ideal range from anchor (1,1) m to tag (4,5) m?

Show worked answer

5 m from the 3–4–5 triangle, assuming the same height or a 2D model.

Extension. Change one assumption in the model and explain which measurement would reveal that it no longer holds.

Summary

Range-based localization: keep units, assumptions and timing explicit. Check the numerical model against an independent observation before using it in a larger system.

UWB Robot Localization: From Ranges to a Live Map · Dr. Redmond R. Shamshiri · University of Southern Denmark (SDU)