Aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization
The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization solves the problems of poor noise adaptability, inaccurate temperature drift compensation, feature redundancy and low model inference efficiency in the existing technology, and achieves high-precision and real-time aeromagnetic detection results.
Patent Information
- Application Number
- CN202610173458.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-15
AI Technical Summary
Existing aeromagnetic compensation technology suffers from poor noise adaptability, inaccurate temperature drift compensation, feature redundancy, low model inference efficiency, and insufficient dynamic adaptability, resulting in insufficient accuracy and adaptability of UAV aeromagnetic detection.
A multi-source error modeling and adaptive closed-loop optimization method is adopted, including multi-dimensional data acquisition and synchronization, Kalman fusion filtering with adaptive noise adjustment, dynamic correction of nonlinear temperature drift model, feature selection with dynamic weight adjustment, magnetic interference-adaptive adaptive residual network modeling, and high-precision quantization and real-time inference optimization, to construct a full-process compensation system.
It significantly improves the noise suppression capability of geomagnetic field measurement, overcomes the nonlinear temperature drift problem in a wide temperature range, improves computational efficiency, enhances the system's adaptability to different maneuvering states and long-term working scenarios, and improves the reliability and interpretation accuracy of aeromagnetic data.
Smart Images

Figure CN122043591A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of aeromagnetic measurement technology, specifically an aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization. Background Technology
[0002] The core of airborne magnetic surveying technology is to capture the spatial distribution and variation characteristics of the geomagnetic field through high-precision magnetic sensors. The accuracy of its measurement directly determines the accuracy of downstream tasks such as geological interpretation and resource location. In UAV aeromagnetic detection systems, geomagnetic field measurement signals are susceptible to coupling effects from multiple interference sources, causing the original measurement data to deviate from the true geomagnetic field value. The essence of this problem stems from the complex interaction between interference sources, sensors, and the measurement environment: On the one hand, the UAV's power system (including the alternating magnetic field generated by the propeller rotation and the electromagnetic radiation during motor operation) generates a strong electromagnetic interference field, the amplitude and frequency of which fluctuate dynamically with the UAV's maneuvering state (such as changes in angular acceleration and rotational speed); on the other hand, core measurement devices (such as three-axis fluxgate magnetometers) themselves have nonlinear temperature drift, zero-point drift, and scale factor errors. Among these, the temperature drift characteristics exhibit significant high-order nonlinearity over a wide temperature range (-20℃~60℃), which traditional linear compensation models cannot effectively cover; at the same time, the data acquisition of multi-source sensors (fluxgate, optical pump, temperature sensor, flight control system) is time-asynchronous, which easily leads to the superposition of errors. Existing compensation methods mostly use fixed parameter filtering and static feature screening, which are difficult to adapt to the dynamic changes of the geomagnetic field and the time-varying characteristics of interference sources.
[0003] The limitations of existing aeromagnetic compensation technology are specifically reflected in the following aspects: First, the noise processing stage uses Kalman filtering with fixed process noise and observation noise parameters. When the local magnetic field is in a magnetic anomaly region or the UAV's maneuvering state changes, the fixed parameters cannot match the dynamic adjustment requirements of noise characteristics, resulting in decreased filtering accuracy or filtering divergence. Second, temperature drift compensation relies on a first-order linear model, ignoring the high-order nonlinear characteristics of the sensor core material's permeability changing with temperature. Under extreme temperature conditions, the compensation error can reach more than 0.1 nT, far exceeding the 0.05 nT error threshold of high-precision aeromagnetic detection. Third, feature selection adopts a static weight strategy, which does not consider the changes in the primary and secondary interference sources under different flight scenarios. It is easy to introduce redundant features, leading to a surge in computational load, which is difficult to meet the real-time requirements of UAV embedded systems. Fourth, the model inference stage lacks targeted quantitative optimization. The storage and computational overhead of the full-precision model is too large, which cannot adapt to the limited computing resources of UAVs. Fifth, there is a lack of closed-loop feedback and online update mechanisms. When the sensor experiences error drift due to aging or the flight scenario changes, the compensation model cannot dynamically adapt, and the accuracy will significantly decrease after long-term use.
[0004] To address the aforementioned technical challenges, it is imperative to construct a comprehensive compensation system based on the fundamental principles of magnetic measurement. This system should encompass multi-source data synchronization, dynamic error suppression, adaptive model optimization, and closed-loop feedback adjustment. By deconstructing the mapping relationships between interference source characteristics, error propagation paths, and compensation mechanism design, precise suppression and real-time compensation of complex errors can be achieved, thereby enhancing the accuracy and adaptability of UAV aeromagnetic surveys. Summary of the Invention
[0005] The purpose of this invention is to provide an aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization, so as to solve the problems of poor noise adaptability, inaccurate temperature drift compensation, feature redundancy, low model inference efficiency and insufficient dynamic adaptability in the existing aeromagnetic compensation methods proposed in the background art.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for aeromagnetic compensation based on multi-source error modeling and adaptive closed-loop optimization includes the following steps: Step S1, Multi-dimensional data acquisition and synchronization: Synchronously acquire the geomagnetic field component signal of the three-axis fluxgate magnetometer, the high-precision reference signal of the optical pump magnetometer, the propeller speed and motor current signal of the UAV power system, and the ambient temperature signal, and perform timestamp matching with a unified time reference to achieve alignment of multi-source sensor data in the time dimension. Step S2, Adaptive noise-adjusted Kalman fusion filtering: Construct an adaptive Kalman filter model with the true value of the geomagnetic field as the state variable. The process noise variance is calculated based on the statistical characteristics of the static geomagnetic field data, and the observation noise variance is adaptively adjusted based on the measurement deviation of the fluxgate and optical pump. The high-precision reference signal of the optical pump is used to participate in multi-source fusion to improve the robustness of the filter. Step S3, Dynamic correction of nonlinear temperature drift model: Establish a nonlinear temperature drift model, incorporate the temperature drift coefficient into the state vector, and use extended Kalman filter (EKF) to estimate the temperature drift coefficient in real time and perform dynamic compensation. Step S4, Feature screening with dynamic weight adjustment: Apply regularization to the multi-dimensional collected data to suppress feature multicollinearity, dynamically adjust the feature weight threshold, and screen the core feature set. The core feature set includes the geomagnetic field direction cosine and its quadratic term, cross term, propeller speed, motor current, ambient temperature and temperature change rate. Step S5, Adaptive Residual Network Modeling for Magnetic Interference: Using the selected core feature set as input, a residual network model is constructed. The residual connection interval is based on the approximate mapping relationship between the UAV's angular acceleration and the rate of change of magnetic interference. The approximate mapping relationship is dynamically optimized through offline calibration and online learning, and the weights of key features are strengthened through an error feedback mechanism. Step S6, High-precision quantization and real-time inference optimization: Quantize the trained network model into a fixed-point format, dynamically adjust the quantization bit width based on the accuracy requirements of each layer of the network, optimize inference efficiency through computing power resource allocation, and output the compensated geomagnetic field value.
[0007] According to the above technical solution, in step S1, the sampling rate of the three-axis fluxgate magnetometer is adaptively set based on the magnetic interference characteristic frequency corresponding to the maximum maneuvering angular acceleration of the UAV, and the sampling rate is not less than twice the characteristic frequency; the propeller speed and motor current are collected through the flight control CAN bus, and the collection frequency is kept as an integer multiple of the fluxgate sampling rate; the ambient temperature signal is collected through the built-in temperature sensor of the fluxgate, and the frequency is dynamically adjusted according to the temperature drift rate.
[0008] According to the above technical solution, in step S2, the process noise variance is calculated using the sliding window method to determine the standard deviation of the static data, with the window size dynamically adjusted based on the geomagnetic field stability; the observation noise variance is adaptively adjusted using a recursive update formula, which is: in, Let k be the estimated variance of the observation noise. This is the estimated variance of the observation noise at time k-1. This is a forgetting factor used to balance the weights of historical estimates and current observations. The absolute value of the instantaneous deviation between the fluxgate magnetometer measurement and the true value signal of the optical pump magnetometer at time k is given. The sensitivity is updated by dynamically optimizing the noise variance through the statistical standard deviation of the deviation using a sliding window, replacing the traditional periodic correction.
[0009] According to the above technical solution, the nonlinear temperature drift model in step S3 is specifically as follows: in, This represents the temperature drift error at temperature T. The reference temperature is used, and a, b, and c are the temperature drift coefficients for the first, second, and third terms, respectively. Higher-order terms are introduced to adapt to the complex nonlinear temperature drift characteristics of the sensor. The EKF state vector is defined as: in, The value of the geomagnetic field at time k is the actual value. The temperature drift coefficient is updated based on the sensor aging rate model and the core temperature change rate threshold trigger.
[0010] According to the above technical solution, in step S4, the regularization parameter is determined by cross-validation combined with noise robustness analysis; the feature weight threshold is adaptively optimized by a dynamic adjustment formula, which is: in This is the moving standard deviation of the feature weight vector calculated based on the most recent N sampling periods, where N is set according to the degree of geomagnetic field fluctuation. The coefficients were determined through a grid search of historical data to adjust the sensitivity of the threshold to the dispersion of feature weights. The initial threshold is determined by analyzing the weight distribution quantiles of core and non-core features in historical flight data. S is the scene classification factor, and the temperature change rate is calculated using the first-order central difference method, as shown in the following formula: in, This represents the sampling interval of the temperature sensor.
[0011] According to the above technical solution, in step S5, the adjustment rule for the residual connection interval is based on the mapping relationship. ,in For residual connection interval, The angular acceleration is that of the UAV; this mapping is an engineering approximation based on calibration data, dynamically fine-tuned through online learning; the calculation formula for the attention mechanism with error feedback is: in, Let i be the attention weight corresponding to the i-th element. The prediction error for the i-th feature is calculated by training the attention parameters and network weights together. This is the absolute value of the error term. This represents the expression for all elements j. Summation, This is the adjustment coefficient.
[0012] According to the above technical solution, in step S6, the quantization adopts a symmetric fixed-point quantization strategy, and the quantization step size is calculated by the following formula: in is the quantization step size, i.e., the floating-point value represented by each quantization interval, and w is the quantization bit width. The maximum absolute value of all input data for the layer to be quantized on the calibration dataset. The redundancy coefficient is used; quantization error compensation is achieved by calculating the compensation offset, which is the average value of the quantization error; the allocation of computing resources is dynamically adjusted based on the proportion of computing power of each layer in real time.
[0013] According to the above technical solution, the compensation method also includes adaptive evaluation and feedback adjustment steps for compensation effect, and constructs a multi-dimensional evaluation index system, including standard deviation, improvement ratio, temperature drift suppression rate and prediction error variance; when any index exceeds the adaptive threshold, it triggers model parameter fine-tuning or local retraining.
[0014] According to the above technical solution, the compensation method also includes an online iterative update step for the model based on incremental learning, regular collection of new flight data, use of knowledge distillation algorithm to avoid forgetting historical knowledge, and dynamic adjustment of training rounds based on scene distribution.
[0015] According to the above technical solution, the compensation method also includes a multi-source error fusion compensation step. The system identifies the zero drift, scale factor error, installation error and electromagnetic interference error of the triaxial fluxgate magnetometer, and constructs a multi-source error fusion model, which is then compensated collaboratively through Kalman filtering, attitude matrix transformation and mapping model.
[0016] Compared with the prior art, the present invention has the following beneficial effects: First, in terms of noise suppression and filtering accuracy, this invention adopts an adaptive fusion filtering and dynamic parameter adjustment strategy, which significantly reduces the noise of geomagnetic field measurement. It can still maintain excellent filtering stability and accuracy in complex flight conditions and magnetic anomaly areas, which has obvious advantages over traditional fixed parameter methods.
[0017] Secondly, addressing the nonlinear temperature drift problem over a wide temperature range, a high-order temperature drift model was established and combined with a dynamic coefficient estimation method, achieving high-precision compensation under extreme temperature conditions. This significantly improved the temperature drift suppression effect and effectively overcame the limitations of traditional linear models in terms of insufficient compensation under drastic temperature changes. Simultaneously, through dynamic feature selection and computational architecture optimization, computational efficiency was significantly improved while maintaining compensation accuracy, meeting the real-time processing requirements of embedded platforms.
[0018] Furthermore, this scheme enhances the system's adaptability to different maneuvering states and long-term operating scenarios through dynamic structural adjustment and incremental learning mechanisms, effectively suppressing performance degradation caused by sensor aging or environmental changes. By constructing a fusion compensation model covering multiple error sources, it achieves full-dimensional suppression of zero-point drift, calibration factor error, installation error, and electromagnetic interference, thereby improving the overall reliability and interpretation accuracy of aeromagnetic data and outperforming traditional compensation methods. Attached Figure Description
[0019] Figure 1 This is a flowchart of the aeromagnetic compensation method of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1 like Figure 1 As shown, the technical solution of this invention is based on the error propagation law of aeromagnetic measurement and the dynamic characteristics of the UAV system, and constructs a phased, fully closed-loop compensation system. The specific implementation process is as follows: Step 1, Multi-dimensional Data Acquisition and Synchronization: Multi-dimensional data acquisition and synchronization are prerequisites for ensuring the effectiveness of subsequent error compensation. The core of this step lies in achieving precise alignment of data from different types of sensors in the time dimension, avoiding the accumulation of errors caused by time asynchrony. This stage first completes the selection and layout of sensors: a three-axis fluxgate magnetometer (measurement range ±70μT, resolution 0.01nT) is used to acquire the XYZ component signals of the geomagnetic field. Its sampling rate is set based on the magnetic interference characteristic frequency corresponding to the maximum maneuvering angular acceleration of the DJI M400 drone (2.62 rad / s²) according to a pre-calibrated mapping relationship. Specifically, through offline experiments, the dominant frequency component of the magnetic interference signal under different angular accelerations is measured, establishing the relationship between angular acceleration and the magnetic interference characteristic frequency F. interfere The correspondence. According to the Nyquist sampling theorem, the sampling rate F... s F must be satisfied s ≥ 2 *F interfere For example, when the angular acceleration is measured to be 2.62 rad / s² through calibration, F... interfere If the frequency is 8Hz, then set F s =16Hz. In actual flight, F is dynamically set based on this mapping relationship obtained from real-time angular acceleration. s .
[0022] A high-precision reference signal of the geomagnetic field is acquired using an optically pumped magnetometer (measurement accuracy 0.0001nT) with a sampling rate of 10Hz for subsequent filtering, fusion, and error evaluation. The propeller speed and motor current of the UAV's power system are acquired via the flight control CAN bus (following the CAN2.0 protocol). The acquisition frequency is kept as an integer multiple of the fluxgate sampling rate (e.g., 32Hz is twice the fluxgate sampling rate) to ensure data timing matching. The ambient temperature signal is acquired through the temperature sensor built into the fluxgate to capture its operating temperature in real time. The acquisition frequency is dynamically adjusted according to the temperature drift rate. When the temperature drift rate is ≤0.2℃ / s, the acquisition frequency is set to 1Hz to reduce redundant calculations. When the temperature drift rate is >0.2℃ / s, the acquisition frequency is increased to 5Hz to capture rapid temperature drift changes.
[0023] After all sensor data is acquired, timestamp matching is performed based on the GPS time reference of the data acquisition unit. Hardware-level time synchronization is achieved through FPGA (Field Programmable Gate Array) to control the timestamp error of each sensor data within ±1ms. The synchronized data is stored in the 32GB USB flash drive of the embedded system to provide time-aligned multi-source datasets for subsequent filtering and correction processes.
[0024] Step 2, Adaptive Noise Adjustment Kalman Fusion Filter: The adaptive noise adjustment Kalman fusion filter aims to solve the problem that fixed noise parameters in traditional Kalman filtering cannot adapt to dynamic interference. By optimizing the process noise variance and observation noise variance in real time, it improves the filter's adaptability to complex noise environments. Simultaneously, it utilizes the high-precision reference signal from the optically pumped magnetometer to achieve multi-source fusion, avoiding filter drift. This stage first constructs an adaptive Kalman filter model with the true value of the geomagnetic field as the state variable. The state vector is defined as the real-time value of the XYZ components of the geomagnetic field. The state equation is designed based on the time continuity characteristics of the geomagnetic field, assuming that the rate of change of the geomagnetic field follows a Gaussian distribution over a short period. The process noise variance is obtained by calculating the standard deviation of the static geomagnetic field data using the sliding window method. The size of the sliding window dynamically switches according to the stability of the geomagnetic field. When the standard deviation of the geomagnetic field measurement data is <0.1nT (determined as a stable region), the window size is set to 100 sampling points to improve statistical accuracy; when the standard deviation of the geomagnetic field is ≥0.1nT (determined as a magnetic anomaly region), the window size is switched to 50 sampling points to enhance the response speed to noise changes.
[0025] The variance of observation noise is adaptively adjusted using a recursive update formula, which is: in The forgetting factor (valued at 0.95, used to balance the weights of historical noise data and current measurement bias, avoiding the abnormal influence of a single data point). The measurement deviation (i.e., the absolute difference between the two measurements) between the fluxgate magnetometer and the optical pump magnetometer at time k is used to dynamically optimize and update the sensitivity by statistically analyzing the standard deviation of the deviation through a sliding window (the window size is set to 30 sampling points). When the standard deviation is > 0.03nT, the weight of the current deviation is increased to enhance the noise adaptation speed.
[0026] Step 3, Dynamic Correction of Nonlinear Temperature Drift Model: Nonlinear temperature drift of the sensor is a key error source affecting the accuracy of aeromagnetic measurements. Essentially, the permeability of the fluxgate magnetometer's core material and the coil resistance exhibit high-order nonlinear characteristics with temperature changes. Traditional first-order linear temperature drift models cannot effectively cover errors over a wide temperature range. This invention constructs a third-order nonlinear temperature drift model and combines it with an extended Kalman filter (EKF) to estimate the temperature drift coefficient in real time, achieving dynamic correction. The expression for the nonlinear temperature drift model is: in The reference temperature is 25℃ (default value, adjustable according to the actual calibration environment). a, b, and c are the first, second, and third order temperature drift coefficients, respectively, whose initial values are obtained through high and low temperature chamber calibration experiments. Measurement errors of the fluxgate magnetometer are collected at five characteristic temperature points: -20℃, 0℃, 25℃, 40℃, and 60℃. The initial coefficients are obtained by fitting using the least squares method (typical values are a = 0.03nT / ℃, b = 0.002nT / ℃², and c = 0.0001nT / ℃³).
[0027] To achieve dynamic updating of the temperature drift coefficient, the temperature drift coefficient is incorporated into the state vector of the EKF, and an extended Kalman filter model is constructed. The state vector is defined as follows: in Let k be the actual value of the geomagnetic field at time k. The EKF (Electronic Keystone Array) provides a real-time temperature drift coefficient. Its state transition matrix is designed based on the temporal evolution of the geomagnetic field and the changing characteristics of the temperature drift coefficient. The observation matrix is constructed using the measurement model of a fluxgate magnetometer, directly incorporating the temperature drift error into the observation equation. Two scenarios are set for triggering the temperature drift coefficient update: first, when the core temperature change rate > 0.5℃ / s, the temperature drift characteristics change rapidly, requiring timely coefficient updates; second, when the sensor's cumulative operating time exceeds 100 hours. Considering that sensor aging can cause temperature drift, updates are triggered based on an aging rate model (obtained through long-term experimental fitting, assuming a linear relationship between aging-induced coefficient changes and operating time). Through iterative calculations by the EKF, the corrected geomagnetic field value is output in real time, eliminating the influence of nonlinear temperature drift.
[0028] Step 4, Feature Selection with Dynamic Weight Adjustment: Redundant features in multi-source data increase the computational load of subsequent models and may introduce multicollinearity, leading to overfitting or decreased inference efficiency. This invention suppresses multicollinearity through regularization and selects core features based on dynamic weight thresholds, ensuring that the feature set covers the main sources of interference while reducing redundant computation. This stage first standardizes the synchronized multi-dimensional data (including geomagnetic field components, propeller speed, motor current, ambient temperature, and temperature change rate) to eliminate the impact of dimensional differences on feature weight calculation. Then, L2 regularization (ridge regression) is applied to suppress multicollinearity among features. The regularization parameter is determined through 5-fold cross-validation combined with noise robustness analysis. In cross-validation, when the regularization parameter is 0.01, the model's mean squared error (MSE) is minimized and its sensitivity to noise is lowest; therefore, this parameter is selected as the optimal value.
[0029] The feature weights are calculated using the random forest algorithm. Initial weights for each feature are obtained through feature importance scoring, and then the weight thresholds are optimized based on a dynamic adjustment formula: in The initial threshold is set at 0.3, determined based on historical data statistics. The standard deviation of the feature weight vector at time k (reflecting the degree of dispersion of the current feature importance) is given. The adjustment coefficient is 0.2 (used to control the adjustment range of the threshold and avoid excessive fluctuations), S is the scene classification factor, and the temperature change rate is calculated using the first-order central difference method. The temperature change rate is calculated using the first-order central difference method, with the following formula: in Using the sampling interval of the temperature sensor, this method can effectively suppress the influence of single-point temperature noise on the calculation of the rate of change. The final core feature set includes the geomagnetic field direction cosine and its quadratic term, cross terms (covering the nonlinear changes of the geomagnetic field itself), propeller speed (reflecting the main interference source of the power system), motor current (correlated with electromagnetic radiation intensity), ambient temperature and temperature change rate (covering temperature drift-related features), ensuring a direct mapping relationship between the feature set and the error source.
[0030] Step 5, Magnetic Interference Adaptive Residual Network Modeling: To achieve accurate fitting of complex magnetic interference, this invention constructs a magnetic interference adaptive residual network. This network dynamically adjusts the residual connection intervals to adapt to the coupling relationship between the UAV's maneuvering state and the magnetic interference, and combines an error feedback attention mechanism to strengthen the weights of key features, thereby improving the model's fitting accuracy and generalization ability. The residual network structure includes an input layer, four residual blocks, a channel attention layer, and an output layer. The input layer has the same dimension as the core feature set (12 dimensions after filtering), and the output layer has a 3-dimensional dimension (corresponding to the compensation values of the XYZ components of the geomagnetic field). Each residual block contains two convolutional layers (3×3 kernel size, stride 1, same padding), one batch normalization layer (BN layer), and one ReLU activation function. Gradient propagation is achieved between residual blocks through skip connections, avoiding the gradient vanishing problem common in deep networks.
[0031] The adjustment rule for the residual connection interval L is dynamically determined based on the UAV's angular acceleration and a preset approximate mapping relationship. This mapping relationship is established through a combination of theoretical modeling and offline experimental calibration: flying under different steady-state angular accelerations, the fluxgate signal spectrum is analyzed to determine the characteristic frequency bandwidth where magnetic interference energy is concentrated; based on the Nyquist sampling theorem and network depth, a suitable residual connection interval is determined (the smaller the interval, the stronger the network's ability to extract high-frequency variation features), and this is labeled as an engineering approximation relationship. A lookup table or fitting function is then established based on this. in The residual connection interval indicates that in the sequence of residual blocks in the network, a skip connection is set every other residual block, i.e., a residual connection. The mapping relationship for the drone's angular acceleration (collected in real time by IMU sensors) supports dynamic fine-tuning through online learning, with the mapping parameters updated every 10 hours of flight time.
[0032] The channel attention layer design incorporates an error feedback mechanism, and the formula for calculating the attention weights is as follows: in denoted as the prediction error of the i-th feature (i.e., the absolute difference between the compensation value output by the network and the true value of the optical pump). is the adjustment coefficient (valued at 0.5 to control the degree of influence of error on attention weights), and n is the total number of features; the attention parameters and network weights are trained together using the Adam optimizer with a learning rate of 0.001 and 100 training epochs. The loss function is the mean squared error (MSE) to ensure that the model focuses on the key features that contribute significantly to the error.
[0033] Step 6, High-Precision Quantization and Real-Time Inference Optimization: The computing power and storage resources of UAV embedded systems are limited, and full-precision floating-point models cannot meet the requirements of real-time inference. This invention improves inference efficiency while ensuring compensation accuracy through high-precision fixed-point quantization and dynamic allocation of computing resources. The quantization process adopts a symmetric fixed-point quantization strategy, and the quantization step size is calculated using the following formula: Where w is the quantization bit width. This is the maximum absolute value of the input data for each layer of the network (obtained through statistics from the calibration dataset). The redundancy coefficient is set to 1.1 to cover extreme values of the data and avoid quantization overflow. The quantization bit width w is dynamically adjusted according to the accuracy requirements of each layer. The input and output layers have the highest accuracy requirements and use 16-bit quantization. The intermediate layers of the residual block have lower sensitivity to accuracy and use 12-bit quantization. The channel attention layer needs to balance accuracy and efficiency and uses 14-bit quantization. The optimal balance between accuracy and efficiency is achieved through differentiated bit width design.
[0034] Quantization error compensation is achieved by calculating a quantization offset, which is the average of the quantization errors (calculated based on the calibration dataset, specifically the average of the differences between the floating-point value and the quantized value). During inference, the offset is added to the quantization result to offset the systematic errors introduced by quantization. Computational resource allocation is dynamically adjusted based on the proportion of computational load at each layer in real-time computing. On UAV embedded processors (such as NVIDIA Jetson Nano), residual block computation tasks accounting for more than 30% of the computational load are allocated to GPU cores (using CUDA parallel acceleration) through system-level scheduling, while attention layers and input / output layers with lower computational load are allocated to CPU cores (optimized through OpenMP multi-threading). Simultaneously, unnecessary peripherals of the processor (such as USB and Ethernet interfaces) are disabled to free up computing power, ultimately ensuring that the model inference latency is controlled within 20ms, meeting the real-time requirements of UAV aeromagnetic detection.
[0035] Step 7, Closed-loop feedback and multi-source error fusion optimization: To further improve the dynamic adaptability of the compensation method, this invention adds three supplementary steps: adaptive evaluation of compensation effect, online iterative update of model, and multi-source error fusion, forming a fully closed-loop optimization system. The adaptive evaluation of compensation effect constructs a multi-dimensional indicator system, including the standard deviation of geomagnetic field measurement (target value <0.05nT), improvement ratio (the ratio of the standard deviation before compensation to the standard deviation after compensation, target value >1.5), temperature drift suppression rate ((temperature drift before compensation - temperature drift after compensation) / temperature drift before compensation × 100%, target value ≥90%), and prediction error variance (target value <0.002nT²). The thresholds of each indicator are dynamically adjusted according to the flight scenario. For example, the standard deviation threshold is relaxed to 0.08nT in the magnetic anomaly area and kept at 0.05nT in the stable area. When any indicator exceeds the corresponding threshold, the model parameters are fine-tuned (the learning rate is reduced to 0.0001, and the fine-tuning rounds are 20) or locally retrained (only the weights of the attention layer and the output layer are updated to reduce computational overhead).
[0036] The model's online iterative updates are based on incremental learning. New flight data (covering different terrains, temperatures, and maneuvering conditions) is collected every 50 hours of flight time. The new data undergoes quality screening (removing data with a signal-to-noise ratio below 10dB) and data augmentation (expanding the dataset by adding small-amplitude Gaussian noise). A knowledge distillation algorithm is used to avoid forgetting historical knowledge. The teacher model is an initially trained, fully accurate model, while the student model is a simplified, lightweight model with approximately half the network depth or number of parameters of the teacher model. For example, the number of residual blocks is reduced to half that of the teacher model. The student model is optimized using a joint loss function of distillation loss (KL divergence) and MSE loss to ensure that it can both inherit the knowledge of the teacher model and adapt to the characteristics of the new data. The number of training epochs is dynamically adjusted according to the amount of new data. When the amount of data is ≥10,000, the number of training epochs is set to 50; when the amount of data is <10,000, the number of training epochs is set to 30 to avoid overfitting.
[0037] The multi-source error fusion stage constructs a fusion model for the zero-point drift, scale factor error, installation error, and electromagnetic interference error of the triaxial fluxgate magnetometer: Zero-point drift is estimated in real time using a Kalman filter state vector, and the zero-point drift is incorporated into the state equation, achieving dynamic compensation through observation updates; the scale factor error is obtained through standard magnetic field calibration, and the compensation formula is as follows: in, The corrected magnetic field value. The original measurement value is K, which is the scale factor. The installation error is corrected by attitude matrix transformation, which transforms the measurement value of the fluxgate from the sensor coordinate system to the body coordinate system, and then transforms the attitude angle acquired by the IMU to the geographic coordinate system, thus eliminating the error caused by the installation deviation. The electromagnetic interference error is compensated by the aforementioned residual network model. Finally, through the synergistic suppression of multi-source errors, the accuracy of geomagnetic field measurement is comprehensively improved.
[0038] Example 2 This embodiment provides a specific implementation method for the application of aeromagnetic compensation in geological exploration by a small multi-rotor UAV, including the following steps: This embodiment uses a DJI M400 drone as the carrier for aeromagnetic detection. This drone has a maximum angular acceleration of 2.62 rad / s², a payload endurance of 59 minutes, and carries the following core equipment: Magnetic measurement unit: a three-axis fluxgate magnetometer (measurement range ±70μT, resolution 0.01nT), installed under the fuselage of the UAV (away from the motor and propeller, 30cm from the center of the fuselage to reduce electromagnetic interference); an optically pumped magnetometer (measurement accuracy 0.0001nT), installed next to the fluxgate magnetometer to ensure a consistent measurement environment; Auxiliary sensors: Fluxgate built-in temperature sensor (measurement range -20℃~60℃, accuracy ±0.1℃); IMU attitude sensor (sampling rate 100Hz, used to collect UAV angular acceleration and attitude angle); Data processing unit: NVIDIA Jetson Nano embedded processor (4-core ARM Cortex-A57, 4GB LPDDR4 memory, supports CUDA acceleration); CAN bus interface module (for communication with flight controller); GPS time synchronization module (to ensure time alignment of multiple sensors). Data storage and transmission unit: 32GB USB flash drive; 4G module (for real-time transmission of compensation results).
[0039] Before the experiment, sensor calibration was completed: in a standard magnetic field laboratory (magnetic field accuracy 0.001nT), the fluxgate magnetometer was zero-point calibrated and scale factor calibrated, and the scale factor K=1.002 (unitless) was recorded; the initial calibration of the temperature drift coefficient was completed in the high and low temperature chamber, and a=0.032nT / ℃, b=0.0018nT / ℃², c=0.00012nT / ℃³ were obtained; the installation error calibration of the IMU and fluxgate was performed, and the installation deviation angle was calculated by the attitude matrix for subsequent installation error correction.
[0040] The experiment was conducted in a metal mine exploration area. The flight altitude was 100m, the flight speed was 10m / s, the ambient temperature range was -5℃ to 35℃, and the flight lasted for 30 minutes. The specific implementation steps are as follows: Multi-dimensional data acquisition and synchronization: After the drone is started, each sensor acquires data according to the set parameters. The fluxgate sampling rate is 16Hz, the optical pump sampling rate is 10Hz, the CAN bus acquisition frequency is 32Hz, and the temperature sampling rate is dynamically adjusted according to the temperature drift rate (1Hz for most periods in the experiment, and increased to 5Hz in local high-temperature areas). The timestamps of each data are aligned through the GPS time synchronization module, and the time error is controlled within ±1ms. The synchronized data is stored in real time to a 32GB USB flash drive.
[0041] Adaptive Kalman fusion filtering: The sliding window size switching threshold was set to 0.1 nT, and the forgetting factor λ = 0.95. The sensitivity was dynamically optimized and updated by statistically analyzing the standard deviation of the sliding window (30 sampling points). In the experiment, the standard deviation of the geomagnetic field in the geologically stable area was 0.08 nT, and the window size was set to 100. The standard deviation in the magnetic anomaly area was 0.12 nT, and the window size was switched to 50. The standard deviation of the filtering result was stable between 0.04 nT and 0.05 nT.
[0042] Dynamic correction of the nonlinear temperature drift model: Based on temperature data (range -5℃~35℃) collected by the temperature sensor built into the fluxgate magnetometer, the temperature drift is calculated using a third-order temperature drift model. The initial values of the EKF state vector are set to [45000nT, 45000nT, 45000nT, 0.032nT / ℃, 0.0018nT / ℃², 0.00012nT / ℃³] (the initial values of the geomagnetic field are set based on the regional geomagnetic map). When the core temperature change rate reaches 0.6℃ / s (during the afternoon when the sun is directly overhead), the temperature drift coefficient is updated. After the update, a=0.031nT / ℃ and b=0.0019nT / ℃², and the temperature drift error is reduced from 0.05nT to 0.02nT.
[0043] Feature selection with dynamic weight adjustment: The collected 15-dimensional raw data (Geomagnetic field XYZ components, propeller speed, motor current, temperature, etc.) were standardized and L2 regularized (parameter 0.01). Feature importance was calculated using random forest with an initial weight threshold of 0.3. In the experiment, the standard deviation of the feature weight vector was 0.12, the scene classification factor S was 1.2 (magnetic anomaly scene), and the dynamic threshold was 0.3×1.2+0.2×0.12=0.384. Finally, 12 core features were selected, and 3 redundant features (such as motor voltage and UAV altitude, which had importance below the threshold) were removed.
[0044] Adaptive residual network modeling: A pre-trained residual network model was loaded (the training dataset consisted of 1 million historical aeromagnetic data points, and the training loss converged to 0.001nT²). Based on the angular acceleration collected by the IMU (which ranged from 2 rad / s² to 2.62 rad / s² for most periods in the experiment), the residual connection interval L was set to 4 based on an approximate mapping relationship. The adjustment coefficient of the attention layer was 0.5. The prediction error of each feature was calculated in real time and the attention weights were adjusted. The weights of propeller speed and temperature change rate were increased by 20%. The initial compensation value output by the model deviated from the high-precision reference signal of the optical pump by 0.03nT~0.04nT. The mapping relationship parameters were fine-tuned every 10 hours through online learning.
[0045] High-precision quantization and real-time inference optimization: Differentiated quantization bit widths are adopted (16 bits for the input layer, 12 bits for the residual block, 14 bits for the attention layer, and 16 bits for the output layer). The quantization step size of each layer is calculated (e.g., Δ=0.002nT for the input layer and Δ=0.005nT for the residual block). The average quantization offset is 0.001nT. The computing power is allocated as follows: GPU is used to process the residual block (accounting for 60% of the computation), and CPU is used to process the attention layer and the input and output layers. The inference latency is stabilized at 18ms, which meets the real-time requirements.
[0046] Closed-loop feedback and multi-source error fusion: Real-time calculation of compensation effect indicators, standard deviation 0.035nT, improvement ratio 1.8, temperature drift suppression rate 96%, prediction error variance 0.0012nT², all meet the target thresholds; after every 50 hours of flight, new data (about 100,000 data points) are collected for incremental learning. After knowledge distillation, the model's MSE decreases from 0.0015nT² to 0.001nT², showing good long-term stability.
[0047] After the experiment, the compensation data was compared with the measurement data of the traditional method (LMS adaptive compensation): the standard deviation of the geomagnetic field measurement of the method of the present invention was 0.035nT, while that of the traditional method was 0.085nT, which improved the accuracy by 58.8%; in the magnetic anomaly area, the method of the present invention has stronger interference suppression capability and the accuracy of anomaly feature identification is improved by 40%; the inference delay is 18ms, which is 67.3% higher than that of the traditional full-precision model (55ms), which fully meets the real-time aeromagnetic detection requirements of UAV geological exploration.
[0048] Example 3 This embodiment provides an application of geomagnetic navigation and aeromagnetic compensation for highly maneuverable unmanned aerial vehicles (UAVs), as detailed below: This embodiment is an extension of Embodiment 2, specifically targeting the geomagnetic navigation scenario of highly maneuverable UAVs. It optimizes the dynamic adaptability of the compensation method, with specific improvements and experimental results as follows: Multi-dimensional data acquisition and synchronization: The fluxgate sampling rate is set to 32Hz based on the magnetic interference characteristic frequency (8Hz) corresponding to the maximum angular acceleration of 2.62rad / s², and the CAN bus acquisition frequency is set to 64Hz (integer multiple matching); the dynamic adjustment threshold of the temperature sampling rate is increased to 0.3℃ / s to ensure rapid capture of temperature drift changes.
[0049] Adaptive Kalman fusion filtering: The threshold for switching the sliding window size is adjusted to 0.15nT (the geomagnetic field fluctuations are greater under high mobility conditions). The standard deviation of the deviation is statistically analyzed through the sliding window (20 sampling points) to improve the noise variance update response speed.
[0050] Adaptive residual network modeling: The mapping relationship of residual connection intervals is optimized. When the angular acceleration is >3 rad / s² (such as diving or jumping motions), L is set to 2. The attention layer adjustment coefficient is increased to 0.8 to enhance the weight of rapidly changing interference features. The online fine-tuning cycle of the mapping relationship is shortened to 5 hours.
[0051] High-precision quantization and real-time inference optimization: The quantization bit width of the residual block is reduced to 10 bits (high-mobility scenarios have higher real-time requirements), the core utilization rate of the GPU in the computing power allocation is increased to 80%, and the latency is further reduced through CUDA parallel acceleration.
[0052] During the experiment, the UAV performed highly maneuverable maneuvers such as dive (angular acceleration 3.5 rad / s²), hover (angular velocity 3 rad / s), and climb (angular acceleration 3.2 rad / s²), in an ambient temperature range of 0℃ to 40℃. The standard deviation of the compensated geomagnetic field measurement is 0.04 nT, while the traditional method has an error of 0.11 nT under the same maneuvering conditions, representing a 63.6% improvement in accuracy. The temperature drift suppression rate remains at 94%, and even under rapid temperature changes (0.8℃ / s), the temperature drift error is still controlled within 0.03nT; The model inference latency is reduced to 14ms, meeting the stringent requirements of real-time compensation for geomagnetic navigation of highly maneuverable UAVs (the update cycle of the navigation system is 20ms).
[0053] Experimental verification shows that the method of the present invention can still maintain excellent aeromagnetic compensation accuracy and real-time performance in highly maneuverable scenarios, providing a reliable measurement basis for geomagnetic navigation of highly maneuverable UAVs.
[0054] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0055] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization, characterized in that: Includes the following steps: Step S1, Multi-dimensional data acquisition and synchronization: Synchronously acquire the geomagnetic field component signal of the three-axis fluxgate magnetometer, the high-precision reference signal of the optical pump magnetometer, the propeller speed and motor current signal of the UAV power system, and the ambient temperature signal, and perform timestamp matching with a unified time reference to achieve alignment of multi-source sensor data in the time dimension. Step S2, Adaptive noise-adjusted Kalman fusion filtering: Construct an adaptive Kalman filter model with the true value of the geomagnetic field as the state variable. The process noise variance is calculated based on the statistical characteristics of the static geomagnetic field data, and the observation noise variance is adaptively adjusted based on the measurement deviation of the fluxgate and optical pump. The high-precision reference signal of the optical pump is used to participate in multi-source fusion to improve the robustness of the filter. Step S3, Dynamic correction of nonlinear temperature drift model: Establish a nonlinear temperature drift model, incorporate the temperature drift coefficient into the state vector, and use extended Kalman filter (EKF) to estimate the temperature drift coefficient in real time and perform dynamic compensation. Step S4, Feature screening with dynamic weight adjustment: Apply regularization to the multi-dimensional collected data to suppress feature multicollinearity, dynamically adjust the feature weight threshold, and screen the core feature set. The core feature set includes the geomagnetic field direction cosine and its quadratic term, cross term, propeller speed, motor current, ambient temperature and temperature change rate. Step S5, Adaptive Residual Network Modeling for Magnetic Interference: Using the selected core feature set as input, a residual network model is constructed. The residual connection interval is based on the approximate mapping relationship between the UAV's angular acceleration and the rate of change of magnetic interference. The approximate mapping relationship is dynamically optimized through offline calibration and online learning, and the weights of key features are strengthened through an error feedback mechanism. Step S6, High-precision quantization and real-time inference optimization: Quantize the trained network model into a fixed-point format, dynamically adjust the quantization bit width based on the accuracy requirements of each layer of the network, optimize inference efficiency through computing power resource allocation, and output the compensated geomagnetic field value.
2. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S1, the sampling rate of the three-axis fluxgate magnetometer is adaptively set based on the magnetic interference characteristic frequency corresponding to the maximum maneuvering angular acceleration of the UAV, and the sampling rate is not less than twice the characteristic frequency; the propeller speed and motor current are acquired through the flight control CAN bus, and the acquisition frequency is kept as an integer multiple of the fluxgate sampling rate; the ambient temperature signal is acquired through the built-in temperature sensor of the fluxgate, and the frequency is dynamically adjusted according to the temperature drift rate.
3. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S2, the process noise variance is calculated using the sliding window method to determine the standard deviation of the static data, with the window size dynamically adjusted based on the stability of the geomagnetic field. The variance of observation noise is adaptively adjusted using a recursive update formula, which is: in, Let k be the estimated variance of the observation noise. This is the estimated variance of the observation noise at time k-1. This is a forgetting factor used to balance the weights of historical estimates and current observations. The absolute value of the instantaneous deviation between the fluxgate magnetometer measurement and the true value signal of the optical pump magnetometer at time k is given. The sensitivity is updated by dynamically optimizing the noise variance through the statistical standard deviation of the deviation using a sliding window, replacing the traditional periodic correction.
4. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S3, the nonlinear temperature drift model is specifically as follows: in, This represents the temperature drift error at temperature T. The reference temperature is used, and a, b, and c are the temperature drift coefficients for the first, second, and third terms, respectively. Higher-order terms are introduced to adapt to the complex nonlinear temperature drift characteristics of the sensor. The EKF state vector is defined as: in, The value of the geomagnetic field at time k is the actual value. The temperature drift coefficient is updated based on the sensor aging rate model and the core temperature change rate threshold trigger.
5. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S4, the regularization parameter is determined through cross-validation combined with noise robustness analysis; the feature weight threshold is adaptively optimized using a dynamic adjustment formula, which is: in This is the moving standard deviation of the feature weight vector calculated based on the most recent N sampling periods, where N is set according to the degree of geomagnetic field fluctuation. The coefficients were determined through a grid search of historical data to adjust the sensitivity of the threshold to the dispersion of feature weights. The initial threshold is determined by analyzing the weight distribution quantiles of core and non-core features in historical flight data. S is the scene classification factor, and the temperature change rate is calculated using the first-order central difference method, as shown in the following formula: in, This represents the sampling interval of the temperature sensor.
6. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S5, the adjustment rule for the residual connection interval is based on the mapping relationship. ,in For residual connection interval, The angular acceleration is that of the UAV; this mapping is an engineering approximation based on calibration data, dynamically fine-tuned through online learning; the calculation formula for the attention mechanism with error feedback is: in, Let be the attention weight corresponding to the i-th element. The prediction error for the i-th feature is calculated by training the attention parameters and network weights together. This is the absolute value of the error term. This represents the expression for all elements j. Summation, This is the adjustment coefficient.
7. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: In step S6, symmetric fixed-point quantization is used, and the quantization step size is calculated using the following formula: in is the quantization step size, i.e., the floating-point value represented by each quantization interval, and w is the quantization bit width. The maximum absolute value of all input data for the layer to be quantized on the calibration dataset. The redundancy coefficient is used; quantization error compensation is achieved by calculating the compensation offset, which is the average value of the quantization error; the allocation of computing resources is dynamically adjusted based on the proportion of computing power of each layer in real time.
8. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 1, characterized in that: The compensation method also includes adaptive evaluation and feedback adjustment steps for the compensation effect, and constructs a multi-dimensional evaluation index system, including standard deviation, improvement ratio, temperature drift suppression rate and prediction error variance; when any index exceeds the adaptive threshold, it triggers fine-tuning of model parameters or local retraining.
9. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 8, characterized in that: The compensation method also includes an online iterative update step for the model based on incremental learning, regular collection of new flight data, use of knowledge distillation algorithm to avoid forgetting historical knowledge, and dynamic adjustment of training rounds based on scene distribution.
10. The aeromagnetic compensation method based on multi-source error modeling and adaptive closed-loop optimization according to claim 9, characterized in that: The compensation method also includes a multi-source error fusion compensation step. The system identifies the zero drift, scale factor error, installation error and electromagnetic interference error of the triaxial fluxgate magnetometer, and constructs a multi-source error fusion model, which is then compensated collaboratively through Kalman filtering, attitude matrix transformation and mapping model.
