Wearable device data stable calibration method
By using adaptive Kalman filtering and double-layer mobile window filtering algorithms to process sensor data in wearable devices, the problem of sensor data calibration in dynamic environments is solved, and the data is stable and real-time requirements are achieved.
Patent Information
- Application Number
- CN202510513075.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-23
AI Technical Summary
The prior art is difficult to deal with nonlinear errors and drift problems in sensor output in a dynamic environment in real time, and the computation is complex and difficult to meet the real-time requirements of wearable devices.
Adaptive Kalman filtering is used to filter the original data, and the effective data set is extracted through the double-layer mobile window filtering algorithm, and finally the data calibration is performed by the average as the intermediate value.
It realizes stable calibration of sensor data in complex dynamic environments, avoids the need for manual intervention and preset data, and improves the accuracy and reliability of data.
Smart Images

Figure CN120063361A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data calibration, and particularly to a method for stably calibrating data of a wearable device. 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, thus affecting the accuracy and reliability of the data.
[0003] To solve these problems, data calibration methods are usually adopted in the prior art to correct the output of the sensors. A common method is based on static calibration, which measures the output deviation of the sensors 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 effects 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 decrease significantly. In addition, these algorithms usually have complex calculations and are 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 data of a wearable device to adapt to the complex and changeable dynamic environment 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 data of a wearable device.
[0007] To achieve the above object, the present invention is realized through the following technical solutions: A method for stably calibrating data of a wearable device, comprising the following steps: Step 1, obtaining original data through sensors; Step 2, filtering the original data through adaptive Kalman filtering to obtain filtered sensor data; Step 3, using a double-layer moving window filtering algorithm to extract an effective data set from the filtered sensor data; 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.
[0008] Furthermore, the specific operations of Step 2 are as follows: 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; 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.
[0009] 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.
[0010] Furthermore, the specific operations of Step 21 are 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 the covariance matrix parameters , and determine the covariance matrix through the covariance matrix parameters ; ; Step 215, constrain the covariance matrix to be symmetric positive definite; 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 .
[0011] Furthermore, the original data is n historical observation signals at the current time t, denoted as ; The specific calculation of the convolutional operation is as follows: , ; where is the convolutional kernel size; is the weight parameter of the th convolutional kernel at the position ; is the bias parameter of the th convolution kernel; is the output eigenvalue of the th convolution kernel at position ; is the th and th historical observation signals of the nth at the current time t.
[0012] Furthermore, the ReLU activation function is specifically: ; is the eigenvalue obtained after passing through the Relu function; The max pooling operation is: ; : the eigenvalue after pooling of the th channel; Step 214 is specifically calculated as follows: ; ; where is the weight matrix of the fully connected layer; is the bias vector of the fully connected layer; is the transpose matrix of Step 215 is specifically calculated as follows: ; where is the lower triangular matrix generated by the multi-convolution neural network; is the transpose matrix of is reconstructed into the symmetric matrix ; The loss function used for cyclic training is as follows:
[0013] where is the state estimate value of the Kalman filter, is the state covariance matrix, represents the true observation value at the current time , The symbol representing the trace operation of a matrix represents the observation matrix; The covariance matrix of the statistical characteristics of the observation noise is specifically as follows:
[0014] Among them, is a multi-convolutional neural network, represents the backpropagation for optimizing network parameters.
[0015] Furthermore, the specific operations in step 22 are 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 update; Step 223, covariance update and state update; Step 224, output the filtered sensor data .
[0016] Furthermore, the specific calculations for state prediction and covariance prediction are 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.
[0017] Furthermore, the calculation of substituting the covariance matrix R of the statistical characteristics of the observation noise t into the Kalman filter equation for update is as follows: ; Among them, is the Kalman gain matrix, is the transpose matrix of; The specific calculations for covariance update and state update are as follows: ; ; Among them, is the identity matrix, is the updated state covariance matrix; is the true observation value at the current moment.
[0018] Furthermore, the specific operations of step 3 are as follows: Step 31, perform equally spaced sampling on the filtered sensor data within a continuous time period. The duration of the continuous time period is V minutes, and the equal spacing 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 head and tail data of the first sampling window to obtain a data sample, and calculate the interquartile range , ; Among them, represents the 25th percentile, represents the 75th percentile; Step 33, calculate the data set within the effective range according to the interquartile range ; ; Step 34, remove the maximum and minimum values in the data set within the effective range to obtain the effective data ; Step 35, obtain the average value of the effective data within the current window as ; Step 36, move the window according to the sliding interval seconds, repeat the above process, and obtain the average value within as ; Step 37, repeat the above operations to obtain the effective data set , is .
[0019] 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 to participate in calibration, and this method requires separate configuration for each sensor, consuming more resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0021] Figure 1 It is a flowchart of a method for stable calibration of wearable device data according to the present invention. Detailed implementation manners
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention 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 fall within the scope of protection of the present invention.
[0023] Embodiment 1: Please refer to Figure 1 , a method for stable calibration of wearable device data, including the following steps: Step 1, obtain the original data through a sensor; Step 2, perform adaptive Kalman filtering on the original data to obtain the filtered sensor data; The specific operation of Step 2 is as follows: Step 21, input the original data into a 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; 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; The original data is 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 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 The output eigenvalue of a convolution kernel at position ; is the nth historical observation signal at the current time t at position and position ; Step 212: The activation layer uses the ReLU activation function to activate the result of the convolution operation; The ReLU activation function Specifically: ; is the eigenvalue obtained after passing through the ReLU function; Step 213: The max pooling layer performs max pooling on the activated result; The max pooling operation is: ; : The eigenvalue after pooling for the th channel; 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 ; The specific calculation of Step 214 is as follows: ; ; where is the weight matrix of the fully connected layer; is the bias vector of the fully connected layer; is the transpose matrix of Step 215: Constrain the covariance matrix to be symmetric positive definite; The specific calculation of Step 215 is as follows: ; where is the lower triangular matrix generated by the neural network; The specific generation method is to fill the covariance matrix parameter into the lower triangular matrix in row-major order; For example, when the dimension d of the lower triangular matrix is 3: ; where the diagonal elements are non-negative.
[0024] is the transposed matrix of ; is reconstructed into a symmetric matrix ; Step 216, perform iterative 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; The loss function used in the iterative training is as follows: ; where is the state estimate value of the Kalman filter, is the state covariance matrix, represents the true observation value at the current time ; represents the trace operation symbol of the matrix, and H represents the observation matrix; The covariance matrix of the statistical characteristics of the observation noise is specifically as follows:
[0025] is a multi-convolutional neural network, represents backpropagation to optimize the network parameters 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; The specific operations of Step 22 are as follows; Step 221, state prediction and covariance prediction; The specific calculations of state prediction and covariance prediction are as follows: ; ; where is the state transition matrix; is the state estimate value at the previous time; is the control input matrix; is the control input vector; is the predicted state value at the current time; is the state covariance matrix at the previous time; is the process noise covariance matrix; is the predicted covariance matrix at the current time, is the transposed matrix of
[0026] Step 222, substitute the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for update; Substitute the covariance matrix of the statistical characteristics of the observation noise into the Kalman filter equation for update, and the calculation is as follows: ; where is the Kalman gain matrix, is the transpose matrix of; Step 223, covariance update and state update; The specific calculation of covariance update and state update is as follows: ;
[0027] where is the identity matrix, is the updated state covariance matrix; is the true observation value at the current moment; Step 224, output the filtered sensor data .
[0028] Step 3, use the double-layer moving window filtering algorithm for the filtered sensor data to extract the effective data set in the sensor; Step 31, perform equally spaced sampling on the filtered sensor data within a continuous time period. The duration of the continuous time period is V minutes, and the equal interval 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; ; Step 32, sort the head and tail data of the first sampling window to obtain a data sample, and calculate the interquartile range , ; where represents the 25% quantile, represents the 75% quantile; Step 33, calculate the data set of the effective range according to the interquartile range ; ; Step 34, remove the maximum and minimum values from the data set of the effective range to obtain the effective data ; ; Step 35, obtain the average value of the valid data within the current window is ; ; is the final result of the first sampling window; Step 36, move the window according to the sliding interval seconds, repeat the above process, and obtain the average value within the range of is ; Step 37, repeat the above operation to obtain the valid data set , is ; Step 4, delete the maximum and minimum values in the valid data set, and calculate the average value of the valid data remaining in the valid data set. The average value is used as the intermediate value, and the intermediate value is the final sensor data.
[0029] 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.
[0030] The specific operation of Step 4 is as follows: remove the maximum and minimum values in the valid data set , and then the average value of the remaining values in the valid data set . The average value is used as the intermediate value, and the intermediate value is the final sensor data.
[0031] 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, which consumes more resources.
[0032] 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 will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A wearable device data stabilization calibration method, characterized in that: The following steps are involved: Step 1, obtaining raw data through the 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 to extract valid data sets from the sensor after filtering; Step 4, delete the maximum and minimum values in the valid data set, and calculate the average of the valid data retained in the valid data set. The average is used as the intermediate value, and the intermediate value is the final sensor data.
2. The wearable device data stabilization calibration method according to claim 1, characterized in that: Step 2: Step 21, inputting the original data into the deep neural network and extracting the statistical characteristics of the observation noise, outputting the statistical characteristics of the observation noise in the form of a covariance matrix, and obtaining a covariance matrix of the statistical characteristics of the observation noise; Step 22, inputting the statistical characteristic covariance matrix of the observation noise into the Kalman filter algorithm model to obtain filtered sensor data.
3. The wearable device data stabilization calibration method according to claim 2, characterized in that: The deep neural network in step 21 is a multiple convolutional neural network, which consists of an input layer, a convolutional layer, an activation layer, a ReLU activation function, a maximum pooling layer, a fully connected layer and an output layer. The multiple convolutional neural network uses a softmax classifier.
4. The wearable device data stabilization calibration method according to claim 3, characterized in that: Step 21: Step 211, the original data is input to the input layer, the input layer inputs the original data to the convolution layer, and the convolution layer performs a convolution operation; Step 212, the activation layer uses the ReLU activation function to activate the result of the convolution operation; Step 213, the maximum pooling layer performs a maximum pooling operation on the activated result; Step 214: The fully connected layer maps the result of the maximum pooling operation to covariance matrix parameters , through the covariance matrix parameters Determine the covariance matrix ; Step 215, constrain the covariance matrix Symmetric positive definite; Step 216, minimize the prediction error of the Kalman filter as the training target and perform cyclic training, and finally obtain the statistical characteristic covariance matrix of the observation noise .
5. The wearable device data stabilization calibration method according to claim 4, characterized in that: The original data is the n historical observation signals at the current time t, recorded as ; The specific calculation of the convolution operation is as follows: , ; in, is the convolution kernel size; For the The convolution kernels are located at The weight parameter of For the The bias parameters of the convolution kernel; It is The convolution kernels are located at The output feature value of For the location and location The nth historical observation signal at the current time t.
6. The wearable device data stabilization calibration method according to claim 5, characterized in that: ReLU activation function Specifically: ; for The eigenvalues obtained after the Relu function; The maximum pooling operation is: ; : No. The feature value after channel pooling; The specific calculation of step 214 is as follows: ; ; in, is the weight matrix of the fully connected layer; is the bias vector of the fully connected layer; for The transposed matrix of Step 215 is specifically calculated as follows: ; in, Lower triangular matrix generated by multiple convolutional neural networks; for The transposed matrix of for Reconstruct into a symmetric matrix ; Loss function used in loop training as follows: ; in, is the state estimate of the Kalman filter, is the state covariance matrix, Indicates the current time The true observed value of represents the trace operator of a matrix, represents the observation matrix; Statistical properties of observation noise Covariance matrix The details are as follows: ; in, is a multi-convolutional neural network, Represents back-propagation optimization of network parameters.
7. The wearable device data stabilization calibration method according to claim 6, characterized in that: The specific operation of step 22 is as follows; Step 221, state prediction and covariance prediction; Step 222: Calculate the statistical characteristic covariance matrix of the observed noise Substitute into the Kalman filter equation for update; Step 223, covariance update and state update; Step 224, output the filtered sensor data .
8. The wearable device data stabilization calibration method according to claim 7, characterized in that: The specific calculations of state prediction and covariance prediction are as follows: ; ; in, is the state transition matrix; is the estimated value of the state 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 of the previous moment; is the process noise covariance matrix; is the prediction covariance matrix at the current moment, for The transposed matrix of .
9. The wearable device data stabilization calibration method according to claim 8, characterized in that: The statistical characteristics covariance matrix of the observation noise Substituting into the Kalman filter equation for the updated calculation is as follows: ; in, is the Kalman gain matrix, for The transposed matrix of The covariance update and state update are calculated as follows: ; ; in, is the identity matrix, is the updated state covariance matrix; is the actual observed value at the current moment.
10. The wearable device data stabilization calibration method according to claim 9, characterized in that: The specific operation of step 3 is as follows: Step 31, the filtered sensor data Perform equal-interval sampling in a continuous time period, the continuous time period is V minutes, and the equal-interval time is seconds, the first sampling window head and tail data are , then the number of data points in a continuous time period ; 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. , ; in, represents the 25% quantile, represents the 75% quantile; Step 33, according to the interquartile range Calculate the effective range of the data set ; ; Step 34: Remove the data set within the valid range Get valid data from the maximum and minimum values ; Step 35: Get valid data in the current window The average of ; Step 36: According to the sliding interval The window is moved in seconds, and the above process is repeated to obtain The average in the range is ; Step 37, repeat the above steps to obtain a valid data set , for .
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
Energy storage battery capacity estimation method based on wavelet packet transformation-deep convolution gated neural network
CN117233627A
Error correction method for detection device
CN119413220A
Method and apparatus for reducing paging overhead in wireless communication system
KR1020220033384A