Sensor: Magnetometer
Description
The goal of this module is to provide a baseline three-axis magnetometer (TAM) model for the measurement of magnetic fields in the sensor frame \(S\). The magnetometer will function in a magnetic field created by a planet, such as the Earth’s magnetosphere, and will detect the local magnetic vector in the sensor frame.
Example Use Cases
- Determine the magnetic field of the Earth at different locations when orbiting around the body.
- Use magnetorquers to dampen reaction wheel torquers by applying a magnetic force against the measured magnetic field by the sensor to correct for attitude error.
Module Implementation
The spacecraft’s location relative to the planet frame \(P\) is required and the vector \(\vec{r}_{PB}\) defines the vector between the planet and the body:
where \(N\) is the inertial frame. Let \([PN]\) be the direction cosine matrix (DCM) that relates the rotating planet-fixed frame relative to the inertial frame \(N\). The simulation provides the spacecraft’s position vector in the inertial frame components and can be written in the planet-fixed frame as:
The truth of the magnetometer measurements in the sensor frame is directly read from the true value on the spacecraft’s magnetic field message. This is calculated by the magnetosphere environment model and is considered to be the ‘true’ value in the inertial frame \(N\). Then, given that \([SN]\) is the DCM from \(N\) to \(S\) and \(\space^N{{B}}\) is the magnetic field vector in the inertial frame, then:
The magnetic field vector of the magnetic field models is considered to be the truth. Any errors are applied on these values to simulate real instrumentation error. Assuming that \(e_\mathrm{noise}\) is the Gaussian noise, \(e_\mathrm{bias}\) is the bias applied on the field and \(f_\mathrm{scale}\) is the scale factor applied on the measurements for linear scaling, then this can be calculated as:
Realistic sensors can also have a saturation bounds for the measurements. This may prevent the sensor for giving values less or higher than the possible hardware output. These are:
Once these are calculated, the final value can be clamped and the magnetic field vector in the sensor frame \(S\) are outputted.
Assumptions/Limitations
- The sensor model is limited by the magnetic field model used. The readers are referred to the assumptions and limitation documentation of the applied magnetic field models.
- Error models rely on user inputs. These inputs are the most likely source of error in TAM outputs. Instrument bias should be measured experimentally (or based off an educated guess). The Gauss-Markov noise model supplied has well-known assumptions and is generally accepted to be a good model for this application.
- The model does not currently consider the external magnetic field of nearby sources (e.g. bus, instrumentation) and is therefore limited to where cases where this effect is not significant. This can be overcome by using magnetic field models taking into account these effects or by adding additional terms.
References
- Autonomous Vehicle Systems (AVS) Laboratory, 2023