Skip to main content

m16 · Magnetic localization: field generators, sensor coils, pose solvers

Warning

Education only. Not for diagnosis, treatment or any clinical decision.

In 60 seconds

Magnetic localization drives a few coils of known position and orientation, usually under the patient, and reads the voltages they induce in tiny sensor coils in the catheter. Each generator coil is a magnetic dipole, whose field falls as \(1/r^3\); a sensor coil reads the component of that field along its own axis, as a voltage proportional to frequency, turns and area. Collecting readings from several generator coils gives a nonlinear system for the sensor’s position and direction, solved by least squares. The precision follows from the Jacobian: \(\sigma^2(J^\top J)^{-1}\). Because the field falls as the cube, a fixed noise level becomes a position error that grows at least as \(r^4\) far from the generator. One coil cannot sense rotation about its own axis, so it gives five degrees of freedom; two coils give six. Conductors near the field carry eddy currents that add a field the solver does not model, which biases the result.

From the field

  • Magnetic localization put electrograms on the anatomy. An early system used magnetic technology to find a catheter’s location and orientation while recording its electrogram. In vitro its mean location error was 0.42 mm, and in vivo 0.73 mm (Gepstein et al. 1997).
  • Three-axis fields are enough for a full pose. Generating and sensing quasi-static magnetic dipole fields along three axes gives enough information for both the sensor’s position and its orientation (Raab et al. 1979).
  • Distortion is the main practical limit. A review of electromagnetic tracking in medicine lists the main error sources, validation protocols and compensation methods (Franz et al. 2014).

Derivations

Symbols used throughout. \(\mathbf m\) magnetic dipole moment; \(\mathbf r\) displacement from the dipole, \(r\) its length, \(\hat{\mathbf r}\) its direction; \(\mathbf B\) magnetic field; \(\mu_0\) vacuum permeability; \(f\) frequency; \(N\) turns; \(A\) coil area; \(\hat{\mathbf n}\) sensor axis; \(\mathbf p\) sensor position; \(\mathbf s_k\), \(\mathbf m_k\) generator coil positions and moments; \(V_k\) readings; \(\theta\) pose parameters; \(J\) Jacobian of readings with respect to \(\theta\); \(\sigma\) reading noise SD; \(\mathbf q\) position of a conductor; \(\alpha\) its induced moment per unit field.

The dipole field

A coil small compared with the distance to it acts as a magnetic dipole:

\[ \mathbf B(\mathbf r) = \frac{\mu_0}{4\pi}\,\frac{3(\mathbf m\cdot\hat{\mathbf r})\hat{\mathbf r} - \mathbf m}{r^3} \tag{1}\]

It is the gradient of a scalar potential, so it is free of divergence and curl away from the coil. On the axis it is twice as strong as at the same distance in the equatorial plane, and both fall as the cube of distance (lab part A). \(\mu_0\) is from CODATA (Tiesinga et al. 2021).

The sensor coil

A sensor coil of \(N\) turns and area \(A\) in a field oscillating at frequency \(f\) links the flux \(NA\,\hat{\mathbf n}\cdot \mathbf B\), and Faraday’s law gives a voltage of amplitude:

\[ V = 2\pi f\,N A\,\hat{\mathbf n}\cdot\mathbf B \tag{2}\]

So the reading is proportional to frequency and to coil size. Driving each generator coil at its own frequency, or in its own time slot, separates their contributions.

From readings to pose

With generator coils \(k\) at \(\mathbf s_k\) with moments \(\mathbf m_k\), a single sensor coil reads, up to a known gain:

\[ V_k = \hat{\mathbf n}\cdot\mathbf B_k(\mathbf p - \mathbf s_k), \qquad \hat\theta = \arg\min_\theta \sum_k \bigl(V_k^{\text{measured}} - V_k(\theta)\bigr)^2, \quad \theta = (\mathbf p, \hat{\mathbf n}) \tag{3}\]

The model is nonlinear in position and linear in the axis. With nine readings (three coil trios) and five unknowns, a Levenberg–Marquardt solver recovers the pose exactly from noise-free readings (lab part B). Raab and colleagues linearized a three-axis version of this coupling to track small changes in pose (Raab et al. 1979).

