A method for stably calibrating data of a wearable device

Through adaptive Kalman filtering and double-layer mobile window filtering algorithm combined with deep neural network, the problem of sensor error in wearable devices in dynamic environments is solved, and the stable calibration and real-time data are achieved.

CN120063361BActive Publication Date: 2025-07-08重庆联芯致康生物科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510513075.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-08
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

The prior art cannot effectively deal with the nonlinear error and drift problems of sensor output in wearable devices in dynamic environments, and the complex calculation of the filtering algorithm is difficult to meet the real-time requirements.

Method used

Adaptive Kalman filtering is used to combine double-layer mobile window filtering and deep neural network to calibrate data by extracting the statistical characteristics of observed noise, multi-convolution neural network is used to optimize Kalman filtering parameters, and effective data sets are extracted in combination with double-layer mobile window filtering algorithm.

Benefits of technology

It realizes stable calibration of sensor data in dynamic environments, avoids manual intervention errors, reduces resource consumption, and meets real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120063361B_ABST
    Figure CN120063361B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for stably calibrating data of a wearable device, belonging to the technical field of data calibration, and comprising the following steps: Step 1, obtaining original data through a sensor; Step 2, performing adaptive Kalman filtering on the original data to obtain filtered sensor data; Step 3, using a double-layer moving window filtering algorithm for the filtered sensor data to extract an effective data set in the sensor; Step 4, deleting the maximum value and the minimum value in the effective data set, and calculating the average value of the effective data retained in the effective data set, and taking the average value as the intermediate value, and the intermediate value is the final sensor data. The whole process of the present invention does not require manual intervention and participation, avoiding errors caused by human mistakes; at the same time, there is no need to preset data. Some patents use pre-set data to participate in calibration, and this method requires separate configuration for each sensor, consuming more resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data calibration, and particularly to a method for stably calibrating wearable device data. Background Art

[0002] With the wide application of wearable devices, their importance in the fields of health monitoring, sports analysis, and daily activity tracking has been increasing. Wearable devices are usually equipped with sensors such as accelerometers, gyroscopes, and magnetometers to collect data related to users' dynamic behaviors. However, due to the complex external environment during device use, such as noise, temperature changes, vibrations, and electromagnetic interference, the data collected by the sensors may have large errors, thereby affecting the accuracy and reliability of the data.

[0003] To solve these problems, data calibration methods are usually used in the prior art to correct the output of the sensors. A common method is based on static calibration, where the output deviation of the sensor is measured under known stable conditions to establish a calibration model. However, the static calibration method cannot cope with the non-linear errors and drift problems of the sensor output in a dynamic environment in real time, resulting in limited effectiveness in actual use.

[0004] Another technical implementation is to process dynamic data by introducing a filtering algorithm (such as Kalman filtering). Kalman filtering shows certain advantages in fusing multi-sensor data and dynamic error correction, but its performance depends on the reasonable setting of filtering parameters and the accuracy of the model. When the matching degree between the model and the actual dynamic environment is low, the filtering effect will significantly decrease. In addition, these algorithms are usually computationally complex and difficult to meet the real-time requirements of resource-constrained wearable devices.

[0005] Based on this, the present invention designs a method for stably calibrating wearable device data to adapt to complex and changing dynamic environments and meet the actual application requirements. Summary of the Invention

[0006] In view of the above-mentioned drawbacks of the prior art, the present invention provides a method for stably calibrating wearable device data.

[0007] To achieve the above object, the present invention is realized through the following technical solutions:

[0008] A method for stably calibrating wearable device data includes the following steps:

[0009] Step 1, obtaining original data through sensors;

[0010] Step 2, performing adaptive Kalman filtering on the original data to obtain filtered sensor data;

[0011] Step 3: Apply the double-layer moving window filtering algorithm to the filtered sensor data to extract the effective data set in the sensor;

[0012] Step 4: Delete the maximum and minimum values in the effective data set, and calculate the average of the effective data retained in the effective data set. The average is used as the intermediate value, and the intermediate value is the final sensor data.

[0013] Furthermore, the specific operations of Step 2 are as follows:

[0014] Step 21: Input the original data into the deep neural network and extract the statistical characteristics of the observation noise. Output the statistical characteristics of the observation noise in the form of a covariance matrix to obtain the covariance matrix of the statistical characteristics of the observation noise;

