A CGM sensor calibration method and system based on a nonlinear compensation model

By employing a calibration method based on a nonlinear compensation model, the problems of poor individualized adaptability and cross-sensor consistency of CGM sensors were solved, enabling long-term manual calibration-free operation and improving the accuracy of blood glucose monitoring and patient compliance.

CN121221111BActive Publication Date: 2026-03-03重庆联芯致康生物科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511800889.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-03
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

Existing CGM sensor calibration technology suffers from poor cross-sensor consistency and individualized adaptability, requiring frequent manual calibration, which increases the risk of wound infection for patients and reduces calibration accuracy.

Method used

A calibration method based on a nonlinear compensation model is adopted. Through adaptive weighting strategy, Kalman filtering, nonlinear attenuation compensation and four-condition judgment, combined with time sliding window monitoring and gradual weight update, the real-time adaptation of individual sensor differences and physiological state is achieved, reducing dependence on external calibration.

Benefits of technology

It achieves consistency and individualized adaptation across sensors, reduces the frequency of manual calibration, reduces the burden of blood collection for patients, improves compliance and accuracy of long-term monitoring, and avoids false alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121221111B_ABST
    Figure CN121221111B_ABST
Patent Text Reader

Abstract

This invention relates to the field of blood glucose monitoring technology, and specifically to a CGM sensor calibration method and system based on a nonlinear compensation model. The method includes: using the sensor's factory-verified sensitivity as the core input parameter of the nonlinear calibration function, and incorporating the sensor's inherent response characteristics at the time of manufacture into the blood glucose estimation model, thereby explicitly quantifying the sensitivity benchmark of each sensor. By embedding the prior of the factory-verified sensitivity, the root cause of individual sensor differences is eliminated, avoiding different blood glucose levels for the same current due to differences in sensor manufacturing processes and initial enzyme activity. Compared to existing technologies that do not consider the sensitivity differences of different CGM sensors at the time of manufacture and only rely on a unified linear function or manual calibration and adaptation using SMBG, this method unifies the signal-blood glucose mapping benchmark across sensors from the model root, solving the technical problems of poor consistency and individualized adaptability across sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blood glucose monitoring technology, and in particular to a CGM sensor calibration method and system based on a nonlinear compensation model. Background Technology

[0002] Diabetes is a prevalent chronic metabolic disease worldwide. Long-term high blood sugar can easily lead to serious complications such as retinopathy, nephropathy, and cardiovascular and cerebrovascular diseases. Therefore, continuous and accurate blood glucose monitoring is crucial for preventing complications. Traditional self-monitoring blood glucose (SMBG) devices rely on finger-prick blood sampling, which has a limited measurement frequency and makes it difficult to capture rapidly fluctuating high and low blood glucose events. While continuous glucose monitoring systems (CGM) can measure subcutaneous glucose levels at a fixed frequency of 1-5 minutes, significantly improving the ability to obtain dynamic blood glucose information, they still face many technical bottlenecks in practical applications.

[0003] Current CGM calibration techniques largely rely on simple linear functions combined with SMBG reference values ​​to periodically update parameters, requiring more than two finger-prick blood calibrations daily. Repeated blood sampling not only increases the risk of wound infection for patients but also exacerbates their psychological stress. While some studies have introduced extended Kalman filtering and Bayesian estimation frameworks to reduce calibration frequency, such as reducing manual calibration to once daily or once every four days, and others have attempted to achieve manual-free calibration through multi-sensor fusion, the former still relies heavily on SMBG and focuses primarily on short-term calibration. With long-term wear, calibration accuracy significantly decreases due to factors such as enzyme activity decay and sensor membrane contamination. The latter relies on animal experimental data and requires wearing three sensors simultaneously, making it difficult to promote in clinical settings. Furthermore, the parameter estimation of the calibration function is highly dependent on SMBG measurements and does not fully consider the differences in sensitivity between different sensors, resulting in poor cross-sensor consistency and individualized adaptability. Summary of the Invention

[0004] This invention provides a CGM sensor calibration method and system based on a nonlinear compensation model, which solves the technical problems of poor consistency and individualized adaptability across sensors.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0006] A CGM sensor calibration method based on a nonlinear compensation model includes the following steps:

[0007] S1: Acquire the raw current signal collected by the CGM sensor, perform a first-stage signal preprocessing on the raw current signal to obtain the compensated current signal; the first-stage signal preprocessing includes the following steps:

[0008] S11: The original current signal is processed by a resampling method based on an adaptive weighting strategy to obtain a preliminary low-frequency noise-removed current signal;

[0009] S12: The low-frequency noise-reduced current signal is processed by high-frequency noise filtering using a Kalman filter based on a random walk model to obtain the denoised current signal.

[0010] S13: The denoised current signal is processed by attenuation compensation based on a nonlinear attenuation compensation model to obtain the attenuated current signal.

[0011] S14: The current signal after attenuation compensation is processed by a depression compensation method based on four conditions to obtain the compensated current signal.

[0012] S2: The compensated current signal is calibrated using the second-stage blood glucose estimation model to obtain the blood glucose estimate; the second-stage blood glucose estimation model includes the following steps:

[0013] S21: Construct a nonlinear calibration function for the sensitivity verification of the fusion sensor in the factory, and use the compensated current signal as the function input;

[0014] S22: The parameters of the nonlinear calibration function are optimized offline by combining the Sequential Least Squares Programming (SLSQP) algorithm with the historical pairing data of CGM current and SMBG to obtain the optimal parameters. The optimization aims to minimize the average absolute relative difference.

[0015] S23: During online operation, the baseline drift of the blood glucose estimation result corresponding to the optimal parameters is determined by time sliding window monitoring. If drift is detected, a dynamic correction factor is introduced for fine-tuning to obtain the final blood glucose estimation value. The time sliding window monitoring identifies stationary segments by calculating the variance and interquartile range of the blood glucose sequence within the window, and the dynamic correction factor adopts a gradual weighting update strategy.

[0016] The basic principle and beneficial effects of this scheme are as follows: The sensor's factory-verified sensitivity is used as the core input parameter of the nonlinear calibration function. The inherent response characteristics of the sensor at the time of manufacture are incorporated into the blood glucose estimation model, explicitly quantifying the sensitivity benchmark for each sensor. By embedding the prior of factory-verified sensitivity, the root cause of individual sensor differences is eliminated. This avoids different blood glucose levels for the same current due to differences in sensor manufacturing processes and initial enzyme activity. Compared to existing technologies that do not consider the sensitivity differences of different CGM sensors at the time of manufacture and rely solely on a unified linear function or manual calibration using SMBG, this approach unifies the signal-to-blood glucose mapping benchmark across sensors from the model's root cause. Using historical paired data of CGM current and SMBG, rather than single-sensor data, as the training set, general parameter patterns are learned. This allows the optimized parameters to adapt to the sensitivity characteristics of different sensors and cover the differences in blood glucose metabolism among individuals, avoiding the limitations of parameters only adapting to a single sensor or a single user. Therefore, global data training using the SLSQP algorithm improves the generalization of cross-sensor parameters. Meanwhile, through a dynamic compensation mechanism, it accurately addresses sensor attenuation, noise interference, and individual differences, reducing reliance on external calibration. The offline attenuation model pre-locks long-term signal change patterns, and online adaptive compensation corrects deviations in real time. It maintains accuracy without frequent manual calibration, reducing calibration frequency and enabling long-term manual calibration-free operation. This alleviates the burden of blood collection for patients and improves compliance with long-term monitoring.