Precision

For small Gaussian noise, the estimate’s covariance follows from the Jacobian, and on a dipole’s axis a field error maps directly to a range error:

\[ \operatorname{cov}(\hat\theta) \approx \sigma^2\,(J^\top J)^{-1} \tag{4}\]

\[ \lvert\mathbf B\rvert = \frac{2m}{r^3} \;\Longrightarrow\; \delta r = \frac{r\,\delta B}{3\lvert\mathbf B\rvert} \propto r^4\,\delta B \tag{5}\]

In the lab, 500 noisy solves give an RMS position error within 1% of the prediction. Above an illustrative generator, the predicted error grows from slope 1.5 near the coils to slope 4.7 at 600 mm on log axes: far away, the coils also look closer together, so lateral information fades faster than the range (lab part C). Far from the generator, doubling the distance costs a factor of 16 or more in precision.

Exact

Assumptions

  • Model: nine dipole coils (three trios on a 150-mm circle), a single-coil sensor, Equation 3, and the linearized covariance Equation 4 with independent noise. Tested against epml.magnetic.
  • Parameters: the layout, noise level and sensor tilt are illustrative choices.
  • What it ignores: coil size (not true dipoles near the generator), conductors, cross-talk between channels, motion and the solver’s convergence.

Key takeaways

  • The pose comes from nonlinear least squares; its precision comes from the Jacobian.
  • Precision falls steeply with distance from the generator.

Five and six degrees of freedom

Rotating a single coil about its own axis does not change \(\hat{\mathbf n}\), so no reading changes:

\[ V_k\bigl(R_{\hat{\mathbf n}}(\psi)\,\hat{\mathbf n}\bigr) = V_k(\hat{\mathbf n}) \;\Longrightarrow\; \operatorname{rank} \frac{\partial \mathbf V}{\partial(\mathbf p, \boldsymbol\omega)} = 5 \tag{6}\]

Here \(\boldsymbol\omega\) is a small three-parameter rotation. A single coil gives position and direction, five degrees of freedom. Two coils at an angle on the same rigid body make the Jacobian full rank, six (lab part D).

Distortion

A conductor near the field carries eddy currents that make a secondary field. For a small object at \(\mathbf q\), model it as an induced dipole for each generator coil:

\[ \mathbf m_{q,k} = \alpha\,\mathbf B_k(\mathbf q), \qquad V_k = \hat{\mathbf n}\cdot\bigl[\mathbf B_k(\mathbf p) + \mathbf B(\mathbf m_{q,k};\, \mathbf p - \mathbf q)\bigr], \qquad \delta\theta \approx (J^\top J)^{-1}J^\top\,\delta\mathbf V \tag{7}\]

The solver does not model the secondary field, so the pose is biased. The bias matches a full nonlinear solve to within 1% in the lab, and falls steeply as the conductor moves away: from 0.32 mm to 0.003 mm as an illustrative conductor moves from 50 to 250 mm above the sensor (lab part E). Real eddy currents also lag in phase; methods to detect and compensate distortion are reviewed by Franz and colleagues (Franz et al. 2014).

Approximate model

Assumptions

  • Model: an induced point dipole with a real coefficient, Equation 7, and the first-order bias formula, which ignores terms of second order in the distortion. Tested against epml.magnetic.
  • Parameters: the conductor’s strength and position, the generator layout and the sensor pose are illustrative.
  • What it ignores: the phase of eddy currents, large or extended conductors, and the conductor’s effect on the generator coils themselves.

Key takeaways

  • One coil gives five degrees of freedom; two give six.
  • Unmodeled fields become position bias, not noise.

Clinical correlate

NotePending clinical review

This section describes published findings only. It is not guidance for patient care, and it has not yet been reviewed by an EP physician.

Where this shows up in EP. Magnetic localization lets a mapping system place each electrogram on the anatomy without fluoroscopy; an early system used it to reconstruct a chamber’s geometry and activation from sampled sites (Gepstein et al. 1997). Its accuracy depends on where the heart lies relative to the field generator (Equation 5) and on conductors near the field, such as other equipment (Equation 7) (Franz et al. 2014). Magnetic sensors are also the anchor that hybrid systems use to correct current-based localization (m17, m18).

