MEMS drift correction method based on data dynamic sampling and multi-source fusion
By employing dynamic data sampling and multi-source fusion methods in MEMS sensors, a basic drift correction and residual refinement model was established, solving the correction accuracy problem of MEMS sensors during periods of rapid change in environmental parameters and achieving high-precision drift correction results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN BEIDOU COMM TECH CO
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-21
AI Technical Summary
In existing MEMS sensors, drift error affects measurement accuracy, especially during periods of rapid change in environmental parameters, where calibration accuracy drops significantly. Furthermore, inconsistent sampling frequencies for different data can lead to information loss or the introduction of spurious signals.
By employing dynamic data sampling and multi-source fusion, a two-level fusion strategy of high-frequency environmental data and low-frequency acceleration data is used to establish a basic drift correction model and a residual refinement model. Low-frequency data is used to capture macroscopic relationships, and high-frequency data is used to process high-frequency residuals, thus avoiding information loss and false signals.
It significantly improves the drift correction accuracy of MEMS sensors in complex environments, reduces the mean absolute error and root mean square error, and enhances the model's adaptability. It is suitable for bridge monitoring scenarios with large diurnal temperature differences and drastic humidity, as well as slope monitoring with seasonal temperature and humidity changes.
Smart Images

Figure CN121594948B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor data processing, and in particular to a MEMS drift correction method based on dynamic data sampling and multi-source fusion. Background Technology
[0002] With the rapid development of Micro-Electro-Mechanical Systems (MEMS) technology, MEMS sensors have been widely used in numerous fields such as consumer electronics, automotive industry, aerospace, and UAV navigation due to their significant advantages such as small size, light weight, low cost, low power consumption, and ease of integration. In practical applications of MEMS sensors, drift error is one of the core factors affecting their measurement accuracy. In outdoor static measurement scenarios (such as slope monitoring and bridge health monitoring), MEMS sensors typically need to collect their own triaxial acceleration data and simultaneously collect environmental data such as temperature (T), humidity (H), and air pressure (P) for drift correction. However, in actual systems, the sampling frequencies of different data are often inconsistent.
[0003] Existing technologies typically employ simple linear interpolation to match low-frequency environmental data to high-frequency acceleration timestamps, or directly downsample the acceleration data. The former introduces false information about environmental changes, leading to model overfitting; the latter sacrifices data resolution and fails to fully utilize high-frequency data to refine the calibration model, especially during periods of rapid change in environmental parameters (such as sunrise and sunset, and sudden changes in humidity), where calibration accuracy will significantly decrease. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a MEMS drift correction method based on dynamic data sampling and multi-source fusion, which solves the above problems.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a MEMS drift correction method based on dynamic data sampling and multi-source fusion, comprising the following steps:
[0006] S1. Acquire raw MEMS triaxial acceleration data at a first sampling frequency, and simultaneously acquire ambient temperature, humidity, and air pressure data at a second sampling frequency, wherein the first sampling frequency is higher than the second sampling frequency.
[0007] S2. Perform anti-aliasing filtering on the raw triaxial acceleration data of MEMS and downsample to the second sampling frequency to obtain low-frequency acceleration data, and calculate the corresponding low-frequency drift.
[0008] S3. Train a generalized additive model based on low-frequency acceleration data and environmental data to obtain a basic drift correction model;
[0009] S4. Use interpolation to upscale the environmental sampling data to the first sampling frequency to obtain high-frequency environmental data, and calculate the high-frequency residual.
[0010] S5. Construct a residual refinement model, using the rate of change characteristics of high-frequency environmental data and the high-frequency prediction values of the basic drift correction model as inputs, and high-frequency residuals as outputs for training.
[0011] When the S6 MEMS sensor is running online, the current environmental data is first input into the basic drift correction model to obtain the basic drift prediction value. Then, the rate of change characteristics of the high-frequency environmental data and the basic drift prediction value are input into the residual refinement model to obtain the residual correction value. Finally, the basic drift prediction value and the residual correction value are subtracted from the original MEMS triaxial acceleration data to obtain the corrected acceleration data.
[0012] Specifically, a basic drift correction model is established using low-frequency data to capture the macroscopic, slowly changing relationship between environmental factors and drift. Then, a residual refinement model is constructed for high-frequency data to specifically process high-frequency residuals and capture high-frequency drift components related to the rate of environmental change. This two-level fusion strategy ensures the accuracy of the model in terms of macroscopic trends while making full use of high-frequency data to improve instantaneous correction accuracy. It avoids information loss caused by simple downsampling in traditional methods and avoids false signals introduced by crude interpolation.
[0013] Preferably, the anti-aliasing filter is a 32nd-order FIR filter with a stopband attenuation ≥60 dB, a passband ripple ≤0.01 dB, and an energy retention rate >98%.
[0014] Preferably, the interpolation method is cubic Hermite interpolation, with an interpolation node distance ≤ 60 s and a temperature change rate accuracy < 0.02 °C / s.
[0015] Specifically, by using anti-aliasing filtering and Hermite interpolation techniques, high-frequency and low-frequency data are organically integrated, avoiding information loss and the introduction of false signals. This fully utilizes the advantages of multi-frequency data. In mountainous bridge monitoring scenarios with large diurnal temperature differences and drastic humidity changes, compared to using only the low-frequency basic model, the MAE and RMSE of this invention are reduced by approximately 40%-45%. In long-term slope monitoring scenarios with significant seasonal temperature and humidity changes, the MAE and RMSE are reduced by approximately 45%, demonstrating that the residual refinement model can effectively compensate for high-frequency dynamic drift.
[0016] Preferably, the residual refinement model is a single-hidden-layer perceptron with ≤10 hidden nodes, ReLU activation function, q7 fixed-point format for weights and partial parameters, and a total memory footprint of <48 kB; the inference consists of only one matrix multiplication and addition, and the execution time is <0.8 ms.
[0017] Preferably, when the ambient temperature range is >15 °C or the humidity range is >30%RH within the statistical period, the generalized additive model is automatically retrained to update the parameters of the base drift correction model; when high-frequency residuals >0.05 m / s occur within the week... 2 When the sample proportion is greater than 5%, the residual refinement model is automatically retrained.
[0018] Preferably, the generalized additive model takes the form of:
[0019] ;
[0020] in, This is the low-frequency drift amount. These are temperature, humidity, and air pressure, respectively. For smooth spline functions, This is the error term.
[0021] Preferably, the input features of the residual refinement model include the temperature change rate dT / dt, the humidity change rate dH / dt, the air pressure change rate dP / dt, and the high-frequency prediction value ΔA_pred_high of the basic drift correction model.
[0022] Preferably, the first sampling frequency is ≥10 Hz and the second sampling frequency is ≤1 / 60 Hz.
[0023] Preferably, when the MEMS sensor is running online, the basic drift correction model and the residual refinement model are calculated sequentially within the same clock cycle, with an overall delay of <2 ms and a peak memory usage of <64 kB.
[0024] Preferably, the MEMS drift correction method is suitable for scenarios requiring high-precision drift correction, including slope monitoring, bridge health monitoring, structural deformation monitoring, and other outdoor static measurement applications that require high accuracy in tilt angle or acceleration measurement.
[0025] This invention provides a MEMS drift correction method based on dynamic data sampling and multi-source fusion. Compared with existing technologies, it has the following advantages:
[0026] 1. In this invention, a basic drift correction model is established using low-frequency data to capture the macroscopic, slowly changing relationship between environmental factors and drift. Then, a residual refinement model is constructed for high-frequency data to specifically process high-frequency residuals and capture high-frequency drift components related to the rate of environmental change. Through this two-level fusion strategy, the accuracy of the model in macroscopic trends is ensured, and high-frequency data is fully utilized to improve instantaneous correction accuracy. This avoids information loss caused by simple downsampling in traditional methods and avoids false signals introduced by crude interpolation.
[0027] 2. In this invention, high-frequency data and low-frequency data are organically integrated through anti-aliasing filtering and Hermite interpolation techniques, avoiding information loss and the introduction of false signals. This fully utilizes the advantages of multi-frequency data. In mountainous bridge monitoring scenarios with large diurnal temperature differences and drastic humidity changes, compared with using only the low-frequency basic model, the MAE and RMSE of this invention are reduced by approximately 40%-45%. In long-term slope monitoring scenarios with significant seasonal temperature and humidity changes, the MAE and RMSE are reduced by approximately 45%, demonstrating that the residual refinement model can effectively compensate for high-frequency dynamic drift. Attached Figure Description
[0028] Figure 1 This is a flowchart of the MEMS drift correction method based on dynamic data sampling and multi-source fusion proposed in this invention.
[0029] Figure 2 This is a schematic diagram of the data fusion process for the MEMS drift correction method based on dynamic data sampling and multi-source fusion proposed in this invention.
[0030] Figure 3 This diagram illustrates the multi-frequency data fusion and model construction of the MEMS drift correction method based on dynamic data sampling and multi-source fusion proposed in this invention. Detailed Implementation
[0031] 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.
[0032] Please see Figures 1-3 The present invention provides the following technical solutions, specifically including the following embodiments:
[0033] Example 1:
[0034] The MEMS drift correction method based on dynamic data sampling and multi-source fusion includes the following steps:
[0035] S1. Collect raw data of MEMS triaxial acceleration at the first sampling frequency, and simultaneously collect ambient temperature, humidity and air pressure data at the second sampling frequency. The first sampling frequency is higher than the second sampling frequency. The first sampling frequency is ≥10 Hz and the second sampling frequency is ≤1 / 60 Hz.
[0036] S2. Perform anti-aliasing filtering on the raw triaxial acceleration data of MEMS and downsample to the second sampling frequency to obtain low-frequency acceleration data, and calculate the corresponding low-frequency drift. The anti-aliasing filter adopts a 32nd-order FIR filter with a stopband attenuation ≥60 dB, a passband ripple ≤0.01 dB, and an energy retention rate >98%.
[0037] S3. Train a generalized additive model based on low-frequency acceleration data and environmental data to obtain a basic drift correction model. The generalized additive model has the following form:
[0038] ;
[0039] in, This is the low-frequency drift amount. These are temperature, humidity, and air pressure, respectively. For smooth spline functions, This is the error term;
[0040] S4. Use interpolation to upscale the environmental sampling data to the first sampling frequency to obtain high-frequency environmental data, and calculate the high-frequency residual. The interpolation method is cubic Hermite interpolation, with an interpolation node distance ≤ 60 s and a temperature change rate accuracy < 0.02°C / s.
[0041] S5. Construct a residual refinement model, using the rate of change characteristics of high-frequency environmental data and the high-frequency predictions of the basic drift correction model as input, and high-frequency residuals as output for training. The residual refinement model is a single-hidden-layer perceptron with ≤10 hidden nodes, ReLU activation function, and q7 fixed-point format for weights and partial parameters. Total memory usage is <48 kB. Inference consists of only one matrix multiplication and addition, with an execution time <0.8 ms. When the environmental temperature range is >15 °C or the humidity range is >30%RH within the statistical period, the generalized additive model is automatically retrained to update the parameters of the basic drift correction model. When a high-frequency residual >0.05 m / s occurs within the week... 2 When the sample proportion is >5%, the residual refinement model is automatically retrained. The input features of the residual refinement model include the temperature change rate dT / dt, humidity change rate dH / dt, air pressure change rate dP / dt, and the high-frequency prediction value ΔA_pred_high of the basic drift correction model.
[0042] S6. When the MEMS sensor is running online, the current environmental data is first input into the basic drift correction model to obtain the basic drift prediction value. Then, the rate of change characteristics of the high-frequency environmental data and the basic drift prediction value are input into the residual refinement model to obtain the residual correction value. Finally, the basic drift prediction value and the residual correction value are subtracted from the original MEMS triaxial acceleration data to obtain the corrected acceleration data. When the MEMS sensor is running online, the basic drift correction model and the residual refinement model are calculated sequentially within the same clock cycle, with an overall delay of <2 ms and a peak memory usage of <64 kB.
[0043] Example 2:
[0044] Based on Example 1, the effectiveness of the MEMS drift correction method based on dynamic data sampling and multi-source fusion is further verified through specific experimental verification and measurement steps. The specific steps are as follows:
[0045] S101. Experimental Scenario Selection: Two typical outdoor static measurement scenarios were selected for experimental verification.
[0046] Monitoring scenario for bridges in mountainous areas: large diurnal temperature range (>15°C), drastic humidity changes (extreme humidity difference >30%RH), and moderate air pressure changes;
[0047] Long-term slope monitoring scenario: Significant seasonal temperature and humidity changes, with relatively slow but long-lasting temperature and humidity changes.
[0048] S102. Experimental Equipment and Sensor Configuration: The same hardware configuration as in Example 1 is used: MEMS triaxial accelerometer (e.g., LSM6DSR, sampling rate ≥10Hz); environmental sensor (e.g., SHT40 temperature and humidity sensor and LPS22HB barometer, sampling rate ≤1 / 60Hz); main control MCU (e.g., STM32L4 series) for data acquisition, processing and model calculation;
[0049] S103. Data Acquisition and Preprocessing:
[0050] Data acquisition and preprocessing are performed according to steps S1 and S2 in Example 1:
[0051] Raw triaxial acceleration data of MEMS was acquired at a sampling frequency of 10Hz.
[0052] Ambient temperature, humidity and air pressure data are collected synchronously at a sampling frequency of 1 / 60Hz.
[0053] The acceleration data was subjected to 32nd-order FIR anti-aliasing filtering and downsampled to 1 / 60Hz to calculate the low-frequency drift.
[0054] S104. Train the model according to steps S3 to S5 in Example 1:
[0055] A generalized additive model (GAM) is trained using low-frequency data, and the model is in the following form:
[0056] ;
[0057] in, This is the low-frequency drift amount. These are temperature, humidity, and air pressure, respectively. For smooth spline functions, This is the error term;
[0058] The environmental sampling data was upscaled to 10Hz using cubic Hermite interpolation, and the high-frequency residuals were calculated.
[0059] A residual refinement model (single hidden layer perceptron) is constructed, with input features including the rate of change of temperature dT / dt, the rate of change of humidity dH / dt, the rate of change of air pressure dP / dt, and the high-frequency prediction value ΔApred_high of the basic model.
[0060] S105. Divide the collected data into training set and test set:
[0061] Mountainous bridge monitoring scenario: The model was trained using high-frequency data from the past 7 days, and tested using data from the 8th day;
[0062] Long-term slope monitoring scenario: The basic model is trained using low-frequency data from the past 30 days, and tested using data from day 31.
[0063] Experimental Results and Analysis
[0064]
[0065] Through the above experiments, the method of the present invention demonstrates significant performance improvements in two typical scenarios: In the mountainous bridge monitoring scenario with large diurnal temperature differences and sudden humidity changes, compared with using only the low-frequency basic model, MAE and RMSE are reduced by approximately 43.75% and 45.83%, respectively, and the peak error is significantly reduced; In the long-term slope monitoring scenario with significant seasonal temperature and humidity changes, MAE and RMSE are reduced by approximately 46.43% and 45.00%, respectively, proving that the residual refinement model can effectively capture and compensate for high-frequency dynamic drift. In addition, the method of the present invention exhibits good adaptability under different environmental change modes, and can effectively cope with complex and ever-changing outdoor static measurement scenarios, significantly improving the accuracy and stability of MEMS sensor drift correction.
[0066] Example 3:
[0067] Based on Examples 1 and 2, the impact of different feature combinations on the performance of the MEMS drift correction method was further verified through specific experimental steps and data analysis, and compared with the complete feature combination of the present invention. The specific steps are as follows:
[0068] Step 1: Experimental Scenario Selection: The mountainous bridge monitoring scenario was selected as the experimental object. This scenario is characterized by large diurnal temperature differences (>15°C) and drastic humidity changes (extreme humidity difference >30%RH), which can fully verify the performance of the model in complex environments.
[0069] Step Two: Configuration of Experimental Equipment and Sensors
[0070] Using the same hardware configuration as in Example 1: MEMS triaxial accelerometer (e.g., LSM6DSR, sampling rate ≥10Hz); environmental sensor (e.g., SHT40 temperature and humidity sensor and LPS22HB barometric pressure sensor, sampling rate ≤1 / 60Hz); main control MCU (e.g., STM32L4 series) for data acquisition, processing and model calculation;
[0071] Step 3: Data Acquisition and Preprocessing
[0072] Raw triaxial acceleration data of MEMS was acquired at a sampling frequency of 10Hz.
[0073] Ambient temperature, humidity and air pressure data are collected synchronously at a sampling frequency of 1 / 60Hz.
[0074] The acceleration data was subjected to 32nd-order FIR anti-aliasing filtering and downsampled to 1 / 60Hz to calculate the low-frequency drift.
[0075] Step 4: Design the following combinations of features for comparative experiments:
[0076] dT / dt only: Only the rate of temperature change is used as the input feature;
[0077] dT / dt+dH / dt: Use the rate of change of temperature and the rate of change of humidity as input features;
[0078] dT / dt+dH / dt+dP / dt: Uses the rate of change of temperature, humidity and air pressure as input features;
[0079] This invention uses a complete five-feature combination: temperature change rate, humidity change rate, air pressure change rate, high-frequency predictions from the basic model, and higher-order change rates of environmental variables as input features.
[0080] Step 5: Model Training and Validation
[0081] A generalized additive model (GAM) is trained using low-frequency data, and the model is in the following form:
[0082] ;
[0083] in, This is the low-frequency drift amount. These are temperature, humidity, and air pressure, respectively. For smooth spline functions, This is the error term;
[0084] The environmental sampling data was upscaled to 10Hz using cubic Hermite interpolation, and the high-frequency residuals were calculated.
[0085] Construct a residual refinement model (single hidden layer perceptron), train the input features according to the four combinations mentioned above, train the model using high-frequency data from the past 7 days, and test it using data from the 8th day.
[0086] Experimental Results and Analysis
[0087]
[0088] Results analysis: When using the rate of temperature change as the sole input feature, the RMSE is 0.031 m / s. 2 Compared to the complete feature combination of the present invention (RMSE is 0.022 m / s) 2 The performance decreased by 41%. This indicates that using only the temperature change rate cannot fully utilize all relevant information, leading to a significant reduction in correction accuracy; when using both temperature and humidity change rates as input features, the RMSE was 0.028 m / s. 2 Compared to the complete feature combination of this invention, the performance decreased by 27%. This indicates that although the humidity change rate feature was added, other key features were still lacking, resulting in lower correction accuracy than the complete feature combination; when using the change rates of temperature, humidity, and air pressure as input features, the RMSE was 0.026 m / s. 2 Compared to the complete feature combination of this invention, the performance decreased by 18%. This indicates that using only the rate of change of environmental variables is still insufficient to achieve the best correction effect, demonstrating that other features in this invention (such as high-frequency predicted values of the base model) play an important role in improving accuracy; when using the complete feature combination (including the rate of change of temperature, humidity, air pressure, and high-frequency predicted values of the base model), the RMSE is 0.022 m / s. 2 As a performance benchmark, the relative decrease was 0%. This indicates that by comprehensively considering multiple characteristics, the present invention can fully utilize information such as environmental variables and their rates of change, thereby achieving higher correction accuracy.
[0089] In summary, the following conclusions can be drawn:
[0090] While single features or combinations of features can provide some correction capability, they cannot achieve the accuracy of the complete feature combination of this invention. This invention, by comprehensively considering multiple features (including the rate of change of environmental variables and the high-frequency prediction values of the basic model), can make full use of all relevant information, thereby achieving higher correction accuracy and stronger adaptability. In mountainous bridge monitoring scenarios with large diurnal temperature differences and drastic humidity changes, the complete feature combination of this invention can significantly improve the accuracy of MEMS sensor drift correction. Compared with other feature combinations, RMSE is significantly reduced, proving its effectiveness and robustness in complex environments.
[0091] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A MEMS drift correction method based on dynamic data sampling and multi-source fusion, characterized in that: Includes the following steps: S1. Acquire raw MEMS triaxial acceleration data at a first sampling frequency, and simultaneously acquire ambient temperature, humidity, and air pressure data at a second sampling frequency, wherein the first sampling frequency is higher than the second sampling frequency. S2. Perform anti-aliasing filtering on the raw triaxial acceleration data of MEMS and downsample to the second sampling frequency to obtain low-frequency acceleration data, and calculate the corresponding low-frequency drift based on the low-frequency acceleration data; S3. Using the temperature, humidity, and air pressure as input variables, and the low-frequency drift as the output variable, train a generalized additive model to obtain a basic drift correction model. The generalized additive model takes the following form: in, This is the low-frequency drift amount. These are temperature, humidity, and air pressure, respectively. For smooth spline functions, This is the error term; S4. Use interpolation to upscale the environmental sampling data to the first sampling frequency to obtain high-frequency environmental data, and calculate the high-frequency residual. S5. Construct a residual refinement model, using the rate of change characteristics of high-frequency environmental data and the high-frequency prediction values of the basic drift correction model as inputs, and high-frequency residuals as outputs for training. When the S6 MEMS sensor is running online, the current environmental data is first input into the basic drift correction model to obtain the basic drift prediction value. Then, the rate of change characteristics of the high-frequency environmental data and the basic drift prediction value are input into the residual refinement model to obtain the residual correction value. Finally, the basic drift prediction value and the residual correction value are subtracted from the original MEMS triaxial acceleration data to obtain the corrected acceleration data.
2. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The anti-aliasing filter uses a 32nd-order FIR filter with a stopband attenuation ≥60 dB, a passband ripple ≤0.01 dB, and an energy retention rate >98%.
3. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The interpolation method is cubic Hermite interpolation, with an interpolation node distance ≤ 60 s and a temperature change rate accuracy < 0.02 °C / s.
4. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The residual refinement model is a single-hidden-layer perceptron with ≤10 hidden nodes, ReLU activation function, and q7 fixed-point format for weights and partial parameters. The total memory usage is <48 kB. Inference consists of only one matrix multiplication and addition, with an execution time of <0.8 ms.
5. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: When the ambient temperature range is >15 °C or the humidity range is >30%RH within the statistical period, the generalized additive model is automatically retrained to update the parameters of the base drift correction model; when high-frequency residuals >0.05 m / s occur within the week... 2 When the sample proportion is greater than 5%, the residual refinement model is automatically retrained.
6. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The input features of the residual refinement model include the temperature change rate dT / dt, the humidity change rate dH / dt, the air pressure change rate dP / dt, and the high-frequency prediction value ΔA_pred_high of the basic drift correction model.
7. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The first sampling frequency is ≥10 Hz, and the second sampling frequency is ≤1 / 60 Hz.
8. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: When the MEMS sensor is running online, the basic drift correction model and the residual refinement model are calculated sequentially within the same clock cycle, with an overall latency of <2 ms and a peak memory usage of <64 kB.
9. The MEMS drift correction method based on dynamic data sampling and multi-source fusion according to claim 1, characterized in that: The MEMS drift correction method is suitable for scenarios requiring high-precision drift correction, including slope monitoring, bridge health monitoring, structural deformation monitoring, and other outdoor static measurement applications that require high accuracy in tilt angle or acceleration measurement.
Citation Information
Patent Citations
Experimental calibration method based on multi-sensor signal fusion processing
CN120403743A
High-precision motion capture real-time calibration method based on multi-sensor fusion
CN120491816A