[0017] Because sensors operate in vivo for extended periods, individual physiological states can cause baseline drift, resulting in poor individualized adaptation. This solution monitors the variance and interquartile range of blood glucose sequences using a time-sliding window to identify stationary signal segments and determine baseline drift. Simultaneously, a gradually diminishing weight update strategy is employed to calculate a dynamic correction factor, giving higher weight to the latest individual stationary data in the correction process. This real-time compensation compensates for the impact of individual physiological state changes on blood glucose estimation, achieving a two-tiered adaptation of general parameters and individualized fine-tuning. This real-time baseline drift fine-tuning mechanism enables dynamic individualized adaptation.

[0018] Furthermore, the four conditions for judgment are specifically as follows:

[0019] To determine whether blood glucose levels strictly and monotonically decrease within a short time window.

[0020] Determine if the rate of blood glucose decline exceeds a set threshold.

[0021] Determine whether there are any abnormal high-amplitude fluctuations at the indentation starting point.

[0022] Determine whether blood glucose levels meet energy range constraints.

[0023] When all four conditions are met simultaneously, a two-stage compensation is triggered. The first stage corrects the underestimation of blood glucose during the dip, and the second stage corrects the signal distortion caused by the sudden rise during the recovery.

[0024] The beneficial effects are as follows: by determining whether the blood glucose value strictly and monotonically decreases within a short time window to lock in the trend, determining whether the rate of blood glucose decrease exceeds a set threshold for quantifying the change, determining whether there are no high-amplitude abnormal fluctuations at the indentation point to eliminate initial interference, and determining whether the blood glucose level meets the physiological rationality of energy range constraints. Correcting the underestimated blood glucose value during the indentation process to the corresponding normal blood glucose level and smoothing the sudden rise signal can accurately identify true indentations, avoid false hypoglycemia and false hyperglycemia alarms, and prevent false compensation.

[0025] Furthermore, the adaptive weighting strategy described in step S11 specifically involves: using a preset time period as a local window, with a preset number of original current measurement values ​​contained within the window; calculating the average absolute deviation of each current measurement value relative to other current measurement values ​​within the window; and assigning weights based on the average absolute deviation; calculating the average absolute deviation of each current measurement value relative to other current values ​​within the window:

[0026] ;

[0027] Weights are assigned based on the mean absolute deviation:

[0028] ;

[0029] The current value for resampling is calculated as follows:

[0030] ;

[0031] in, For the first The average absolute deviation of each current measurement value For the first At that moment The original current measurement value, For the first in the window At that moment The original current measurement value, For the first The weight of each current measurement value For adjustment coefficients, This is the current value after resampling. For the first The weight of each measurement value.

[0032] The beneficial effects are as follows: Quantitative identification and weight allocation can reduce the interference of high-amplitude low-frequency noise on the signal and distinguish between abnormal noise and true blood glucose fluctuations, thereby suppressing low-frequency jump noise and improving signal quality. Using soft suppression instead of hard rejection avoids misjudgment of blood glucose trends caused by the removal of abnormal data points, thus preventing signal distortion and ensuring the accuracy of blood glucose trends. Since the adaptive weighted sampling strategy completes the calculation within a local window, there is no need to add additional data caching or extend the processing cycle, which reduces latency errors and meets the real-time requirements of CGM. For slight sensor displacement and occasional poor contact, there is no need to manually adjust parameters to adapt to different scenarios, reducing signal quality degradation caused by scenario changes, thereby ensuring the stability and accuracy of blood glucose monitoring under different usage scenarios.

[0033] Furthermore, the denoised current signal is obtained through standard recursive calculation using the Kalman filter. Both the process noise and the measurement noise satisfy an independent and identically distributed Gaussian distribution. The state equation and measurement equation for the Kalman filter are as follows:

[0034] ;

[0035] The current after noise reduction is expressed as:

[0036] ;

[0037] in, Let k be the state variable at time k, representing time k. The current value; The state variable at time k-1, i.e., time k... The current value; The process noise at time k-1 represents the slow, natural change in the current value; The measured value at time k is the current measurement. The observation noise at time k represents the high-frequency noise in the current measurement. The state estimate at time k. Let be the prior state estimate at time k. Kalman gain is used to balance the confidence of prior estimates with that of current measurements. These are actual measured values. The measurement residual is the difference between the actual measured value and the prior predicted value.

[0038] The beneficial effects are as follows: Since a fixed noise variance can lead to over-filtering (loss of the true signal) or under-filtering (residual noise), this scheme models process noise and measurement noise as independent and identically distributed Gaussian distributions. The Kalman filter can dynamically adjust the Kalman gain according to the actual statistical characteristics of the noise: when the noise variance is small, the gain increases to emphasize the current measurement signal and retain the true subtle changes in blood glucose; when the noise variance is large, the gain decreases to rely on historical state predictions to avoid amplifying the noise. This can improve the matching degree between the current signal after high-frequency noise filtering and the actual interstitial fluid glucose changes, reduce fluctuations in blood glucose estimates caused by high-frequency noise, reduce short-term blood glucose estimation bias, and avoid misjudgments due to false small spikes and drops in blood glucose.

[0039] Since the interstitial fluid glucose metabolism rate varies among different individuals, and the electrochemical noise levels of different sensors differ, this solution uses historical data statistical variance to cover the noise characteristics of different individuals and sensors. This allows the Kalman filter to adapt without manual parameter adjustment, thereby improving the filtering effect, ensuring the consistency of the filtering effect, guaranteeing the filtering stability in different scenarios, and adapting to individual and sensor differences.

[0040] Since the delay error of Kalman filtering is directly related to the accuracy of noise modeling, if the noise distribution deviates from reality, the effect needs to be improved by increasing the filter order or smoothing window, which can easily introduce additional delay. This solution filters noise to ensure that the noise distribution does not deviate from reality, controls the delay error, meets the real-time requirements of CGM, and ensures that the blood glucose estimate can reflect the patient's blood glucose dynamics in a timely manner. This provides a time window for rapid intervention in hypoglycemia and hyperglycemia, avoiding the risk of untimely intervention due to signal delay.

[0041] Furthermore, the nonlinear attenuation compensation model includes offline attenuation trend prior estimation and online adaptive compensation. In the offline stage, historical data is smoothed through a large window, and an exponential attenuation model is used to fit the current attenuation curve within a preset period.

[0042] ;