What the evidence is. An in vitro and animal validation study (Gepstein et al. 1997), the classic tracking paper (Raab et al. 1979) and a review of electromagnetic tracking (Franz et al. 2014).

What a reader should ask:

  • Where was the accuracy measured relative to the generator? (Equation 5)
  • Were conductors present, and was distortion detected? (Equation 7)
  • How many degrees of freedom does the sensor provide? (Equation 6)

Visual summary

Schematic

field generator coils sensor coil least squares → pose conductor secondary field: bias
Figure 1: Generator coils, a sensor coil, the least-squares solver, and a conductor’s secondary field.

Assumptions

How experts think

When judging a magnetic localization result, ask:

  1. How far was the sensor from the generator? Precision falls at least as \(r^4\) far from it (Equation 5).
  2. How many independent readings, for how many unknowns? (Equation 3)
  3. Five or six degrees of freedom? (Equation 6)
  4. What metal was nearby, and would the system notice? (Equation 7)
  5. Is the error noise or bias? Repeating a measurement shrinks only one of them (Equation 4).

One sentence to keep: a magnetic tracker is a nonlinear least-squares fit to dipole fields; distance and metal set its error.

Cheat sheet

Quantity Result
Dipole field (Equation 1) \((\mu_0/4\pi)(3(\mathbf m\cdot\hat{\mathbf r})\hat{\mathbf r} - \mathbf m)/r^3\)
Coil voltage (Equation 2) \(2\pi f N A\,\hat{\mathbf n}\cdot\mathbf B\)
Readings (Equation 3) \(V_k = \hat{\mathbf n}\cdot\mathbf B_k(\mathbf p - \mathbf s_k)\); least squares for \((\mathbf p, \hat{\mathbf n})\)
Precision (Equation 4) \(\sigma^2(J^\top J)^{-1}\)
Range sensitivity (Equation 5) \(\delta r = r\,\delta B/(3\lvert B\rvert) \propto r^4\)
Degrees of freedom (Equation 6) one coil 5; two coils 6
Distortion bias (Equation 7) \(\delta\theta \approx (J^\top J)^{-1}J^\top\delta\mathbf V\)

Values used in this module

Value Source
Mean location error 0.42 mm in vitro, 0.73 mm in vivo Gepstein et al. (1997)
\(\mu_0\) Tiesinga et al. (2021)
Generator layout, noise levels, conductor strength and position illustrative
Precision curves, slopes, biases our own code

Interview questions

Try each question before you open its model answer. In a real interview, say which assumptions you are making.

Q1. Why can a small generator coil be treated as a dipole?

Model answer

Far compared with its size, the field of a current loop reduces to the dipole term (Equation 1); near the coil, higher-order terms matter.

Q2. How does a sensor coil’s voltage depend on frequency and size?

Model answer

Proportionally to frequency, turns and area: \(2\pi f N A B_n\) (Equation 2).

Q3. How do you separate the fields of several generator coils?

Model answer

Drive each at its own frequency or in its own time slot, and demodulate (Equation 2).

Q4. Set up the pose estimation problem.

Model answer

Readings \(V_k = \hat{\mathbf n}\cdot\mathbf B_k(\mathbf p - \mathbf s_k)\); minimize the squared residuals over position and direction with a nonlinear solver (Equation 3).

Q5. How would you predict the precision without running trials?

Model answer

From the Jacobian: \(\sigma^2(J^\top J)^{-1}\) (Equation 4).

Q6. Why does precision fall so fast with distance?

Model answer

The field falls as \(1/r^3\), so a fixed noise is a growing fraction of it, and \(\delta r = r\,\delta B/(3B)\) gives \(r^4\) (Equation 5); laterally it is worse, as the coils look closer together.

Q7. Why does a single sensor coil give only five degrees of freedom?

Model answer

Rotating it about its own axis changes no reading (Equation 6).

Q8. How would you get six?

Model answer

Add a second coil at an angle on the same rigid body (Equation 6).

Q9. A steel instrument is brought near. What happens to the reported position?

Model answer

Eddy currents add a secondary field that the solver does not model, so the position is biased; the first-order bias is \((J^\top J)^{-1}J^\top\delta\mathbf V\) (Equation 7) (Franz et al. 2014).