[0015] Step 22: Input the covariance matrix of the statistical characteristics of the observation noise into the Kalman filtering algorithm model to obtain the filtered sensor data.

[0016] Furthermore, the deep neural network in Step 21 is a multi-convolutional neural network. The multi-convolutional neural network consists of an input layer, a convolutional layer, an activation layer, a ReLU activation function, a max-pooling layer, a fully connected layer, and an output layer. The multi-convolutional neural network uses a softmax classifier.

[0017] Furthermore, the specific operations of Step 21 are as follows:

[0018] Step 211: Input the original data into the input layer, and the input layer inputs the original data into the convolutional layer, and the convolutional layer performs convolutional operations;

[0019] Step 212: The activation layer uses the ReLU activation function to activate the result of the convolutional operation;

[0020] Step 213: The max-pooling layer performs max-pooling operations on the activated result;

[0021] Step 214: The fully connected layer maps the result of the max-pooling operation to covariance matrix parameters , and determine the covariance matrix through the covariance matrix parameters ; ;

[0022] Step 215: Constrain the covariance matrix to be symmetric positive definite;

[0023] Step 216: Perform cyclic training with minimizing the prediction error of the Kalman filter as the training objective, and finally obtain the covariance matrix of the statistical characteristics of the observation noise .

[0024] Further, the original data is n historical observation signals at the current moment t, denoted as ;

[0025] The specific calculation of the convolution operation is as follows:

[0026] , ;

[0027] Among them, is the convolution kernel size; is the weight parameter of the th convolution kernel at the position ; is the bias parameter of the th convolution kernel; is the output eigenvalue of the th convolution kernel at the position ; is the nth historical observation signal at the current moment t at the positions and .

[0028] Further, the ReLU activation function is specifically:

[0029] ;

[0030] is the eigenvalue obtained after passing through the Relu function;

[0031] The max pooling operation is:

[0032] ;

[0033] : The eigenvalue after pooling in the th channel;

[0034] Step 214 is specifically calculated as follows:

[0035] ;

[0036] ;

[0037] Among them, is the weight matrix of the fully connected layer;

[0038] is the bias vector of the fully connected layer;

[0039] is 's transposed matrix;

[0040] Step 215 is specifically calculated as follows:

[0041] ;

[0042] Among them, Lower triangular matrix generated by the multiple convolutional neural network;

[0043] is The transpose matrix of;

[0044] is Reconstructed into a symmetric matrix ;

[0045] Loss function used in cyclic training is as follows:

[0046]

[0047] Among them, Is the state estimate value of the Kalman filter, Is the state covariance matrix, Indicates the current moment The true observation value of, Indicates the trace operation symbol of the matrix, Indicates the observation matrix;

[0048] Covariance matrix of the statistical characteristics of the observation noise Is specifically as follows:

[0049]

[0050] Among them, Is the multiple convolutional neural network, Indicates backpropagation to optimize network parameters.

[0051] Furthermore, the specific operations of step 22 are as follows;

[0052] Step 221, state prediction and covariance prediction;

[0053] Step 222, substitute the covariance matrix of the statistical characteristics of the observation noise Into the Kalman filter equation for update;

[0054] Step 223, covariance update and state update;

[0055] Step 224, output the filtered sensor data .

[0056] Furthermore, the state prediction and covariance prediction are specifically calculated as follows:

[0057] ;

[0058] ;

[0059] Among them, is the state transition matrix; is the state estimate value at the previous moment; is the control input matrix; is the control input vector; is the predicted state value at the current moment; is the state covariance matrix at the previous moment; is the process noise covariance matrix; is the predicted covariance matrix at the current moment, is the transpose matrix of.

[0060] Furthermore, substituting the covariance matrix R t of the statistical characteristics of the observation noise into the Kalman filter equation for update calculation is as follows:

[0061] ;

[0062] Among them, is the Kalman gain matrix, is the transpose matrix of;

[0063] The covariance update and state update are calculated specifically as follows:

[0064] ;

[0065] ;

[0066] Among them, is the identity matrix, is the updated state covariance matrix; is the true observation value at the current moment.

