Method and system for pre-calibration of MEMS sensors powered by solar energy
By injecting multi-dimensional ripple signals in the laboratory and establishing a generalized additive model, the power supply noise problem of MEMS sensors in a solar-powered environment was solved, high-precision sensor drift compensation was achieved, system cost and complexity were reduced, and the measurement accuracy and reliability of the sensor were improved.
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
Existing technologies cannot effectively eliminate power supply noise in MEMS sensors under solar power conditions, causing sensor output drift. Furthermore, hardware filtering methods increase system cost and size, and cannot provide accurate software compensation.
In the laboratory, multi-dimensional ripple signals are injected, and a generalized additive model is established by synchronously acquiring sensor output and ripple characteristic data. Model parameters are generated and stored in the sensor, and a microcontroller is used to monitor and compensate for sensor drift in real time.
It achieves high-precision measurement and reliability of sensors under complex power supply conditions, reduces system cost and design complexity, has a ripple drift suppression rate of over 90%, simplifies the usage process and improves system stability.
Smart Images

Figure CN121594951B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microelectromechanical systems (MEMS), and more particularly to a method and system for pre-calibrating MEMS sensors based on solar power. Background Technology
[0002] Microelectromechanical systems (MEMS) sensors, including MEMS accelerometers, MEMS gyroscopes, and pressure sensors, are widely used in IoT, smart wearables, industrial monitoring, and environmental sensing due to their small size, low cost, and high integration. In remote areas and other scenarios without mains power, solar power systems have become the mainstream power supply solution for long-term monitoring equipment of MEMS sensors due to their cleanliness and sustainability. However, solar power supply has inherent instability: changes in sunlight intensity cause fluctuations in the output voltage / current of the solar panel, battery charging and discharging states switch, and the intermittent operation of loads (such as communication modules) all introduce voltage ripples of varying amplitude, frequency, and waveform into the power supply circuit.
[0003] In existing technologies, the suppression of power supply noise is mostly concentrated at the hardware level, such as using low-noise LDOs, adding LC filter circuits, and optimizing PCB layout. Although these methods can suppress ripple to a certain extent, they cannot completely eliminate it and increase system cost and size. More importantly, hardware filtering cannot distinguish the complex mapping relationship between ripple characteristics (such as frequency and amplitude) and sensor drift, and cannot perform accurate software compensation.
[0004] Therefore, there is an urgent need for a method that can quantitatively analyze the ripple characteristics of solar power supply and perform high-precision pre-calibration of MEMS sensors accordingly, so as to fundamentally improve the data quality of sensors in solar-powered environments. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a solar-powered MEMS sensor pre-calibration method and system, which solves the above problems.
[0006] To achieve the above objectives, the present invention provides a pre-calibration method for MEMS sensors based on solar power, comprising the following steps:
[0007] S1. In a laboratory environment, the MEMS sensor to be calibrated is connected to a ripple generator. The ripple generator injects ripple signals from three typical solar energy operating conditions into the sensor's power supply circuit. These three typical solar energy operating conditions include a diurnal alternation sinusoidal ripple, a cloud obstruction pulse ripple, and a load switching damped oscillation ripple. Each operating condition covers an amplitude range of... ∈ (50mV, 500mV), frequency ∈ (10Hz, 5kHz);
[0008] S2, Synchronously acquire the triaxial raw output of the sensor Electrical parameters of power supply circuit and ripple eigenvectors And calculate the sensor drift, specifically as follows:
[0009]
[0010] in, These are the original output values of the sensor in the x, y, and z axes, respectively, where g is the acceleration due to gravity.
[0011] S3. The ripple feature vector obtained in step S2 is... and sensor drift Data according to The voltage levels are divided into N ≥ 3 voltage segments, and a generalized model GAM can be applied to each segment: ,in For smooth spline functions, As the error term, N sets of segment model parameters are obtained. ;
[0012] S4. Transfer N sets of segment model parameters The segment threshold and feature normalization coefficients are written to the sensor's non-volatile memory in a q15 fixed-point format, with a total storage capacity of <8 kB.
[0013] S5. When the sensor is running online, the microcontroller monitors it in real time. It compares the parameter with the segment threshold and automatically selects the corresponding parameter. Calculate within 2ms And compensate for the original output: .
[0014] Preferably, the number of smooth spline nodes in each segment of the generalized additive model is ≤3, and the inference of each segment of the generalized additive model only requires ≤12 fixed-point multiplications and additions.
[0015] Preferably, the q15 fixed-point format is a 16-bit signed number, with 1 sign bit and 15 decimal places, and the drift prediction error caused by coefficient rounding error is ≤0.3 mg.
[0016] Preferably, the voltage segment N=4, and the segment thresholds are respectively .
[0017] Preferably, the THD in the ripple feature vector F is obtained by the microcontroller's built-in 256-point FFT calculation, with a calculation time of <0.5 ms.
[0018] Preferably, the calculation within 2 ms Includes: reading non-volatile memory coefficients ≤ 48 bytes, fixed-point multiplication and addition 12 times, writing back the result once, and a total CPU cycle ≤ 128000 cycles.
[0019] Preferably, when the long-term statistical residual standard deviation is >0.15 mg and lasts for >24 h, the microcontroller triggers online fine-tuning to refit the current segment using data from the most recent day. And write it back to non-volatile memory.
[0020] Preferably, the method ensures that the tilt angle caused by ripple is zero-biased to ≤0.05°.
[0021] A solar-powered MEMS sensor pre-calibration system includes:
[0022] The ripple excitation module is used to generate the ripples for the three typical solar energy operating conditions.
[0023] The synchronous acquisition module is used to record the sensor's raw output and electrical parameters;
[0024] The data processing and modeling module is used to execute S3 to S4 to obtain N sets of segment model parameters. ;
[0025] The parameter programming module is used to program N sets of segment model parameters. Write the data to the sensor's non-volatile memory in q15 format;
[0026] Microcontroller for real-time monitoring of MEMS sensor battery voltage;
[0027] The sensor online calibration module, integrated into the microcontroller, is used to perform 2 ms closed-loop compensation for the S5.
[0028] Preferably, after performing FFT calculations and fixed-point inference, the microcontroller has more than 60 kB of remaining RAM to meet the concurrent requirements of other tasks.
[0029] This invention provides a solar-powered MEMS sensor pre-calibration method and system. Compared with existing technologies, it has the following advantages:
[0030] In this invention, a series of preset multi-dimensional ripple signals covering typical solar power supply scenarios (such as dawn / dusk, cloud cover, load switching, and deep battery discharge) are actively injected into the sensor power supply circuit using a ripple generator in a laboratory environment. Simultaneously, the raw output data and corresponding ripple feature data of the sensor are collected. Based on a large amount of collected ripple feature vectors and sensor drift data, a generalized additive model is used to fit a complex mapping function between ripple features and drift, thereby characterizing the coupling effect between multiple variables such as amplitude, frequency, battery voltage, and load current. The optimal model obtained after training is then... The parameter set, model type identifier, and feature normalization coefficients are written into the sensor's built-in non-volatile memory at once. When operating in a real solar-powered environment, the sensor microcontroller monitors the power supply parameters in real time, calculates the current ripple feature vector, and calls the stored model to predict the drift amount in real time, compensating for the original output. This enables accurate compensation for sensor output drift caused by power supply ripple, improving the sensor's measurement accuracy and reliability under complex power supply conditions. No additional hardware filtering components are required; a ripple drift suppression rate of over 90% can be achieved solely through software modeling and compensation, significantly reducing system cost and design complexity.
[0031] 2. In this invention, models are independently established according to different voltage ranges, which can effectively cope with the complex changes in ripple characteristics under solar power supply scenarios. Furthermore, the sensor is pre-calibrated before leaving the factory, and the compensation model parameters are fixed in the sensor's non-volatile memory. Users can obtain high-precision anti-ripple performance without any additional operations after deploying the sensor, achieving the effect of one-time calibration and long-term effectiveness. This not only simplifies the sensor's usage process but also improves the stability and reliability of the system and reduces subsequent maintenance costs. Attached Figure Description
[0032] Figure 1 The present invention provides a system flowchart of the pre-calibration method and system for MEMS sensors based on solar power.
[0033] Figure 2 A schematic diagram of a sinusoidal ripple waveform representing the alternation of day and night;
[0034] Figure 3 A schematic diagram of the pulse ripple waveform caused by cloud cover.
[0035] Figure 4 This is a schematic diagram of the load switching damped oscillation ripple waveform.
[0036] Figure 5 A schematic diagram of the solar power ripple waveform during deep discharge;
[0037] Figure 6This is a schematic diagram illustrating the fitting effect of the nonlinear relationship between the ripple feature vector and the sensor drift. Detailed Implementation
[0038] 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.
[0039] Please see Figures 1-6 The present invention provides the following technical solutions, specifically including the following embodiments:
[0040] Example 1:
[0041] A pre-calibration method for solar-powered MEMS sensors includes the following steps:
[0042] S1. In a laboratory environment, connect the MEMS sensor to be calibrated to a ripple generator. The ripple generator injects ripple signals from three typical solar energy operating conditions into the sensor's power supply circuit. These three typical solar energy operating conditions include a diurnal alternation sinusoidal ripple, a cloud obstruction pulse ripple, and a load switching damped oscillation ripple. Each operating condition covers an amplitude range of... ∈ (50mV-500mV), frequency ∈ (10Hz-5kHz);
[0043] S2, Synchronously acquire the triaxial raw output of the sensor Electrical parameters of power supply circuit and ripple eigenvectors And calculate the sensor drift, specifically as follows:
[0044]
[0045] in, These are the original output values of the sensor in the x, y, and z axes, respectively, where g is the acceleration due to gravity.
[0046] S3. The ripple feature vector obtained in step S2 is... and sensor drift Data according to The voltage levels are divided into N ≥ 3 voltage segments, and a generalized model GAM can be applied to each segment: ,in For smooth spline functions, As the error term, N sets of segment model parameters are obtained. The number of smooth spline nodes in the generalized additive model of each segment is ≤3, and the inference of the generalized additive model of each segment requires only ≤12 fixed-point multiplications and additions. The voltage segment N=4, and the segment thresholds are respectively... The THD in the ripple feature vector F is obtained by the microcontroller's built-in 256-point FFT calculation, which takes less than 0.5 ms.
[0047] S4. Transfer N sets of segment model parameters The segment threshold and feature normalization coefficients are written to the sensor's non-volatile memory in q15 fixed-point format, with a total storage capacity of <8 kB. The q15 fixed-point format is a 16-bit signed number with 1 sign bit and 15 decimal places. The drift prediction error caused by coefficient rounding error is ≤0.3 mg.
[0048] S5. When the sensor is running online, the microcontroller monitors it in real time. It compares the parameter with the segment threshold and automatically selects the corresponding parameter. Calculate within 2ms And compensate for the original output: Calculate within 2 ms This includes: reading non-volatile memory coefficients ≤ 48 bytes, performing 12 fixed-point multiplications and additions, writing back the result once, with a total CPU cycle count ≤ 128,000 cycles. When the long-term statistical residual standard deviation is > 0.15 mg and lasts for > 24 hours, the microcontroller triggers online fine-tuning, refitting the current segment using data from the most recent day. It writes back to non-volatile memory, and the method ensures that the tilt angle caused by ripple is zero bias ≤ 0.05°.
[0049] A solar-powered MEMS sensor pre-calibration system includes:
[0050] The ripple excitation module is used to generate ripples for three typical solar energy operating conditions.
[0051] The synchronous acquisition module is used to record the sensor's raw output and electrical parameters;
[0052] The data processing and modeling module is used to execute S3 to S4 to obtain N sets of segment model parameters. ;
[0053] The parameter programming module is used to program N sets of segment model parameters. Write the data to the sensor's non-volatile memory in q15 format;
[0054] The microcontroller is used to monitor the battery voltage of the MEMS sensor in real time. After running FFT calculation and fixed-point inference, the microcontroller has more than 60 kB of RAM remaining to meet the concurrent requirements of other tasks.
[0055] The sensor online calibration module, integrated into the microcontroller, is used to perform 2 ms closed-loop compensation for the S5.
[0056] Example 2:
[0057] Based on Example 1, taking a MEMS static tilt sensor for slope monitoring as an example, it is powered by a solar panel and a lithium battery.
[0058] S101: Ripple Condition Simulation and Data Acquisition In the laboratory, the sensor is connected to the ripple excitation module, which generates ripple according to a preset sequence.
[0059] Simulated morning light enhancement: The voltage is linearly increased from 0V to 6.5V, superimposed with a sinusoidal ripple of 50mV amplitude and 100Hz frequency.
[0060] Simulated cloud cover: Based on 6V, the voltage is momentarily dropped to 4V and held for 2 seconds, generating a pulse ripple with an amplitude of 200mV.
[0061] Simulated 4G module transmission: Controlling the electronic load to simulate a 2A pulse current, in A damped oscillation ripple with a frequency of 1kHz and an amplitude of 80mV is generated on a nominal 6V circuit. The MCU's built-in ADC oversamples at 8kHz, and then downsamples to 1kHz via a CMSIS-DSP before synchronous calculation. , , .
[0062] S102: Feature Construction and Drift Calculation; For each 2-second excitation window, calculate the average value of the total sensor modulus M, and the drift ΔY = M - g (local g≈9.800). Simultaneously, calculate the mean value of the ripple characteristic parameters within the window to construct the feature vector F. More than 1000 different (F,ΔY) data pairs were collected.
[0063] S103: Nonlinear model fitting; a generalized additive model (GAM) is selected, with ΔY as the response variable, and... To obtain the smoothing term, the mgcv library is used in R to fit the function s( ), s( ) and their coefficients.
[0064] S104: Validation and Consolidation; Using another 200 sets of data for testing, the standard deviation of ΔY before correction was 0.08 g, and the standard deviation of the residual after correction decreased to 0.007 g, with a drift suppression rate of 91.25%. The GAM model type identifier, the fitted smoothing function coefficients, and the normalized parameters (mean, standard deviation) of each feature variable were written into the sensor's non-volatile memory.
[0065] S105: Online calibration; after sensor deployment, the ripple feature extraction unit built into its MCU (calculated via ADC and FFT) obtains the ripple feature in real time. The correction module reads the model parameters from the non-volatile memory and calculates the current drift prediction value. and from the original module length Subtract from the middle to obtain the corrected modulus. This allows for a more accurate tilt angle value. The system also... and If the system is currently in "charging" mode, it will automatically select the corresponding subset of parameters for calculation.
[0066] The above process runs on an STM32L432KC (64 kB RAM, 256 kB Flash, 64 MHz), with model coefficients occupying 6.2 kB Flash. The runtime RAM is less than 800 B, the single inference time is 0.65 ms, the FFT 256 points takes 0.32 ms, and the total time is less than 1 ms, which meets the 2 ms closed-loop requirement.
[0067] The following are test data under different typical ripple conditions:
[0068]
[0069] Conclusion: The drift amount ΔY before correction varies from 0.4 mg to 2.0 mg depending on the combination of ripple type, amplitude, and frequency, confirming the severity and diversity of ripple interference. After correction using the nonlinear model established by the pre-calibration method, the residual standard deviation under all test conditions is significantly reduced to below 0.15 mg, mostly concentrated between 0.05 mg and 0.10 mg. The corresponding drift suppression rate generally reaches over 90%, ranging from 88% to 96%. This proves that the nonlinear correction model G(F) constructed in this invention can effectively characterize and compensate for the complex mapping relationship between different ripple characteristics and sensor drift, and has broad applicability and robustness, and is not only effective for a single specific ripple mode.
[0070] Example 3:
[0071] In solar-powered MEMS sensor applications, the deep discharge region of the battery ( < 3.3 V) is a critical operating condition, where the ripple characteristics are complex and have a significant impact on sensor drift. This embodiment verifies the superiority of the piecewise generalized additive model (GAM) proposed in this invention by comparing the drift suppression effects of different modeling strategies in the deep discharge region.
[0072] Using a MEMS tilt sensor for bridge structure monitoring as the experimental subject, this sensor is powered by a solar panel and a lithium battery; simulating the deep discharge region of the battery ( Under power supply conditions of < 3.3 V, typical ripple characteristics are generated, including low-frequency large amplitude fluctuations and high total harmonic distortion (THD).
[0073] In the laboratory, the sensor was connected to the ripple excitation module to simulate the ripple conditions in the deep discharge region. The sensor output data and ripple characteristic parameters, including the fundamental amplitude, were collected. ),frequency( Total Harmonic Distortion (THD) and Duty Cycle (D);
[0074] Model Fitting and Validation
[0075] 1. Global Linear Regression: Using linear regression to fit the relationship between ripple characteristics and sensor drift;
[0076] 2. Global GAM: The global GAM model is fitted using the mgcv library in R language, with sensor drift as the response variable and ripple characteristic parameters as the smoothing term;
[0077] 3. Segmented GAM: The battery is divided into multiple segments based on its voltage. Each segment is fitted with a GAM model independently. The fitting process is similar to that of global GAM, but the model parameters are optimized separately for each segment.
[0078] Model validation: The drift suppression effect of each model was validated using an independent test dataset (approximately 200 sets of data). The standard deviation of the residuals before and after correction was calculated, and the drift suppression rate of each model was compared.
[0079] Experimental results
[0080]
[0081] Conclusions: Global linear regression: residual standard deviation is 0.35 mg, a 59% reduction compared to the piecewise GAM of this invention. This indicates that the linear regression model has poor drift suppression in the deep discharge region and cannot effectively capture the complex nonlinear relationship between ripple characteristics and sensor drift. Global GAM: residual standard deviation is 0.22 mg, an 18% reduction compared to the piecewise GAM of this invention. Although global GAM can handle nonlinear relationships, it still suffers from overfitting under the complex conditions of the deep discharge region, resulting in limited drift suppression. The piecewise GAM of this invention (benchmark): residual standard deviation is 0.18 mg. As the benchmark model, it has the best drift suppression effect. By dividing the ripple characteristics according to voltage segments, the piecewise GAM can better adapt to ripple changes under different operating conditions, significantly improving the drift suppression rate.
[0082] In summary, the piecewise GAM modeling strategy proposed in this invention has significant drift suppression advantages in the deep discharge region (V_bat < 3.3 V). Compared with global linear regression and global GAM, piecewise GAM can more accurately characterize the complex nonlinear relationship between ripple features and sensor drift, effectively reduce the standard deviation of the corrected residuals, and significantly improve the drift suppression rate. This verifies the superiority and robustness of this invention under complex working conditions and provides reliable technical support for the high-precision pre-calibration of solar-powered MEMS sensors.
[0083] 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 pre-calibration method for MEMS sensors based on solar power, characterized in that: Includes the following steps: S1. In a laboratory environment, the MEMS sensor to be calibrated is connected to a ripple generator. The ripple generator injects ripple signals from three typical solar energy operating conditions into the sensor's power supply circuit. These three typical solar energy operating conditions include a diurnal alternation sinusoidal ripple, a cloud obstruction pulse ripple, and a load switching damped oscillation ripple. Each operating condition covers an amplitude range of... ∈ (50mV, 500mV), frequency ∈ (10Hz, 5kHz); S2, Synchronously acquire the triaxial raw output of the sensor Electrical parameters of power supply circuit and ripple eigenvectors And calculate the sensor drift, specifically as follows: in, These are the original output values of the sensor in the x, y, and z axes, respectively, where g is the acceleration due to gravity. S3. The ripple feature vector obtained in step S2 is... and sensor drift Data according to The voltage levels are divided into N ≥ 3 voltage segments, and a generalized model GAM can be applied to each segment: ,in For smooth spline functions, As the error term, N sets of segment model parameters are obtained. ; S4. Transfer N sets of segment model parameters The segment threshold and feature normalization coefficients are written to the sensor's non-volatile memory in a q15 fixed-point format, with a total storage capacity of <8 kB. S5. When the sensor is running online, the microcontroller monitors it in real time. It compares the parameter with the segment threshold and automatically selects the corresponding parameter. Calculate within 2ms And compensate for the original output: .
2. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The number of smooth spline nodes in each segment of the generalized additive model is ≤3, and the inference of each segment of the generalized additive model only requires ≤12 fixed-point multiplications and additions.
3. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The q15 fixed-point format is a 16-bit signed number, with 1 sign bit and 15 decimal places. The drift prediction error caused by coefficient rounding error is ≤0.3 mg.
4. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The voltage range N=4, and the threshold values for each range are respectively... .
5. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The THD in the ripple feature vector F is obtained by the microcontroller's built-in 256-point FFT calculation, which takes less than 0.5 ms.
6. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The calculation within 2 ms Includes: reading non-volatile memory coefficients ≤ 48 bytes, fixed-point multiplication and addition 12 times, writing back the result once, and a total CPU cycle ≤ 128000 cycles.
7. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: When the long-term statistical residual standard deviation is >0.15 mg and persists for >24 h, the microcontroller triggers online fine-tuning, refitting the current segment using data from the most recent day. And write it back to non-volatile memory.
8. The pre-calibration method for a solar-powered MEMS sensor according to claim 1, characterized in that: The method ensures that the tilt angle caused by ripple is zero-biased to ≤0.05°.
9. A solar-powered MEMS sensor pre-calibration system, based on the solar-powered MEMS sensor pre-calibration method according to any one of claims 1-8, characterized in that: include: The ripple excitation module is used to generate the ripples for the three typical solar energy operating conditions. The synchronous acquisition module is used to record the sensor's raw output and electrical parameters; The data processing and modeling module is used to execute S3 to S4 to obtain N sets of segment model parameters. ; The parameter programming module is used to program N sets of segment model parameters. Write the data to the sensor's non-volatile memory in q15 format; Microcontroller for real-time monitoring of MEMS sensor battery voltage; The sensor online calibration module, integrated into the microcontroller, is used to perform 2 ms closed-loop compensation for the S5.
10. The solar-powered MEMS sensor pre-calibration system according to claim 9, characterized in that: After performing FFT calculations and fixed-point inference, the microcontroller has more than 60 kB of RAM remaining, which meets the concurrent requirements of other tasks.
Citation Information
Patent Citations
Experimental calibration method based on multi-sensor signal fusion processing
CN120403743A
Voltage ripple suppression and compensation method for multi-output AC-DC switching power supply
CN120528225A