Q10. How could a system detect distortion?

Model answer

Large residuals after the fit, redundant readings that disagree, or a phase shift in readings from lagging eddy currents (Equation 3, Equation 7) (Franz et al. 2014).

Q11. What did the early in vitro and in vivo validation report?

Model answer

Mean location errors of 0.42 mm in vitro and 0.73 mm in vivo (Gepstein et al. 1997).

Q12. Is a repeated, consistent position error noise or bias? How do you tell?

Model answer

Bias: averaging does not shrink it. Compare with an independent reference, or move suspected conductors (Equation 4, Equation 7).

Code lab

The lab builds a small magnetic tracker.

Part What you do Data
A The dipole field and the coil voltage (Equation 1, Equation 2) synthetic
B Solving for the pose (Equation 3, Equation 4) synthetic
C Precision against distance (Equation 5) synthetic
D Five degrees of freedom, and six (Equation 6) synthetic
E Distortion from a nearby conductor (Equation 7) synthetic

Each part ends with checks: lines that pass with the code as given. If you change something and a check fails, that is information, not an error to hide.

Self-check

Short checks you can do in your head. Open each answer after you have tried it.

S1. Distance from a dipole doubles. Field?

Answer

One eighth (Equation 1).

S2. Field on the axis against the equatorial plane, same distance?

Answer

Twice as strong (Equation 1).

S3. Drive frequency doubles. Sensor voltage?

Answer

Doubles (Equation 2).

S4. A 1% field error on a dipole’s axis at 200 mm. Range error?

Answer

\(200 \times 0.01/3 \approx\) 0.67 mm (Equation 5).

S5. Distance doubles at fixed noise. Axial range error?

Answer

16 times larger (Equation 5).

S6. Unknowns for a single-coil sensor, and the minimum number of readings?

Answer

Five; at least five independent readings (Equation 3, Equation 6).

Literature figures

These figures are worth looking at alongside this module. We link to them instead of copying them: some licenses do not allow reuse here, and others we could not confirm. Each entry says what to look for and where this module explains it.

  • An early electroanatomic system. Gepstein and colleagues’ accuracy results for magnetic catheter localization (Gepstein et al. 1997). This module: precision.
  • Tracking from three-axis fields. Raab and colleagues’ source and sensor coil geometry (Raab et al. 1979). This module: from readings to pose.
  • Error sources and compensation. Franz and colleagues’ review of electromagnetic tracking (Franz et al. 2014). This module: distortion.

Further reading

  • Principles. Three-axis magnetic tracking (Raab et al. 1979); a review for medicine (Franz et al. 2014).
  • Mapping. Magnetic electroanatomic mapping and its accuracy (Gepstein et al. 1997).
  • Related modules. m07 (inverse problems), m17 (impedance localization), m18 (hybrid localization), m19 (motion and drift), m21 (image integration).

References

Franz, Alfred M, Tamás Haidegger, Wolfgang Birkfellner, Kevin Cleary, Terry M Peters, and Lena Maier-Hein. 2014. “Electromagnetic Tracking in Medicine–a Review of Technology, Validation, and Applications.” IEEE Transactions on Medical Imaging 33 (8): 1702–25. https://doi.org/10.1109/TMI.2014.2321777.
Gepstein, L, G Hayam, and S A Ben-Haim. 1997. “A Novel Method for Nonfluoroscopic Catheter-Based Electroanatomical Mapping of the Heart. In Vitro and in Vivo Accuracy Results.” Circulation 95 (6): 1611–22. https://doi.org/10.1161/01.cir.95.6.1611.
Raab, Frederick H, Ernest B Blood, Terry O Steiner, and Herbert R Jones. 1979. “Magnetic Position and Orientation Tracking System.” IEEE Transactions on Aerospace and Electronic Systems AES-15 (5): 709–18. https://doi.org/10.1109/TAES.1979.308860.
Tiesinga, Eite, Peter J. Mohr, David B. Newell, and Barry N. Taylor. 2021. “CODATA Recommended Values of the Fundamental Physical Constants: 2018.” Reviews of Modern Physics 93 (2): 025010. https://doi.org/10.1103/RevModPhys.93.025010.