[0067] Furthermore, the specific operations in step 3 are as follows: Step 31, perform equally spaced sampling on the filtered sensor data within a continuous time period of V minutes, the equal interval duration is seconds, and the first and last data of the first sampling window are , then the number of data points in the continuous time period;

[0068] Step 32, sort the first and last data of the first sampling window to obtain a data sample, and calculate the interquartile range of the data sample, ;

[0069] Among them, represents the 25th percentile, represents the 75th percentile;

[0070] Step 33, calculate the data set of the effective range according to the interquartile range ; ;

[0071] ;

[0072] Step 34, remove the maximum and minimum values from the data set of the effective range to obtain the effective data ; ;

[0073] Step 35, obtain the average value of the effective data within the current window as ; ;

[0074] Step 36, move the window according to the sliding interval seconds, and repeat the above process to obtain the average value within the range of as ;

[0075] Step 37, repeat the above operations to obtain the effective data set , as .

[0076] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention does not require manual intervention and participation throughout the process, avoiding errors caused by human mistakes; at the same time, it does not require preset data. Some patents use preset data in advance for calibration, and this method requires separate configuration for each sensor, consuming more resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0078] Figure 1 is a flowchart of a method for calibrating the stability of wearable device data according to the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0079] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0080] Embodiment 1:

[0081] Please refer to Figure 1 , a method for stably calibrating wearable device data, including the following steps:

[0082] Step 1, obtaining raw data through a sensor;

[0083] Step 2, performing adaptive Kalman filter filtering on the raw data to obtain filtered sensor data;

[0084] The specific operation of Step 2 is as follows:

[0085] Step 21, inputting the raw data into a deep neural network and extracting the statistical characteristics of the observation noise, and outputting the statistical characteristics of the observation noise in the form of a covariance matrix to obtain the covariance matrix of the statistical characteristics of the observation noise;

[0086] The specific operation of Step 21 is as follows:

[0087] Step 211, inputting the raw data into the input layer, and the input layer inputs the raw data into the convolutional layer, and the convolutional layer performs convolutional operations;

[0088] The raw data is n historical observation signals at the current moment t, denoted as ;

[0089] The specific calculation of the convolutional operation is as follows:

[0090] , ;

[0091] Among them, is the convolutional kernel size; is the weight parameter of the th convolutional kernel at the position ; is the bias parameter of the th convolutional kernel; is the output feature value of the th convolutional kernel at the position ; is at the position and the position The nth historical observation signal at the current moment t;

[0092] Step 212, the activation layer uses the ReLU activation function to activate the result of the convolution operation;

[0093] ReLU activation function Specifically: ;

[0094] is The eigenvalue obtained after passing through the Relu function;

[0095] Step 213, the max pooling layer performs max pooling operation on the activated result;

[0096] The max pooling operation is: ;

[0097] : The eigenvalue after pooling in the th channel;

[0098] Step 214, the fully connected layer maps the result of the max pooling operation to the covariance matrix parameter , and determines the covariance matrix through the covariance matrix parameter ;

[0099] The specific calculation of Step 214 is as follows:

[0100] ;

[0101] ;

[0102] Among them, is the weight matrix of the fully connected layer;

[0103] is the bias vector of the fully connected layer;

[0104] is the transpose matrix of;

[0105] Step 215, constrain the covariance matrix to be symmetric positive definite;

[0106] The specific calculation of Step 215 is as follows:

[0107] ;

[0108] Among them, is the lower triangular matrix generated by the neural network;

[0109] Specifically, the generation method is to use the covariance matrix parameter Fill it into a lower triangular matrix in row-major order ;

[0110] For example, for the lower triangular matrix when the dimension d = 3:

[0111] ;

[0112] where the diagonal elements are non-negative.

[0113] is the transpose matrix of;

[0114] is reconstructed into a symmetric matrix ;

[0115] Step 216, perform loop training with minimizing the prediction error of the Kalman filter as the training objective, and finally obtain the covariance matrix of the statistical characteristics of the observation noise ;

[0116] The loss function used in the loop training is as follows:

[0117] ;

[0118] where, is the state estimate value of the Kalman filter, is the state covariance matrix, represents the true observation value at the current moment , represents the trace operation symbol of the matrix, and H represents the observation matrix;

[0119] The covariance matrix of the statistical characteristics of the observation noise is specifically as follows:

[0120]

[0121] is a multi-convolutional neural network, represents backpropagation to optimize the network parameters

[0122] Step 22, input the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter algorithm model to obtain the filtered sensor data;

[0123] The specific operations of Step 22 are as follows;

[0124] Step 221, state prediction and covariance prediction;

[0125] The specific calculations of state prediction and covariance prediction are as follows:

[0126] ;

[0127] ;

[0128] wherein, is the state transition matrix; is the state estimate value at the previous moment; is the control input matrix; is the control input vector; is the predicted state value at the current moment; is the state covariance matrix at the previous moment; is the process noise covariance matrix; is the predicted covariance matrix at the current moment, is the transpose matrix of.

[0129] Step 222, substitute the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for update;

[0130] Substituting the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for update is calculated as follows:

[0131] ;

[0132] wherein, is the Kalman gain matrix, is the transpose matrix of;

[0133] Step 223, covariance update and state update;

[0134] The covariance update and state update are specifically calculated as follows:

[0135] ;

[0136]

[0137] wherein, is the identity matrix, is the updated state covariance matrix; is the true observation value at the current moment;

[0138] Step 224, output the filtered sensor data .

[0139] Step 3, use the double-layer moving window filtering algorithm for the filtered sensor data to extract the effective data set in the sensor;

[0140] Step 31: For the filtered sensor data perform equally-spaced sampling within a continuous time period. The duration of the continuous time period is V minutes, and the equally-spaced duration is seconds. The first V minutes is the first sampling window, and the head and tail data of the first sampling window are , then the number of data points w in the continuous time period;

[0141] ;

[0142] Step 32: Sort the head and tail data of the first sampling window to obtain a data sample, and calculate the interquartile range , ;

[0143] wherein, represents the 25th percentile, represents the 75th percentile;

[0144] Step 33: Calculate the data set within the effective range according to the interquartile range ; ;

[0145] ;

[0146] Step 34: Remove the maximum and minimum values from the data set within the effective range to obtain the effective data ; ;

[0147] ;

[0148] Step 35: Obtain the average value of the effective data within the current window as ;

[0149] ;

[0150] is the final result of the first sampling window;

[0151] Step 36: Move the window according to the sliding interval seconds, repeat the above process, and obtain the average value within the range of as ;

[0152] Step 37: Repeat the above operation to obtain the effective data set , is ;

[0153] Step 4: Delete the maximum and minimum values in the valid dataset, and calculate the average of the valid data remaining in the valid dataset. The average is used as the median value, and the median value is the final sensor data.

[0154] The deep neural network in Step 21 is a multi-convolutional neural network, which consists of an input layer, a convolutional layer, an activation layer, a ReLU activation function, a max pooling layer, a fully connected layer, and an output layer. The multi-convolutional neural network uses a softmax classifier.

[0155] The specific operation of Step 4 is as follows: Remove the maximum and minimum values in the valid dataset, and then calculate the average of the remaining values in the valid dataset. The average is used as the median value, and the median value is the final sensor data.

[0156] The whole process of the present invention does not require manual intervention and participation, avoiding errors caused by human mistakes. At the same time, there is no need to preset data. Some patents use pre-set data to participate in calibration, which requires separate configuration for each sensor and consumes more resources.

[0157] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for stably calibrating data of a wearable device, characterized in that: It includes the following steps: Step 1, obtain the original data through sensors; Step 2, perform adaptive Kalman filtering on the original data to obtain the filtered sensor data; Step 3, use a double moving window filtering algorithm on the filtered sensor data to extract the effective data set in the sensor; Step 4, delete the maximum and minimum values in the effective data set, and calculate the average of the effective data remaining in the effective data set. The average is used as the intermediate value, and the intermediate value is the final sensor data; The specific operation of Step 2 is as follows: Step 21, input the original data into the deep neural network and extract the statistical characteristics of the observation noise, and output the statistical characteristics of the observation noise in the form of a covariance matrix to obtain the covariance matrix of the statistical characteristics of the observation noise; Step 22, input the covariance matrix of the statistical characteristics of the observation noise into the Kalman filtering algorithm model to obtain the filtered sensor data; The deep neural network in Step 2 is a multi-convolutional neural network. The multi-convolutional neural network consists of an input layer, a convolutional layer, an activation layer, a ReLU activation function, a max-pooling layer, a fully connected layer, and an output layer. The multi-convolutional neural network uses a softmax classifier; The specific operations of step 3 are as follows: In step 31, the filtered sensor data is sampled at equal intervals within a continuous time period. The duration of the continuous time period is V minutes, and the equal interval duration is seconds. The head and tail data of the first sampling window are , then the number of data points in the continuous time period ; Step 32: Sort the data at the beginning and end of the first sampling window to obtain a data sample, and calculate the interquartile range of the data sample , , where represents the 25th percentile, represents the 75th percentile; Step 33, according to the interquartile range calculate the data set of the effective range , ; Step 34, remove the data set within the valid range and obtain the valid data by getting the maximum and minimum values ; Step 35, obtain the valid data within the current window The average value of ; Step 36, according to the sliding interval seconds, move the window, repeat the above process, and obtain the average value within the range is ; Step 37, repeat the above operations to obtain a valid data set , is .

2. The method for stably calibrating wearable device data according to claim 1, wherein The specific operation of Step 21 is as follows: Step 211, input the original data into the input layer, and the input layer inputs the original data into the convolutional layer, and the convolutional layer performs convolutional operations; Step 212, the activation layer uses the ReLU activation function to activate the result of the convolutional operation; Step 213, the max-pooling layer performs max-pooling operations on the activated result; Step 214, the fully connected layer maps the result of the max pooling operation to covariance matrix parameters , and determines a covariance matrix through the covariance matrix parameters ; ; Step 215, constrained covariance matrix Symmetric and positive definite; Step 216, perform iterative training with the minimization of the prediction error of the Kalman filter as the training objective, and finally obtain the covariance matrix of the statistical characteristics of the observation noise .

3. The method for stably calibrating wearable device data according to claim 2, wherein The original data are n historical observation signals at the current moment t, denoted as ; The specific calculation of the convolutional operation is as follows: , ; Among them, is the convolution kernel size; is the weight parameter of the -th convolution kernel at position ; is the bias parameter of the -th convolution kernel; is the output eigenvalue of the -th convolution kernel at position ; is the n-th historical observation signal at the current time t at positions and .

4. The method for stably calibrating wearable device data according to claim 3, wherein ReLU activation function Specifically: ; is the eigenvalue obtained after passing through the Relu function; The max-pooling operation is: ; : The eigenvalue after pooling for the th channel; The specific calculation of Step 214 is as follows: ; ; Among them, is the weight matrix of the fully connected layer; is the bias vector of the fully connected layer; is the transposed matrix of; The specific calculation of Step 215 is as follows: ; Among them, A lower triangular matrix generated by a multi-convolution neural network; is the transposed matrix of; To reconstruct into a symmetric matrix ; Loss function used in cyclic training As follows: ; Among them, is the state estimation value of the Kalman filter, is the state covariance matrix, represents the current moment t of the true observed value, represents the trace operation symbol of the matrix, represents the observation matrix; Covariance matrix of the statistical characteristics of the observation noise The details are as follows: ; Among them, is a multi-convolutional neural network, indicating backpropagation to optimize network parameters.

5. The method for stably calibrating wearable device data according to claim 4, wherein The specific operation of Step 22 is as follows; Step 221, state prediction and covariance prediction; Step 222, substitute the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for updating; Step 223, covariance update and state update; Step 224, output the filtered sensor data .

6. The method for stably calibrating wearable device data according to claim 5, wherein The specific calculation of state prediction and covariance prediction is as follows: ; ; Among them, is the state transition matrix; is the state estimate value at the previous moment; is the control input matrix; is the control input vector; is the predicted state value at the current moment; is the state covariance matrix at the previous moment; is the process noise covariance matrix; is the predicted covariance matrix at the current moment, is the transpose matrix of.

7. The method for stably calibrating wearable device data according to claim 6, wherein Substitute the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for the following update calculation: ; Among them, is the Kalman gain matrix, is the transpose matrix of; The specific calculation of covariance update and state update is as follows: ; ; Among them, is the identity matrix, is the updated state covariance matrix; is the true observation value at the current moment.

Citation Information

Patent Citations

  • Self-adaptive online filtering method

    CN107169478A

  • Video detection method of ship target based on depth learning network and Kalman filter

    CN109145836A