karsttech.com/content/professional-projects/usm-magnetics/index.md

101 lines
5 KiB
Markdown

+++
title = 'USM Magnetics'
date = 2025-02-27T07:17:00-05:00
draft = false
categories = ['references']
tags = ['USM', 'magnetics', 'data science', 'KarstTech', 'UUV']
+++
## Getting Started
Several months ago I was referred to the University of Southern Mississippi [Marine Research Center](https://www.usm.edu/ocean-enterprise/marine-research-center.php) by a coworker. They wanted some assistance from someone with a Physics and Data Science background to work on an autonomous underwater vehicle for the purpose of developing a magnetic sensing platform.
The work sounded interesting, so I joined the team as a contractor. Fast forward several months, and we are making fantastic progress!
The work began with using data acquired from high quality magnetic sensors including from [QUSPIN](https://quspin.com/), and processing the data to detect magnetic objects of interest. This magnetic sensing becomes a very difficult problem due to a combination of factors:
1. Magnetic fields fall off as the cube of the distance from the source (rather than the inverse square law that we all know from electromagnetic fields like light). This makes for a much more challenging problem since the size of the signals we are looking for are TINY compared to the noise in the data once we get to any significant distance from the source.
2. The Earth's magnetic field, while weak compared to some magnets that we use in everyday life, is very strong due to it's very large size and therefore slow falloff compared to small targets.
3. The targets of interest are passive ferromagnetic objects, meaning their field is created by becoming magnetized by the Earth's magnetic field. These induced magnetic fields are very weak compared to the Earth's magnetic field.
4. The sensing platform is moving, and so the vehicle's orientation, and it's vector magnetic sensor readings are changing rapidly. Imbalances in the readings between vector components due to sensor imperfections, and due to the magnetic properties of the vehicle itself make this motion difficult to filter out.
![Test Vehicle](surface-vehicle.png "Test Vehicle")
## Sensor Fusion
Before we can even attempt to detect targets, we need to convert the vehicle reference frame to the Earth's reference frame. This is a non-trivial problem because the vehicle is free to rotate around the z-axis (up/down), can pitch and roll due to surface conditions, and for an underwater vehicle it can move and orient itself in virtually any direction. In addition to the vehicle orientation quickly changing, the Earth's magnetic field is very complex, and varies from location to location on the surface of the Earth.
![Earth's Magnetic Field](earth-geomag.webp "Earth's Magnetic Field (courtesy of [Wikipedia](https://en.wikipedia.org/wiki/Earth%27s_magnetic_field))")
While the Earth's scale magnetic field is complex, many people assume that on the local scale, the magnetic field is constant. This is not the case, and local variations can be large enough to throw off the vehicle's orientation estimate.
![Local Magnetic Field Variations](gulfport-geomag.png "Local Magnetic Field Variations near Gulfport, MS")
{{< mermaid >}}
flowchart TD
subgraph "Input Sensors"
direction TB
GPS["GPS + RTK
(Position Data)
Note: Unavailable when underwater"]:::inputNode
QTFM["QTFM Magnetics
(X, Y, Z Magnetic Field)"]:::inputNode
IMU["Inertial Measurement Unit (IMU)"]:::inputNode
IMU_GYRO["IMU Gyroscope
(Roll, Pitch, Yaw Rates)
Only shows rate of change"]:::inputNode
IMU_ACCEL["IMU Accelerometer
(X, Y, Z Acceleration)
Note: Affected by quick movements"]:::inputNode
IMU_MAG["IMU Magnetometer
(X, Y, Z Magnetic Field)
Note: Affected by nearby magnetic fields"]:::inputNode
end
subgraph "Sensor Fusion Process"
direction TB
SF["Sensor Fusion Algorithm"]:::processingNode
GD["Geomagnetic Declination Correction
Note: Declination varies by location & time"]:::processingNode
OC["Orientation Correction"]:::processingNode
FILTER["Signal Filtering"]:::processingNode
end
subgraph "Output Data"
direction TB
POS["Geographic Position
(Earth Coordinates)"]:::outputNode
ROT["Platform Orientation
(Roll, Pitch, Yaw)"]:::outputNode
MAG_CORR["Orientation Corrected
Magnetic Data"]:::outputNode
TARGET["Target Detection
& Localization"]:::outputNode
end
classDef inputNode fill:#d4f1f9,stroke:#05386B,color:black
classDef processingNode fill:#f9e79f,stroke:#b7950b,color:black
classDef outputNode fill:#c8e6c9,stroke:#2e7d32,color:black
IMU --- IMU_GYRO
IMU --- IMU_ACCEL
IMU --- IMU_MAG
GPS --> SF
QTFM --> SF
IMU_GYRO --> SF
IMU_ACCEL --> SF
IMU_MAG --> SF
SF --> GD
GD --> OC
OC --> FILTER
SF --> POS
SF --> ROT
FILTER --> MAG_CORR
MAG_CORR --> TARGET
{{< /mermaid >}}