[0043] in, The signal value after current decay of the sensor at the working time t represents the sensor working time, A is the initial decay value, representing the decay amplitude of the sensor at the initial working moment, B is the long-term stable value, the remaining signal value when the current decay tends to stabilize, and k is the decay rate.

[0044] During the online phase, the signal energy characteristics are evaluated at preset intervals using both long and short sliding windows. When a decrease in energy is detected twice consecutively, compensation is triggered to correct the signal amplitude attenuation.

[0045] The beneficial effects are as follows: The nonlinear attenuation compensation model of this scheme performs offline prior and online correction simultaneously. The exponential model in the offline stage locks in the attenuation law in advance, avoiding the need for unfounded correction during online compensation. Meanwhile, the dual-window judgment and continuous triggering mechanism in the online stage can capture signal changes in time in the early stage of attenuation and dynamically correct the current amplitude. This avoids the underestimation of blood glucose caused by the accumulation of attenuation in the later stage, ensures the accurate monitoring of hypoglycemia, and reduces the risk of delayed intervention due to patients underestimating hypoglycemia.

[0046] Existing attenuation compensation techniques mostly employ fixed-period compensation or single-window judgment compensation. The former is prone to forced compensation when there is no attenuation, leading to overestimation of blood glucose, while the latter is prone to short-term interference being misjudged as attenuation, resulting in incorrect corrections. This solution uses a dual-window comparison to distinguish between short-term fluctuations and long-term attenuation, avoiding the misjudgment of temporary current drops caused by brief sensor displacement as attenuation. A continuous double-detection trigger mechanism filters out accidental interference, ensuring that compensation is only performed when an attenuation trend is confirmed. This avoids overcompensation and miscompensation, ensuring signal authenticity.

[0047] Because different CGM sensors have individual differences, offline data fitting can be used to establish corresponding exponential model parameter libraries for different batches and models of sensors. In the online phase, parameters matching the current sensor are called for compensation, which can reduce the deviation in attenuation compensation accuracy within the monitoring period and improve cross-sensor consistency. Furthermore, existing technologies cannot accurately compensate for long-term attenuation and require frequent manual SMBG calibration. This solution can autonomously complete attenuation correction. Online compensation is based on the energy change of the current signal itself. The compensated current signal maintains a stable current-to-blood glucose mapping relationship, reducing mapping drift caused by attenuation, thus supporting the realization of manual calibration-free operation and reducing the burden of blood collection and infection risk for patients.

[0048] Furthermore, the duration of the long window of the dual sliding window is set to a first preset duration, and the duration of the short window is set to a second preset duration. The change in energy characteristics is determined by calculating the root mean square difference of the current signals within the two windows.

[0049] Furthermore, the duration of the time sliding window is set to a preset sliding duration, and the data within the window is updated once every preset sliding interval. The baseline drift judgment threshold is set to a preset percentage of the average blood glucose value within the window.

[0050] A CGM sensor calibration system based on a nonlinear compensation model is characterized by comprising a signal acquisition module, a first-stage signal preprocessing module, and a second-stage blood glucose estimation module.

[0051] The signal acquisition module is used to acquire the raw current signal collected by the CGM sensor;

[0052] The first-stage signal preprocessing module is used to perform the processing steps S11 to S14 to convert the original current signal into a compensated current signal.

[0053] The second-stage blood glucose estimation module is used to execute the processing steps S21 to S23, converting the compensated current signal into a blood glucose estimation value.

[0054] Furthermore, the first-stage signal preprocessing module includes an adaptive resampling unit, a Kalman filtering unit, a nonlinear attenuation compensation unit, and a depression compensation unit;

[0055] The adaptive resampling unit is used to execute the processing procedure of step S11;

[0056] The Kalman filter unit is used to perform the processing procedure in step S12;

[0057] The nonlinear attenuation compensation unit is used to perform the processing procedure of step S13;

[0058] The depression compensation unit is used to perform the processing procedure of step S14.

[0059] Furthermore, the second-stage blood glucose estimation module includes a calibration function construction unit, a parameter optimization unit, and a baseline fine-tuning unit;

[0060] The calibration function construction unit is used to perform the processing procedure of step S21;

[0061] The parameter optimization unit is used to perform the processing procedure of step S22;

[0062] The baseline fine-tuning unit is used to perform the processing procedure of step S23.

[0063] The basic principle and beneficial effects of the solution are as follows: Tasks are broken down into functional modules: The signal acquisition module obtains the raw current signal from the CGM sensor, ensuring that the raw current data is transmitted, received, and temporarily stored without loss or distortion, avoiding the introduction of additional noise. The first-stage signal preprocessing module suppresses low-frequency transient noise, filters high-frequency random noise, and corrects amplitude drops and current dips. The second-stage blood glucose estimation module constructs a nonlinear calibration function that integrates the sensor's factory-verified sensitivity and incorporates individual sensor variability parameters, ensuring parameter generalization, correcting baseline drift in real time, and adapting to individual physiological changes. This allows each unit to be developed, tested, and optimized independently, providing flexible adaptability, facilitating standardization, and reducing development and integration difficulty. Simultaneously, it avoids processing delays or error amplification caused by functional overlap, improving signal processing accuracy and efficiency. Attached Figure Description

[0064] Figure 1The flowchart shows the algorithm processing of Example 1 of the CGM sensor calibration method based on a nonlinear compensation model.

[0065] Figure 2 This is a flowchart of the attenuation compensation process in Example 1 of the CGM sensor calibration method based on a nonlinear compensation model.

[0066] Figure 3 The flowchart shows the indentation compensation process in Example 1 of the CGM sensor calibration method based on a nonlinear compensation model.

[0067] Figure 4 This is a flowchart of blood glucose estimation in Example 1 of the CGM sensor calibration method based on a nonlinear compensation model. Detailed Implementation

[0068] The following detailed description illustrates the specific implementation method:

[0069] Example 1

[0070] This embodiment discloses a CGM sensor calibration method based on a nonlinear compensation model, applied to a 14-day continuous blood glucose monitoring scenario using an electrochemical CGM sensor. The CGM sensor acquires the raw current signal of subcutaneous interstitial fluid every 20 seconds and transmits it to a terminal device via Bluetooth. (See attached image) Figure 1As shown, the process includes three parts: Current Level, Glucose Level, and Calibration Parameters Estimation. The raw current is sequentially processed through low-frequency noise filtering, high-frequency noise filtering, attenuation compensation, and dip compensation. The processed signal is combined with the output of Calibration Parameters Estimation and enters the glucose calculation stage. After glucose baseline correction, the glucose concentration is finally obtained. The data generated by the blood glucose monitor (BGM) and the current data form Current-BGM pairs, which are input into the Optimization Estimation stage. The output of this stage is fed back to the Glucose Parameters Estimation stage to complete the iterative optimization of the calibration parameters.

[0071] Specifically, the following steps are included:

[0072] S1: First-stage signal preprocessing

[0073] S11: The original current signal is processed by a resampling method based on an adaptive weighting strategy to obtain a preliminary low-frequency noise filtering current signal.

[0074] In practical applications of continuous blood glucose monitoring, sensor signals are typically mixed with two types of noise: one is high-amplitude, low-frequency noise. One type is caused by physical disturbances such as poor contact or slight displacement of the wearing position; the other type is low-amplitude high-frequency noise. This mainly stems from fluctuations in the electrochemical measurements of the sensor itself. The raw current output by the sensor can be expressed as:

[0075] ;

[0076] To improve signal quality, resampling based on an adaptive weighting strategy is introduced to suppress low-frequency noise filtering. For example, the CGM sensor generates a raw current measurement value every 20 seconds. Three data points within one minute constitute a local window. First, calculate the average absolute deviation of each current measurement relative to other current values ​​within the window:

[0077] ;

[0078] Then, weights are assigned based on the mean absolute deviation:

[0079] ;

[0080] The resampled current value is:

[0081] ;

[0082] in, For the first The average absolute deviation of each current measurement value For the first At that moment The original current measurement value, For the first in the window At that moment The original current measurement value, For the first The weight of each current measurement value For adjustment coefficients, This is the current value after resampling. For the first The weight of each measurement value.

[0083] "Soft suppression" of outlier data points on a minute timescale reduces low-frequency jump noise caused by factors such as poor contact while preserving the true trend of blood glucose changes, effectively improving signal robustness without introducing additional delay.

[0084] For example, using a 1-minute local window, each window contains three raw current measurements: I1 = 5.2 nA, I2 = 18.6 nA, and I3 = 5.3 nA. Here, I2 represents low-frequency noise caused by poor contact. The average absolute deviations of each current measurement relative to the other two current measurements within the window are calculated to be 6.75, 13.35, and 6.7, respectively. Assuming an adjustment coefficient α = 0.1, the weighted values ​​are w1 = 0.597, w2 = 0.428, and w3 = 0.599. Therefore, the resampled current value is calculated to be 14.24 nA, which is the initial low-frequency noise-reduced current signal, effectively suppressing the abnormal interference of I2.

[0085] S12: The low-frequency noise-reduced current signal is processed by high-frequency noise filtering using a Kalman filter based on a random walk model to obtain the denoised current signal.

[0086] To suppress extreme values ​​and low-frequency high-amplitude fluctuations caused by minute sensor displacements or other physical interference, the amplitude range of the current values ​​acquired in real time by the sensor is first determined. When the detected value is higher than 10nA or lower than 0.1nA, it is considered an outlier and replaced with the average of the historical data from the most recent half hour, thus avoiding signal distortion caused by instantaneous measurement distortion. Simultaneously, an adaptive dynamic threshold determination mechanism is introduced. A fixed baseline threshold is superimposed with a dynamic term calculated based on the signal fluctuation level over the past 30 minutes, forming a threshold standard that changes over time. This standard is used to determine whether an abnormal signal transition has occurred. When the change amplitude exceeds the dynamic threshold, the average of the nearest historical values ​​is used to replace the current value, suppressing abrupt changes caused by low-frequency noise.

[0087] Since the high-frequency noise of the sensor output current mainly manifests as short-period fluctuations in the current signal, a Kalman filter based on a random walk model is introduced to improve signal smoothness. The state variables and measured values ​​of the Kalman filter are defined as follows: and Since the current interval is fixed at 1 minute after low-frequency denoising, the state change of the current between adjacent moments can be approximated as a random walk process. Therefore, the state equation and measurement equation of the Kalman filter are:

[0088] ;

[0089] Process noise and measurement noise are assumed to be independent and identically distributed, and approximated as Gaussian distributions based on the central limit theorem. According to the state equation, measurement equation, and the standard recursive process of Kalman filtering, the denoised current can be expressed as:

[0090] ;

[0091] in, Let k be the state variable at time k, representing time k. The current value; The state variable at time k-1, i.e., time k... The current value; The process noise at time k-1 represents the slow, natural change in the current value; The measured value at time k is the current measurement. The observation noise at time k represents the high-frequency noise in the current measurement. The state estimate at time k. Let be the prior state estimate at time k. Kalman gain is used to balance the confidence of prior estimates with that of current measurements. These are actual measured values. The measurement residual is the difference between the actual measured value and the prior predicted value.

[0092] For example, the natural change in current between adjacent time points. 0.1nA, high-frequency noise The current signal at time k is initially reduced to 0.05nA, removing low-frequency noise. The current signal after denoising at time k-1 is 14.24 nA. The current is 14.1 nA, and the predicted current value at time k is calculated. 14.2 nA, that is The current is 14.2 nA. Assuming the Kalman gain is 0.6, according to the formula for calculating the denoised current value, the denoised current signal is... =14.2+0.6×(14.24-14.2)=14.224nA.

[0093] S13: The denoised current signal is processed by attenuation compensation based on a nonlinear attenuation compensation model to obtain the attenuated current signal.

[0094] During continuous monitoring, the CGM current signal often experiences amplitude attenuation due to decreased enzyme activity, sensor membrane contamination, or changes in the local microenvironment. This attenuation can lead to an underestimation of blood glucose levels in long-term monitoring, affecting calibration accuracy. The attenuation compensation proposed in this scheme includes two steps: offline attenuation trend prior estimation and online adaptive compensation. (See attached diagram) Figure 2As shown, the entire process is divided into two stages: offline and online. In the offline stage, the attenuation trend model is fitted using historical data and the parameters are output. In the online stage, attenuation compensation is dynamically executed based on real-time current and preset logic (time interval, number of triggers) to achieve accurate correction of current signal attenuation. The denoised current undergoes a series of processing steps, including large-window smoothing, reference value calculation, attenuation ratio curve, and attenuation trend fitting, ultimately outputting fitted curve parameters. The denoised current first enters the real-time current updating stage. Next, it checks if the time interval is greater than 30 minutes: if no, the process returns to the starting point; if yes, it performs long / short window extraction and attenuation state detection. Then, it checks if the trigger count is greater than 2: if no, the process returns to the starting point; if yes, it triggers activation compensation, ultimately outputting the compensated current.

[0095] In the offline phase, historical human-machine interface data was first analyzed. Large-window smoothing was applied to the denoised current to obtain the overall attenuation ratio curve of the sensor's current value over a 14-day usage period. Subsequently, after the signal entered a stable period, a baseline current value was extracted, and the attenuation ratio curve was calculated based on the current trend curve. Studies have shown that after CGM implantation in the human body, signal attenuation typically exhibits an exponential attenuation characteristic. Therefore, the following model was used to fit the attenuation ratio curve (attenuation trend fitting) to provide prior reference for subsequent online compensation:

[0096] ;

[0097] The fitted curve parameters are as follows: The signal value after current decay of the sensor at operating time t represents the sensor operating time. A is the initial decay value, which represents the decay amplitude of the sensor at the initial operating moment. B is the long-term stable value, which represents the remaining signal value when the current decay tends to stabilize after the sensor has been operating for a sufficiently long time. k is the decay rate.

[0098] In the online phase, not all CGM sensors experience significant signal attenuation after implantation in the human body, necessitating real-time assessment of signal attenuation. To address this, two large-window smoothing mechanisms of varying lengths are used, with the current signal level within each window evaluated periodically (every 30 minutes). When the energy characteristics of the signal within both windows show a significant decrease, and similar trends occur more than twice consecutively, activation compensation is initiated. The attenuation ratio curve obtained in the offline phase is used to correct the real-time current, resulting in a compensated current. This compensates for amplitude reductions caused by biological and microenvironmental factors, improving the stability of the CGM during prolonged wear.

[0099] For example, during the offline phase, 40 sets of 14-day monitoring historical data from 17 volunteers were smoothed using a 1-hour large window process to extract the baseline current value during the sensor's stable period. An exponential decay model was then used to fit the decay curve. Assuming that the parameters A0=0.2, k=0.05, and B=0.03 are obtained through fitting the historical data, the decay ratio model is as follows: (t represents the sensor's operating time in days). For the online phase, the long window duration is set to 60 minutes and the short window duration to 30 minutes, with signal energy characteristics evaluated every 30 minutes. For example, if the sensor operates for 5 days and first detects that the energy in the long window is 8% lower than that in the short window (exceeding the set threshold of 5%), and then detects a further 7% energy decrease after a 30-minute interval, attenuation compensation is triggered. Based on the current operating time of 5 days, the attenuation ratio is calculated to be 0.1858. If the current denoised current signal is 14.224 nA, then the calculated attenuated current signal is 17.47 nA.

[0100] S14: The current signal after attenuation compensation is processed by a dip compensation method based on four conditions to obtain the compensated current signal.

[0101] In practical applications of CGM sensors, some subjects experience short-term abnormal dips in the current signal during overnight wear due to pressure or slight displacement caused by sleeping posture. This dip distortion can easily be misinterpreted as a hypoglycemic event, leading to false reports and incorrect interventions. Therefore, dip compensation is necessary to identify and correct such short-term abnormalities in real time during monitoring. (See attached image) Figure 3 As shown, the attenuation-compensated current first enters the compensation parameter stage, followed by the apply dip compensation operation, outputting the dip-compensated current. The raw current undergoes glucose profile evaluation and then enters the update data window stage; next, it determines whether the current is continuously decreasing within the window.

[0102] If no, it is considered a normal glucose decrease.

[0103] If yes, determine "No low-frequency noise at Start?":

[0104] If no, it is considered a normal glucose decrease.

[0105] If yes, determine "Rapid Drop Detected?":

[0106] If no, it is considered a normal glucose decrease.

[0107] If yes, perform Glycemic Drop Phase Detection. If a current dip is detected, activate Dip Compensation.

[0108] Since filtering smooths the signal and weakens the dip characteristic, this scheme uses the original current signal, which has only undergone three-point resampling, to obtain the unfiltered blood glucose profile through the blood glucose calculation formula as the basis for dip detection. Current dip events typically occur at night when blood glucose levels are low. They are characterized by a rapid and continuous drop in blood glucose within a very short period, with the rate of drop significantly exceeding the normal fluctuation range, followed by a recovery to the original level after ten to several tens of minutes. To achieve real-time and accurate identification of current dip events, four strict criteria are used: blood glucose values ​​strictly and monotonically decrease within a short time window; the rate of decrease in blood glucose values ​​exceeds a set threshold; the dip initiation point is not affected by high-amplitude abnormal fluctuations; and blood glucose levels meet energy range constraints. When all four conditions are met simultaneously, a dip is determined to be occurring in the current signal, triggering real-time compensation.

[0109] After compensation is triggered, a two-stage compensation process is employed to restore the accuracy of the signal. The first stage corrects the data from the occurrence of the dip to the signal recovery, preventing the current from underestimating blood glucose during the dip. The second stage handles the sudden rise in signal during the dip recovery. This eliminates the distortion in blood glucose estimation caused by abnormal current dips while maintaining the smoothness of the signal recovery process, thereby significantly improving the robustness of the signal and the reliability of blood glucose estimation in nighttime wearing environments.

[0110] For example, if the short time window is set to 10 minutes, the formula for calculating the rate of decline threshold is:

[0111] ;

[0112] in, The threshold for the rate of decrease in blood glucose. This represents the maximum blood glucose level within a short time window, i.e., the peak blood glucose level within that window. This represents the lowest blood glucose level within a short time window, i.e., the lowest blood glucose level within the window. : This represents the duration of the short time window, i.e., the time interval for calculating the rate of change in blood glucose.

[0113] If, during nighttime monitoring, the blood glucose levels within the window are 5.2, 5.0, 4.7, 4.3, and 3.8 mmol / L (strictly monotonically decreasing), with a decrease rate of 0.14 mmol / (L·min) (not exceeding the threshold, so compensation is not triggered); and if the blood glucose levels are 5.2, 4.5, 3.7, 3.0, and 2.3 mmol / L, with a decrease rate of 0.29 mmol / (L·min) (close to the threshold), and there are no high-amplitude abnormal fluctuations at the indentation point, and the blood glucose level meets the energy range constraint of 3.9-16.7 mmol / L, then all four conditions are met simultaneously, triggering a two-stage compensation: the first stage corrects the current value during the indentation process to the current value corresponding to the normal blood glucose level, and the second stage smooths the sudden rise signal during the recovery, finally obtaining the compensated current signal.

[0114] S2: Second-stage blood glucose estimation

[0115] As attached Figure 4 As shown, the current signal, after denoising, attenuation, and concave compensation, is converted into a blood glucose estimate, including modeling the blood glucose calculation formula, optimizing the formula parameters (calibration parameter estimation), and online blood glucose estimation. Using the blood glucose monitor (BGM) and the compensated current as inputs, the glucose estimation formula is first defined, followed by the definition of the MARD objective function. Then, optimized parameters are output through an optimization process. The compensated current, combined with the optimized parameters, is then fed into the glucose estimation formula stage, ultimately generating a glucose profile.

[0116] To maintain cross-sensor consistency and individualized adaptability while eliminating the need for manual calibration over the long term, the in-house validated sensitivity of the sensor is explicitly incorporated into the calibration function to describe the sensor's inherent response characteristics, and its effective sensitivity drift in the in vivo environment is characterized by a low-order nonlinear transformation. Specifically, the blood glucose estimation formula is modeled as (DefineGlucose Estimation Formula):

[0117] ;

[0118] Where G(t) is the glucose estimation, I(t) is the compensated current signal, S is the in-plant validated sensitivity of the sensor, and a, b, c, and d are the optimized parameters. Unlike calibration, which treats sensitivity as a completely unknown quantity and relies solely on periodic manual SMBG measurements for parameter updates, this approach embeds the sensor's in-plant sensitivity as a known prior into the model. It also allows for the characterization of sensitivity differences between laboratory and in vivo environments through nonlinear transformations. This enables the model to maintain long-term operational stability and sensor compatibility while reducing dependence on external SMBG.

[0119] The optimization estimation of the formula parameters is completed offline, using a large amount of prior historical data to train the blood glucose calculation formula. Specifically, using a dataset containing paired SMBG current data from multiple different sensors, the compensated current signals (Attenuation Compensated Current, Dip Compensated Current) are first input into the blood glucose calculation formula.

[0120]

[0121] Obtain blood glucose estimate (Glucose Concentration) and calculate the estimated results and the corresponding SMBG reference values. The prediction error between the two is used to estimate the optimal parameters using the mean absolute relative difference (MARD) as the objective function. MARD is defined as follows:

[0122] ;

[0123] Where N represents the number of samples for the SMBG reference value. The average absolute relative difference, The blood glucose estimate for the i-th sample is obtained by substituting the compensated current signal into the blood glucose calculation formula. This is the SMBG reference value for the i-th sample, which is the actual blood glucose value obtained from the fingertip blood measurement.

[0124] The Sequential Least Squares Programming (SLSQP) algorithm is used to iteratively update parameters a, b, c, and d to minimize the MARD difference between the estimated blood glucose value and the true SMBG value.

[0125] During the online operation phase, the optimal formula parameters obtained offline are directly loaded, and blood glucose estimation is performed on the real-time current signal. Although offline training has made full use of long-term historical data across sensors to enhance parameter stability, the sensors may still be affected by baseline drift and individual state fluctuations during long-term in vivo operation. Therefore, a baseline monitoring and dynamic fine-tuning mechanism is introduced in the online phase to improve the short-term stability and individualized adaptability of blood glucose estimation.

[0126] Specifically, the blood glucose estimation sequence is continuously tracked within a time sliding window W. The signal plateau segment of the blood glucose curve is identified by using variance and interquartile range. Within this plateau segment, if the estimated blood glucose level consistently deviates from the individual's recent mean baseline value... This can be identified as an early signal of baseline drift. When drift occurs, a dynamic fine-tuning process is triggered, introducing a lightweight dynamic correction factor while keeping the globally optimal parameters estimated offline unchanged. Correct the blood glucose estimation results:

[0127] , ;

[0128] in, This is a dynamic adjustment coefficient used to balance the correction amplitude. This is the final blood glucose estimate after dynamic fine-tuning. The initial blood glucose estimate before dynamic fine-tuning is obtained from offline optimal parameters. This is a dynamic correction factor used to compensate for blood glucose estimation bias caused by baseline drift. This represents the individual's recent average baseline value, i.e., the average value of the stable blood glucose period within the monitoring window. Furthermore, a gradually diminishing weight update strategy is employed during dynamic fine-tuning, ensuring that the most recent stable period data has a higher weight in the calculation of the correction factor, while the weight of earlier data gradually decreases. This guarantees the timeliness of the correction and suppresses the cumulative effect of random noise.

[0129] The gradual weighting update strategy assigns higher weights to recent stable data and gradually reduces the weight of earlier data to calculate the dynamic correction factor. The core principle is time decay: newer stable blood glucose data has higher reference value for the current baseline and therefore a higher weight; earlier data has a lower weight, avoiding interference from older data on the current baseline. First, the stable data window is determined by selecting recent stable blood glucose data as the sample set for baseline calculation, denoted as [reference value missing]. ,in For the i-th stable period blood glucose value, Corresponding to the earliest stable data, The latest stable data is used as the basis; then, fading weights are assigned, using exponentially decaying weights (linear decay can also be used), and the weight calculation formula is as follows:

[0130] ;

[0131] in, Let i be the weight of the i-th stable data. The attenuation coefficient is denoted by , and its value is . , ; Let be the number of time intervals between the current data and the i-th data; finally, calculate the weighted average baseline value, and based on the fading weights, calculate the recent average baseline value. The formula is:

[0132] ;

[0133] And calculate the dynamic correction factor, combined with the dynamic adjustment coefficient. Dynamic correction factor The calculation formula is as above:

[0134] ;

[0135] in, This is the current initial blood glucose estimate.

[0136] In this way, the baseline monitoring and dynamic fine-tuning mechanism achieves both long-term stability and short-term sensitivity of blood glucose estimation without relying on external SMBG calibration, providing stronger robustness and individualized adaptability.

[0137] The following is a simple example:

[0138] S21: Construct a nonlinear calibration function for the in-factory verification sensitivity of the fusion sensor. For example, if the initial parameters are a=0.02, b=0.8, c=0.1, d=0.5, and the in-factory verification sensitivity of the sensor is S=0.8mmol / (L·nA), then the compensated current signal is 17.47nA.

[0139] S22: The parameters of the nonlinear calibration function were optimized offline using the Sequential Least Squares QP algorithm combined with historical pairing data of CGM current and SMBG to obtain the optimal parameters. 100 sets of historical pairing data of CGM current and SMBG were selected as the training set. With the objective of minimizing the mean absolute relative difference (MARD), the parameters were iteratively updated to obtain the optimal parameters a=0.018, b=0.82, c=0.12, and d=0.45.

[0140] S23: During online operation, the baseline drift of the blood glucose estimation results corresponding to the optimal parameters is determined using a time-sliding window monitoring method. The time-sliding window duration is set to 120 minutes, and data is updated every 30 minutes. The variance and interquartile range of the blood glucose series within the window are calculated to identify the stationary segment. If the blood glucose estimation value in the stationary segment is consistently lower than the recent average baseline value (assumed to be 5.5 mmol / L) by 0.8 mmol / L (exceeding the 5% threshold), a dynamic correction factor is introduced for fine-tuning. For example, if the dynamic adjustment coefficient is 0.8, the final blood glucose estimation value obtained according to the correction formula is 5.34 mmol / L.

[0141] Example 2

[0142] The only difference from Example 1 is that the noise parameters of the Kalman filter in step S12 are limited. Specifically, the process noise and measurement noise of the Kalman filter in step S12 both satisfy an independent and identically distributed Gaussian distribution, with the mean of the Gaussian distribution set to 0 and the variance obtained through statistical analysis of historical data.

[0143] Fifty sets of historical monitoring data over 14 days were selected to calculate the variance of the process noise. The difference in denoised current between adjacent time points in each data set was statistically analyzed to obtain 5000 difference samples. Assuming the sample mean is 0.02 nA (approximately 0), the variance of the process noise was calculated to be 0.0025 nA using the variance calculation formula. 2 Similarly, calculate the variance of the measurement noise. Suppose that 6000 residual samples are obtained by statistically analyzing the residuals between the original high-frequency noise and the filtered signal in each data set, with a sample mean of 0.01 nA (approximately 0), the variance of the measurement noise is calculated to be 0.0016 nA. 2 .

[0144] In the Kalman filtering process, the process noise variance is set to 0.0025 nA. 2 The measurement noise variance was set to 0.0016 nA. 2 Substituting into the recursive formula of Kalman filtering, assuming the measured value at time k is 14.24 nA and the state estimate at time k-1 is 14.1 nA, and given that the process noise variance is 0.0025 and the measurement noise variance is 0.0016, the Kalman gain is 0.7746. Finally, the denoised current signal at time k is 14.2084 nA, which is closer to the current signal corresponding to the real blood glucose level than the filtering result with a fixed noise variance.

[0145] Example 3

[0146] The only difference from Example 2 is that the parameters of the long and short sliding windows in step S13 are limited. Specifically, the duration of the long window in step S13 is set to 60 minutes, and the duration of the short window is set to 30 minutes. The change in energy characteristics is determined by calculating the root mean square difference of the current signals within the two windows.

[0147] Suppose a long window (60 minutes) contains 360 current samples (one sample every 10 seconds), and a short window (30 minutes) contains 180 current samples. An energy assessment is performed on the current signals within both windows every 30 minutes. The formula for calculating the root mean square value of the current signal is:

[0148] ;

[0149] Where n is the number of sampling points within the window, This represents the root mean square value of the current signal. This represents the current signal value corresponding to the i-th sampling point within the window.

[0150] For example, in the first evaluation period (0-30 minutes), the root mean square (RMS) value of the current signal in the short window is RMS_short1 = 15.2 nA, and the RMS value in the long window (0-60 minutes, the first 30 minutes of data) is RMS_long1 = 15.1 nA. The difference is 0.1 nA (not exceeding the set threshold of 0.5 nA), so it is not judged as an energy decrease; in the second evaluation period (30-60 minutes), the RMS value of the current signal in the short window is RMS_short2 = 14.8 nA, and the RMS value in the long window (30-90 minutes, ... The root mean square value (RMS_long2) for the 30-60 minute data period was 14.2 nA, with a difference of 0.6 nA (exceeding the threshold), indicating the first detection of energy decrease. In the third evaluation period (60-90 minutes), the root mean square value (RMS_short3) of the current signal in the short window was 14.5 nA, and the root mean square value (RMS_long3) for the long window (60-120 minutes, 60-90 minute data period) was 13.8 nA, with a difference of 0.7 nA (exceeding the threshold), indicating that energy decrease was detected twice consecutively, triggering attenuation compensation.

[0151] Example 4

[0152] The only difference from Example 3 is that the parameters of the time sliding window in step S23 are limited. Specifically, the duration of the time sliding window in step S23 is set to 120 minutes, the data within the window is updated every 30 minutes, and the baseline drift threshold is set to 5% of the average blood glucose value within the window.

[0153] Suppose the sliding window duration is 120 minutes, containing 12 blood glucose estimates (one estimate every 10 minutes), and the window slides forward 30 minutes every 30 minutes, updating the blood glucose data within the window. Calculate the variance and interquartile range of the blood glucose series within the window to identify stationary segments: assuming the blood glucose values ​​within the window are sequentially 5.3, 5.2, 5.4, 5.3, 5.5, 5.4, 5.3, 5.2, 5.4, 5.3, 5.5, 5.4 mmol / L, with a variance of 0.012 mmol / L. 2 / L 2 If the interquartile range is 0.1 mmol / L, it is considered a stationary phase, and the average blood glucose value within the window is [value missing]. The baseline drift threshold is 0.2675 mmol / L. If the estimated blood glucose levels in subsequent windows are 5.0, 4.9, 4.8, 4.7, 4.6, 4.5, 4.4, 4.3, 4.2, 4.1, 4.0, and 3.9 mmol / L respectively, with an average blood glucose level of 4.45 mmol / L, and the difference from the previous average baseline value is 0.9 mmol / L (exceeding the threshold of 0.2675 mmol / L), it is considered baseline drift. If the dynamic adjustment coefficient is 0.9, and the current estimated blood glucose level is 3.9 mmol / L, the final estimated blood glucose level according to the correction formula is 4.71 mmol / L. This is compared with the actual fingertip blood glucose level, for example, if the actual fingertip blood glucose level is 4.52 mmol / L, indicating that the correction value matches the actual result.

[0154] Example 5

[0155] Based on embodiments 1-4, this embodiment discloses a CGM sensor calibration system based on a nonlinear compensation model, including a signal acquisition module, a first-stage signal preprocessing module, and a second-stage blood glucose estimation module. Each module works collaboratively through hardware circuits and software programs. The specific structure and working process are as follows:

[0156] The signal acquisition module uses a microcontroller as its core controller and connects to the output of the electrochemical CGM sensor via an analog signal acquisition interface. The sensor is worn on the subject's upper arm and acquires a raw current signal (range 0-50nA, accuracy 0.01nA) every 20 seconds. The microcontroller transmits the acquired raw current signal to the first-stage signal preprocessing module in real time via Bluetooth to ensure no data loss or distortion.

[0157] The first-stage signal preprocessing module is implemented using an FPGA chip, integrating an adaptive resampling unit, a Kalman filter unit, a nonlinear attenuation compensation unit, and a depression compensation unit. Each unit achieves parallel processing through hardware logic circuits: the adaptive resampling unit has a built-in 1-minute window counter and a mean absolute deviation calculation circuit. According to the adaptive weighting strategy, it resamples the input raw current signal and outputs a pre-reduced low-frequency noise-free current signal; the Kalman filter unit constructs a hardware Kalman filter based on a random walk model. Through the logic circuit of the state equation and measurement equation, it filters high-frequency noise from the pre-reduced low-frequency noise-free current signal and outputs a denoised current signal; the nonlinear attenuation compensation unit stores the parameters of the offline fitted exponential attenuation model. Through a long and short double sliding window energy evaluation circuit, it determines the attenuation state in real time, triggers compensation, and outputs the attenuated compensation current signal; the depression compensation unit has a built-in four-condition judgment logic circuit. It performs depression identification and two-stage compensation on the attenuated compensation current signal and outputs the compensated current signal.

[0158] The second-stage blood glucose estimation module is implemented using an ARM processor, integrating a calibration function construction unit, a parameter optimization unit, and a baseline fine-tuning unit. Blood glucose estimation is achieved through software: the calibration function construction unit constructs a nonlinear calibration function that fuses the sensitivity verified in-plant sensor data, receiving the compensated current signal output from the first-stage signal preprocessing module as input; the parameter optimization unit incorporates the SLSQP algorithm program, calling stored CGM current and SMBG historical paired data, and optimizes the parameters of the calibration function offline with the goal of minimizing MARD, outputting the optimal parameters; the baseline fine-tuning unit uses a time-sliding window monitoring program to calculate the variance and interquartile range of the blood glucose sequence within the window in real time, identifies baseline drift, introduces a dynamic correction factor for fine-tuning, and finally outputs the estimated blood glucose value to the display terminal.

[0159] The above are merely embodiments of the present invention. The invention is not limited to the fields covered by these embodiments. Commonly known structures and characteristics in the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are able to access all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A CGM sensor calibration method based on a nonlinear compensation model, characterized in that, Includes the following steps: S1: Acquire the raw current signal collected by the CGM sensor, perform the first stage of signal preprocessing on the raw current signal to obtain the compensated current signal; The first stage of signal preprocessing includes the following steps in sequence: S11: The original current signal is processed by a resampling method based on an adaptive weighting strategy to obtain a preliminary low-frequency noise-removed current signal; S12: The low-frequency noise-reduced current signal is processed by high-frequency noise filtering using a Kalman filter based on a random walk model to obtain the denoised current signal. S13: The denoised current signal is processed by attenuation compensation based on a nonlinear attenuation compensation model to obtain the attenuated current signal. The nonlinear attenuation compensation model includes offline attenuation trend prior estimation and online adaptive compensation. In the offline stage, historical data is smoothed through a large window, and an exponential attenuation model is used to fit the current attenuation curve within a preset period. ; in, The signal value after current decay of the sensor at the working time t represents the sensor working time, A is the initial decay value, representing the decay amplitude of the sensor at the initial working moment, B is the long-term stable value, the remaining signal value when the current decay tends to stabilize, and k is the decay rate. During the online phase, the signal energy characteristics are evaluated at preset intervals using both long and short sliding windows. When a decrease in energy is detected twice consecutively, compensation is triggered to correct the signal amplitude attenuation. S14: The current signal after attenuation compensation is processed by a depression compensation method based on four conditions to obtain the compensated current signal. S2: The compensated current signal is calibrated using the second-stage blood glucose estimation model to obtain the blood glucose estimate; the second-stage blood glucose estimation model includes the following steps: S21: Construct a nonlinear calibration function for the sensitivity verification of the fusion sensor in the factory, and use the compensated current signal as the function input; S22: The parameters of the nonlinear calibration function are optimized offline by combining the Sequential Least Squares Programming (SLSQP) algorithm with the historical pairing data of CGM current and SMBG to obtain the optimal parameters. The optimization aims to minimize the mean absolute relative difference (MARD). S23: During online operation, the baseline drift of the blood glucose estimation result corresponding to the optimal parameters is determined by time sliding window monitoring. If drift is detected, a dynamic correction factor is introduced for fine-tuning to obtain the final blood glucose estimation value. The time sliding window monitoring identifies the stationary segment by calculating the variance and interquartile range of the blood glucose sequence within the window. The dynamic correction factor adopts a gradual weighting update strategy. The four conditions for judgment are as follows: To determine whether blood glucose levels strictly and monotonically decrease within a short time window. Determine if the rate of blood glucose decline exceeds a set threshold. Determine whether there are any abnormal fluctuations at the starting point of the depression. To determine whether blood glucose levels meet the energy range constraints, that is, whether blood glucose levels are between 3.9 and 16.7 mmol / L, When all four conditions are met simultaneously, a two-stage compensation is triggered. The first stage corrects the underestimation of blood glucose during the dip, and the second stage corrects the signal distortion caused by the sudden rise during the recovery.

2. The CGM sensor calibration method based on a nonlinear compensation model according to claim 1, characterized in that, The adaptive weighting strategy is as follows: a preset time period is used as a local window, and the window contains a preset number of original current measurement values. The average absolute deviation of each current measurement value relative to other current measurement values ​​in the window is calculated, and weights are assigned according to the average absolute deviation. Calculate the average absolute deviation of each current measurement relative to other current values ​​within the window: ; Weights are assigned based on the mean absolute deviation: ; The current value for resampling is calculated as follows: ; in, For the first The average absolute deviation of each current measurement value For the first At that moment The original current measurement value, For the first in the window At that moment The original current measurement value, For the first The weight of each current measurement value For adjustment coefficients, This is the current value after resampling. For the first The weight of each measurement value.

3. The CGM sensor calibration method based on a nonlinear compensation model according to claim 2, characterized in that, The denoised current signal is obtained through standard recursive calculation using the Kalman filter. Both process noise and measurement noise satisfy independent and identically distributed Gaussian distributions. The state equation and measurement equation for the Kalman filter are: ; The current after noise reduction is expressed as: ; in, Let k be the state variable at time k, representing time k. The current value; The state variable at time k-1, i.e., time k... The current value; The process noise at time k-1 represents the slow, natural change in the current value; The measured value at time k is the current measurement. The observation noise at time k represents the high-frequency noise in the current measurement. The state estimate at time k. Let be the prior state estimate at time k. Kalman gain is used to balance the confidence of prior estimates with that of current measurements. These are actual measured values. The measurement residual is the difference between the actual measured value and the prior predicted value.

4. The CGM sensor calibration method based on a nonlinear compensation model according to claim 3, characterized in that, The duration of the long window of the dual sliding window is set to a first preset duration, and the duration of the short window is set to a second preset duration. The change in energy characteristics is determined by calculating the root mean square difference of the current signals within the two windows.

5. The CGM sensor calibration method based on a nonlinear compensation model according to claim 4, characterized in that, The duration of the time sliding window is set to a preset sliding duration, and the data in the window is updated once every preset sliding interval. The baseline drift judgment threshold is set to a preset percentage of the average blood glucose value in the window.

6. A CGM sensor calibration system based on a nonlinear compensation model, characterized in that, It includes a signal acquisition module, a first-stage signal preprocessing module, and a second-stage blood glucose estimation module; The signal acquisition module is used to acquire the raw current signal collected by the CGM sensor; The first-stage signal preprocessing module is used to perform the processing steps S11 to S14 in any one of claims 1-5, converting the original current signal into a compensated current signal. The second-stage blood glucose estimation module is used to perform the processing steps S21 to S23 of any one of claims 1-5, converting the compensated current signal into a blood glucose estimation value.

7. The CGM sensor calibration system based on a nonlinear compensation model according to claim 6, characterized in that, The first-stage signal preprocessing module includes an adaptive resampling unit, a Kalman filtering unit, a nonlinear attenuation compensation unit, and a depression compensation unit; The adaptive resampling unit is used to perform the processing procedure of step S11 in any one of claims 1-5; The Kalman filter unit is used to perform the processing procedure of step S12 in any one of claims 1-5; The nonlinear attenuation compensation unit is used to perform the processing procedure of step S13 in any one of claims 1-5; The depression compensation unit is used to perform the processing procedure of step S14 in any one of claims 1-5.

8. The CGM sensor calibration system based on a nonlinear compensation model according to claim 7, characterized in that, The second-stage blood glucose estimation module includes a calibration function construction unit, a parameter optimization unit, and a baseline fine-tuning unit; The calibration function construction unit is used to perform the processing procedure of step S21 in any one of claims 1-5; The parameter optimization unit is used to perform the processing procedure of step S22 in any one of claims 1-5; The baseline fine-tuning unit is used to perform the processing procedure of step S23 in any one of claims 1-5.

Citation Information

Patent Citations

  • Hybrid angular motion sensor

    CN105433949A

  • Biometric monitoring device

    CN106073737A