Skip to content

Magnetometers see the field of the spacecraft's own torquers - #237

Closed
patrickmckeen wants to merge 1 commit into
feat/magnetometer-field-model-errorfrom
feat/magnetometer-torquer-coupling
Closed

patrickmckeen wants to merge 1 commit into
feat/magnetometer-field-model-errorfrom
feat/magnetometer-torquer-coupling

Conversation

@patrickmckeen

Copy link
Copy Markdown
Collaborator

The problem

On a small spacecraft the largest magnetometer error is often not the sensor or the field model but the spacecraft itself: the magnetorquers produce a field at the magnetometer, directly and through whatever soft iron lies between, that can be far larger than the sensor's noise. Until now a simulated magnetometer saw only the ambient field, so the magnetometer-while-torquing problem that drives real layouts and duty cycles could not be studied.

What this adds

MagnetorquerCoupling(K): one 3x3 matrix, tesla per A m², from the total torquer dipole moment in the body frame to the field at the magnetometer. The coupling is linear in the moment and fixed by the layout, so one matrix captures the geometry and the soft-iron paths together; a bare dipole at distance r gives about 1e-7 / r³ times the usual (3 r̂ r̂ᵀ − I), and a measured matrix is the thing to use when there is one.

  • Each magnetorquer now remembers the moment it last applied, last_moment (A m², with bias, noise and saturation included), set whenever its torque is evaluated.
  • A magnetometer takes a coupling as torquer_coupling. The satellite connects it to its torquers when it is built, and the magnetometer then reads the ambient field plus K · Σ mᵢ âᵢ over the torquers. The term does not depend on the state, so the Jacobians are unchanged.
  • The moment used is the one the torquers applied over the previous step, so no duty cycling is modelled: a magnetometer read while the torquers are on sees them, which is the case this exists to show.
  • The estimator's clone of the satellite drops the coupling. A filter that knows its coupling could subtract it from the known command; that is a possible follow-up and not part of this change.

This stacks on #236.

Tests

testing/test_sensors/test_magnetorquer_coupling.py, 5 tests: a torquer records the moment it applied, with bias and saturation; a three-axis magnetometer set reads the ambient field alone before any command and ambient plus K · m after one, with the satellite having attached its torquers; a satellite without a coupling is unchanged; the estimator's clone has no coupling and the Jacobians are identical to the nominal device's; and the validation. The full suite passes.

🤖 Generated with Claude Code

…rquers

MagnetorquerCoupling is one 3x3 matrix (tesla per A m^2) from the total
torquer dipole moment to the field at a magnetometer, geometry and soft
iron together. Each magnetorquer remembers the moment it last applied; the
satellite connects a magnetometer's coupling to its torquers when it is
built; the magnetometer reads the ambient field plus the torquers' field.
The term is state independent, so the Jacobians are unchanged, and the
estimator's clone of the satellite has no coupling.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Results

1 589 tests   1 587 ✅  1m 53s ⏱️
    1 suites      2 💤
    1 files        0 ❌

Results for commit dc2ab24.

@patrickmckeen

Copy link
Copy Markdown
Collaborator Author

Closing: the torquer-coupling model is not ready, the real coupling has soft-iron effects a single matrix on the commanded moment does not capture well. The branch stays for later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant