A method, device and system for enhancing the quality of motion data
Through gravity calibration and filtering processing technology, the motion data of the three-axis acceleration sensor is biased and calibrated and noise is removed, which solves the problem of low data quality caused by hardware differences and achieves efficient and accurate motion data monitoring.
Patent Information
- Application Number
- CN202310969242.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-08-02
AI Technical Summary
The uneven processing level of the three-axis acceleration sensor hardware and the difference in the design of motion monitoring products with built-in accelerometers lead to low quality of motion data, especially when monitoring for a long time, errors and noise problems are serious.
The motion data is biased and calibrated through gravity calibration, the calibration function and calibration value are determined, the calibration function is optimized to reduce data sampling errors caused by hardware, and noise is removed through filtering to improve data quality.
In the case of limited hardware level, it can effectively improve the quality of motion data, reduce sampling errors, improve monitoring accuracy, simplify operations, and reduce costs and cycles.
Smart Images

Figure CN117110649B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and system for enhancing the quality of motion data. Background Art
[0002] The three-axis accelerometer is a type of accelerometer. It works based on the basic principle of acceleration and has the characteristics of small size and light weight. It can measure spatial acceleration and reflect the motion properties of objects. It is the preferred device for collecting human motion data. At present, when collecting human motion data, it is usually necessary to monitor the motion data for a long time in order to better collect and save the data. By analyzing the acceleration data on the three axes in the motion data, we can gain insight into the motion state and characteristics under different physical activity intensities.
[0003] However, due to the uneven hardware processing level of three-axis acceleration sensors and the differences in the design of motion monitoring products with built-in accelerometers, when using them for motion monitoring, the monitored motion data will have errors and noise, which will affect the data quality. In addition, if the motion monitoring cycle is long, the sensor needs to collect data continuously for a long time, which will cause the impact of hardware problems on data quality to continue to magnify, resulting in large errors in the final collected motion data and low data quality. Therefore, how to improve the quality of motion data under the limitation of hardware level has become a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a method, device and system for enhancing the quality of motion data, so as to solve the defect of the prior art that hardware differences affect the quality of collected motion data. The motion data is bias-calibrated through gravity calibration to make it closer to the actual data, reduce data sampling errors caused by hardware reasons, and improve the data quality of the motion data.
[0005] The present invention provides a method for enhancing the quality of motion data, comprising:
[0006] Acquiring motion data, wherein the motion data is acceleration data obtained by collecting data when the three axes of the three-axis acceleration sensor are respectively pointing to the direction of gravity;
[0007] Determine a calibration function in the three axes, and determine calibration values in the three axes based on the calibration function and the motion data;
[0008] Based on the calibration value and the gravitational acceleration in the gravitational direction, optimizing the parameters of the calibration function to obtain an optimal calibration function;
[0009] Based on the optimal calibration functions on the three axes, the acceleration data on the three axes in the motion data are offset calibrated to obtain calibrated motion data.
[0010] According to a method for enhancing the quality of motion data provided by the present invention, the calibration function includes bias and calibration sensitivity;
[0011] The step of determining calibration values in the three axes based on the calibration function and the motion data; and optimizing parameters of the calibration function based on the calibration values and the gravitational acceleration in the gravitational direction to obtain an optimal calibration function includes:
[0012] Determining calibration values in the three axes based on the motion data, and the calibration function and initial values of its offset and calibration sensitivity;
[0013] Based on the calibration value and the gravitational acceleration, determining optimal values of bias and calibration sensitivity in the calibration function along the three axes;
[0014] Based on the optimal value, the bias and calibration sensitivity in the calibration functions along the three axes are optimized to obtain an optimal calibration function.
[0015] According to a method for enhancing the quality of motion data provided by the present invention, the method of determining the optimal values of the bias and calibration sensitivity in the calibration function on the three axes based on the calibration value and the gravitational acceleration comprises:
[0016] Perform residual calculation based on the calibration value and the gravitational acceleration to obtain residual values in the three axes;
[0017] Based on the residual value, the parameters are optimized by the least square method to obtain the optimal values of the bias and calibration sensitivity in the calibration function in the three axes.
[0018] According to a method for enhancing the quality of motion data provided by the present invention, based on the optimal calibration function on the three axes, the acceleration data on the three axes in the motion data are bias-calibrated to obtain calibrated motion data, and then the method further includes:
[0019] Based on the acceleration data in the three axes in the calibration motion data, determining first arrays corresponding to the acceleration data in the three axes respectively;
[0020] Dividing the acceleration data in the first array into equal lengths to obtain a plurality of sub-arrays;
[0021] Based on the range of each sub-array, filtering the acceleration data in the first array to obtain filtered acceleration data;
[0022] Filtered motion data is determined based on the filtered acceleration data in the three axes and the acceleration data in the three axes in the calibration motion data.
[0023] According to a method for enhancing the quality of motion data provided by the present invention, based on the range of each sub-array, filtering is performed on the acceleration data in the first array to obtain filtered acceleration data, including:
[0024] When the extreme difference of any sub-array is less than or equal to the difference threshold, determine the target acceleration data corresponding to the acceleration data in any sub-array from the acceleration data in the second array, where the acceleration data in the second array is obtained by filtering the acceleration data in the first array;
[0025] Replacing the acceleration data in any sub-array with the target acceleration data to obtain filtered acceleration data corresponding to any sub-array;
[0026] When the extreme difference of any sub-array is greater than the difference threshold, the acceleration data in the any sub-array is determined as the filtered acceleration data corresponding to the any sub-array;
[0027] Based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data in the corresponding axial direction is determined.
[0028] According to a method for enhancing the quality of motion data provided by the present invention, the filtering motion data is determined based on the filtered acceleration data on the three axes and the acceleration data on the three axes in the calibration motion data, including:
[0029] Determine acceleration data in a vector and direction based on the acceleration data in the three axes in the calibration motion data;
[0030] Based on the acceleration data in the vector and direction, and the filtered acceleration data in the three axes, filtered motion data is determined.
[0031] The present invention also provides a motion data quality enhancement device, comprising:
[0032] An acquisition unit, used to acquire motion data, wherein the motion data is acceleration data acquired when the three axes of the three-axis acceleration sensor are respectively pointed to the direction of gravity;
[0033] a calculation unit, configured to determine a calibration function in the three axial directions, and determine calibration values in the three axial directions based on the calibration function and the motion data;
[0034] An optimization unit, configured to optimize parameters of the calibration function based on the calibration value and the gravitational acceleration in the gravitational direction to obtain an optimal calibration function;
[0035] The calibration unit is used to perform bias calibration on the acceleration data in the three axes in the motion data based on the optimal calibration functions in the three axes to obtain calibrated motion data.
[0036] The present invention also provides a motion data quality enhancement system, comprising a three-axis acceleration sensor and a motion data quality enhancement device;
[0037] Wherein, the three-axis acceleration sensor is used to collect data when the three axes are respectively pointing to the direction of gravity, obtain motion data, and transmit the motion data to the quality enhancement device of the motion data;
[0038] The quality enhancement device of the motion data is used to acquire the motion data, and based on the motion data and the calibration functions on the three axes, determine the calibration values on the three axes, based on the calibration values and the gravitational acceleration in the gravity direction, perform parameter optimization on the calibration function to obtain an optimal calibration function, and based on the optimal calibration function on the three axes, perform bias calibration on the acceleration data on the three axes in the motion data to obtain calibrated motion data.
[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for enhancing the quality of motion data as described in any one of the above is implemented.
[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for enhancing the quality of motion data.
[0041] The present invention provides a method, device and system for enhancing the quality of motion data. The calibration values on the three axes are determined through calibration functions and motion data on the three axes. The motion data is acceleration data obtained by collecting data when the three axes in a three-axis acceleration sensor are respectively pointed to the directions of gravity. The calibration function is parameter optimized according to the calibration value and the gravity acceleration in the direction of gravity. According to the optimized optimal calibration function, the acceleration data on the three axes in the motion data are bias-calibrated to obtain calibrated motion data, thereby improving the quality of the motion data and overcoming the defects of large errors and low quality of the motion data collected due to hardware differences in traditional solutions. The sampling error is reduced and the data quality is improved by bias calibration of the motion data. The quality problem of the motion data can be effectively improved under the premise of limited hardware level, thus laying a foundation for the smooth development of motion monitoring and the improvement of the accuracy of motion monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 is a flow chart of a method for enhancing the quality of motion data provided by the present invention;
[0044] Figure 2 It is a comparison diagram of the effectiveness of the motion data provided by the present invention before and after the bias calibration;
[0045] Figure 3 It is a comparison diagram of the effectiveness of the calibration motion data provided by the present invention before and after filtering;
[0046] Figure 4 is an overall flow chart of the bias calibration process of motion data provided by the present invention;
[0047] Figure 5 is an overall flow chart of the filtering process of calibrating motion data provided by the present invention;
[0048] Figure 6 is a schematic structural diagram of a motion data quality enhancement device provided by the present invention;
[0049] Figure 7 is a schematic structural diagram of a motion data quality enhancement system provided by the present invention;
[0050] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] At present, when motion monitoring is performed through a three-axis acceleration sensor, due to the uneven hardware processing level of the three-axis acceleration sensor and the differences in product design, the collected motion data will have errors and contain noise, which reduces the data quality.
[0053] Furthermore, if the motion monitoring cycle is long, the sensor needs to collect data continuously for a long time, which will cause the impact of hardware problems on data quality to be continuously magnified, resulting in large errors in the motion data collected and low data quality. For this situation, more attention is currently paid to the hardware design level and the processing technology level, that is, to improve the hardware differences by optimizing the product hardware design and improving the processing technology, so as to improve the quality of the collected motion data. However, improvements in hardware design and processing technology often require a lot of resources, are too costly, have a long cycle, and are not very feasible.
[0054] In this regard, the present invention provides a method for enhancing the quality of motion data, which aims to make improvements at the software algorithm level. By performing bias calibration on the motion data to reduce sampling errors, the data quality can be improved. Furthermore, under the premise of limited hardware level, the quality problem of motion data can be effectively improved, thereby laying a foundation for the smooth development of motion monitoring and breakthroughs in motion monitoring efficiency and accuracy. Figure 1 FIG. 1 is a flow chart of a method for enhancing the quality of motion data of the present invention. Figure 1 As shown, applied to a three-axis acceleration sensor, the method includes:
[0055] Step 110, acquiring motion data, where the motion data is acceleration data acquired when the three axes of the three-axis acceleration sensor are respectively pointing to the direction of gravity;
[0056] Specifically, before performing quality enhancement, it is first necessary to obtain the motion data to be processed, that is, the motion data with errors that need to be corrected and the quality restored. Since the three-axis acceleration sensor has the advantages of small size, light weight, and easy to carry, and can measure spatial acceleration and reflect the nature of motion, in an embodiment of the present invention, a three-axis acceleration sensor is selected as a data acquisition device to monitor and collect motion data.
[0057] Here, the three-axis acceleration sensor can be a piezoresistive, piezoelectric or capacitive type, and the embodiment of the present invention does not specifically limit this. Based on this, the acceleration generated when data is collected is proportional to the changes in resistance, voltage and capacitance, and can be collected through corresponding amplification and filtering circuits. In addition, it is worth noting that in the embodiment of the present invention, the motion monitoring based on the three-axis acceleration sensor includes the monitoring of physical activities and the monitoring of static activities. By analyzing the acceleration data on the three axes in the motion data collected by monitoring, the motion state and characteristics under different physical activity intensities can be understood.
[0058] It can be understood that in the actual process of motion monitoring and motion data collection, the three-axis acceleration sensor can be started first and the sampling frequency can be configured for it to enable it to collect data and thus obtain motion data. The three-axis acceleration sensor used for data collection here can be the three-axis acceleration sensor itself, or it can be a data acquisition device with a built-in three-axis acceleration sensor, or it can be a data acquisition system connected to a three-axis acceleration sensor. The embodiment of the present invention does not make specific limitations on this.
[0059] Specifically, after starting the three-axis acceleration sensor, the three axes x, y and z of the three-axis acceleration sensor can be respectively pointed to the direction of gravity (g direction) and kept still, and data for a period of time can be collected, and the acceleration data on the axis (gravity axis) can be taken to obtain motion data. The motion data can be expressed as x = [x1, x2, ..., xn], y = [y1, y2, ..., yn], z = [z1, z2, ..., zn]. For example, a sampling frequency of 30HZ can be configured to collect acceleration data for about 5 minutes. After the collection is completed, an offline data set containing about 10,000 samples can be obtained.
[0060] Here, we take the z-axis pointing to the direction of gravity as an example. When the z-axis points to the direction of gravity, the data set contains x=[x1,x2,…,x10000], y=[y1,y2,…,y10000], z=[z1,z2,…,z10000]. Since the bias calibration method for error correction of motion data uses gravity calibration, only the acceleration data z collected in the direction of gravity is taken. Similarly, when the x-axis and y-axis point to the direction of gravity respectively, the acceleration data x and y collected in the direction of gravity are also selected, and finally the motion data to be processed can be obtained.
[0061] Ideally, the 10,000 sample values contained in the acceleration data z collected in the gravity direction should be consistent with the gravity acceleration g = 9.8 m / s 2equal, that is, z=[9.8,9.8,…,9.8]. However, in the actual sampling process, sampling errors will occur when the device is stationary, so the actual observed value of the sample in z is often not 9.8, that is, there is an error / bias. Therefore, it is necessary to perform error correction to improve the data quality, that is, perform steps 120 to 140 to reduce the sampling error caused by hardware reasons and restore the data quality.
[0062] Here, it is worth noting that, unlike the actual data collection of the three-axis acceleration sensor, the real human motion data obtained in the embodiment of the present invention is to correct the sampling error when the device is stationary, and the axis is pointed in the direction of gravity to collect acceleration data in the direction of gravity for bias calibration. In the process of actually collecting human motion data, there is no need to deliberately collect acceleration data in the direction of gravity. In short, the motion data in the embodiment of the present invention is fixedly collected corresponding to the bias calibration process of gravity calibration. Once the optimal calibration function is determined, data collection can be carried out normally to obtain real human motion data without deliberately collecting acceleration data in the direction of gravity.
[0063] Step 120, determining calibration functions in three axes, and determining calibration values in three axes based on the calibration functions and the motion data;
[0064] Step 130, optimizing the parameters of the calibration function based on the calibration value and the gravitational acceleration in the gravity direction to obtain an optimal calibration function;
[0065] Step 140 , based on the optimal calibration functions on the three axes, bias calibration is performed on the acceleration data on the three axes in the motion data to obtain calibrated motion data.
[0066] Specifically, after obtaining the motion data at step 110, the calibration values in the three axes can be calculated accordingly, and the calibration function can be optimized according to the calibration values. The offset calibration can be performed according to the optimized calibration function. This process can specifically include:
[0067] First, the calibration functions in the three axes can be determined, that is, calibration functions are established for the acceleration data in the three axes. The calibration functions include parameter bias and calibration sensitivity. Before calculation is performed based on the calibration function, initial values for the bias and calibration sensitivity need to be set.
[0068] Then, the calibration value of each axis can be calculated based on the calibration function and the motion data, that is, the motion data can be substituted into the calibration function to solve it to obtain the calibrated values of the acceleration data in the three axes, that is, the calibration values in the three axes.
[0069] However, since the calibration value calculated here is based on the set initial values of the bias and calibration sensitivity, and the set initial values are often not the optimal values for the corresponding scene and axis, the calibration value calculated at this time cannot be used as the final value, and the calibration function needs to be optimized to obtain the final calibration motion data according to the optimized calibration function.
[0070] That is, the calibration function can be optimized and calculated based on the calibration value to update and optimize the parameters of the calibration function, thereby obtaining an optimized calibration function, which can be referred to as the optimal calibration function. Specifically, it can be based on the calibration value in the corresponding axis and combined with the gravitational acceleration in the gravity direction (g = 9.8 m / s 2 ) is optimized to optimize the parameters of the calibration function, thereby obtaining an optimized calibration function, that is, the optimal calibration function in the three axes.
[0071] Afterwards, the motion data can be bias-calibrated according to the optimal calibration function to obtain the final calibration data, i.e., the calibrated motion data. Specifically, here, the acceleration data in the three axes in the motion data can be bias-calibrated according to the optimal calibration functions in the three axes, i.e., the acceleration data in the x-axis direction in the motion data can be calibrated using the optimal calibration function in the x-axis direction to calibrate the error / bias therein to obtain the calibrated acceleration data in the x-axis direction, i.e., the calibrated motion data in the x-axis direction.
[0072] Similarly, the optimal calibration function along the y-axis can be used to calibrate the acceleration data along the y-axis in the motion data, and the optimal calibration function along the z-axis can be used to calibrate the acceleration data along the z-axis in the motion data to obtain the calibrated motion data along the y-axis and the acceleration data along the z-axis. After summarizing, the calibrated motion data can be obtained.
[0073] Figure 2 is a comparison chart of the performance of the motion data provided by the present invention before and after the bias calibration, such as Figure 2 As shown in the figure, by comparing the acceleration data before and after calibration, it can be seen that the offset calibration of gravity calibration can correct the offset caused by hardware differences during data acquisition, so that the acceleration data collected in the direction of gravity can approach the gravity acceleration g = 9.8m / s after calibration. 2 , or even equal to g, which reduces the sampling error and thus improves the data quality of the motion data.
[0074] Different from the traditional solution that improves the quality of motion data from the hardware design and processing technology level, the embodiment of the present invention processes from the software algorithm level. By calibrating the bias of the motion data, it can make it closer to the real data and reduce the sampling error caused by hardware reasons, thereby improving the data quality. At the same time, it also avoids the problems of high cost, long cycle, great difficulty and poor feasibility when improving the data quality through hardware in the traditional solution.
[0075] In the embodiment of the present invention, the motion data is processed by the gravity-calibrated paranoid calibration method, and the quality can be enhanced quickly and accurately through simple operations without relying on additional equipment such as a turntable and strict experimental conditions. The quality problem of the motion data is effectively improved, and the data quality is improved, which provides strong support for the smooth development of motion monitoring and breakthroughs in motion monitoring efficiency and accuracy.
[0076] The method for enhancing the quality of motion data provided by the present invention determines the calibration values on the three axes through the calibration functions and motion data on the three axes, wherein the motion data is the acceleration data obtained by collecting data when the three axes in the three-axis acceleration sensor are respectively pointed to the directions of gravity; the calibration function is optimized according to the calibration values and the gravity acceleration in the direction of gravity, and the acceleration data on the three axes in the motion data are bias-calibrated according to the optimized optimal calibration function to obtain calibrated motion data, thereby improving the quality of the motion data and overcoming the defects of the traditional scheme that the motion data collected has large errors and low quality due to hardware differences, and reducing the sampling error and improving the data quality by bias-calibrating the motion data, which can effectively improve the quality problem of the motion data under the premise of limited hardware level, and lay a foundation for the smooth development of motion monitoring and the improvement of the accuracy of motion monitoring.
[0077] Based on the above embodiment, the calibration function includes bias and calibration sensitivity;
[0078] Based on the calibration function and the motion data, the calibration values in the three axes are determined; based on the calibration values and the gravitational acceleration in the gravity direction, the calibration function is parameter optimized to obtain the optimal calibration function, including:
[0079] Determining calibration values in three axes based on the motion data, and the calibration function and initial values of its bias and calibration sensitivity;
[0080] Based on the calibration values and the gravitational acceleration, optimal values of the bias and calibration sensitivity in the calibration functions along the three axes are determined;
[0081] Based on the optimal value, the bias and calibration sensitivity in the calibration function in the three axes are optimized to obtain the optimal calibration function.
[0082] Specifically, in step 120 and step 130, the calibration values in three axes are determined according to the calibration function and the motion data, and the parameters of the calibration function are optimized according to the calibration values and the gravity acceleration in the gravity direction to obtain the optimal calibration function, which may specifically include:
[0083] First, since the initial values of bias and calibration sensitivity are set for the calibration functions on each axis when establishing the calibration functions on the three axes, the initial values of bias and calibration sensitivity can be assigned to the corresponding parameters in the calibration functions on the corresponding axes to form a complete calibration equation containing only input and output unknowns, that is, a complete calibration function on the three axes; the calibration function here can be expressed as:
[0084] acc_cali=(acc_raw+offset)*r
[0085] Among them, acc_raw is the input, that is, the acceleration data on the corresponding axis in the motion data, acc_cali is the output, that is, the calibration value on the corresponding axis, offset is the offset, and r represents the calibration sensitivity.
[0086] Then, the motion data can be substituted into this complete calibration equation / function to obtain the output value of the calibration function, i.e., the calibration value. Specifically here, the acceleration data in the three axes in the motion data are substituted into the calibration equation / function in the corresponding axis to solve the output value, i.e., the calibration value in the three axes.
[0087] Then, the calibration value and the gravitational acceleration in the direction of gravity can be used to calculate the optimal value of the bias and calibration sensitivity in the calibration function. Specifically, the calibration value in the corresponding axis and the gravitational acceleration in the direction of gravity (g = 9.8 m / s 2 ) are combined to form a data pair, and optimization calculation is performed on the data pair to obtain the optimal values of the bias and calibration sensitivity in the calibration function on the corresponding axis. The above calculation process is repeated to finally obtain the optimal values of the bias and calibration sensitivity in the calibration function on the three axes.
[0088] Afterwards, the optimal value can be used to update and optimize to obtain the optimal calibration function, that is, the calibration function on the corresponding axis can be optimized according to the optimal values of the offset and calibration sensitivity on each axis, and the values of the offset and calibration sensitivity in the update function can be replaced by the optimal values to obtain the updated calibration function, that is, the optimal calibration function. The optimal calibration function here can be expressed as:
[0089] acc_cali x=(acc_raw x +offset x )*r x
[0090] acc_cali y =(acc_raw y +offset y )*r y
[0091] acc_cali z =(acc_raw z +offset z )*r z
[0092] Where acc_raw x The input of the calibration function in the x-axis direction is the acceleration data in the x-axis direction of the motion data, acc_cali x is the output of the calibration function on the x-axis, that is, the calibration value on the x-axis, offset x is the optimal value of the bias in the calibration function along the x-axis, r x is the optimal value of the calibration sensitivity in the calibration function along the x-axis.
[0093] acc_raw y The input of the calibration function on the y-axis is the acceleration data on the y-axis in the motion data, acc_cali y is the output of the calibration function on the y-axis, that is, the calibration value on the y-axis, offset y is the optimal value of the bias in the calibration function along the y-axis, r y is the optimal value of the calibration sensitivity in the calibration function along the y-axis.
[0094] acc_rw z The input of the calibration function in the z-axis direction is the acceleration data in the z-axis direction in the motion data. z is the output of the calibration function in the z-axis direction, that is, the calibration value in the z-axis direction, offset z is the optimal value of the offset in the calibration function along the z-axis, r z is the optimal value of the calibration sensitivity in the calibration function along the z-axis.
[0095] Based on the above embodiment, based on the calibration value and the gravitational acceleration, the optimal values of the bias and calibration sensitivity in the calibration function on the three axes are determined, including:
[0096] Based on the calibration value and gravity acceleration, residual calculation is performed to obtain residual values in three axes;
[0097] Based on the residual values, the parameters are optimized by the least square method to obtain the optimal values of bias and calibration sensitivity in the calibration function in the three axes.
[0098] Specifically, the process of determining the optimal values of the bias and calibration sensitivity in the calibration function on the three axes according to the calibration value and the gravitational acceleration may specifically include:
[0099] First, residual calculation can be performed based on the calibration value and gravity acceleration to obtain residual values in three axes, that is, the calibration value and gravity acceleration in the gravity direction (g = 9.8m / s 2 ) calculates the residual to obtain the residual value. Specifically, the calibration value and the gravitational acceleration are combined to form a data pair to obtain data pairs on three axes. Then, the residual is calculated for each data pair on each axis to obtain the residual value on each axis. Here, the residual calculation formula can be:
[0100] Res = g-acc_cali
[0101] Among them, Res represents the residual value, g is the acceleration of gravity, g = 9.8m / s 2 acc_cali is the calibration value in the corresponding axis.
[0102] Subsequently, the optimization calculation can be performed based on the residual value to obtain the optimal value of the bias and calibration sensitivity in the calibration function on the corresponding axis. Specifically, the least square method can be used to optimize the parameters based on the residual value to obtain the optimal value of the bias and calibration sensitivity in the calibration function on the three axes. Here, the calculation formula of the optimal value can be expressed as:
[0103]
[0104] Wherein, (offset, r) is the optimal value of bias and calibration sensitivity in the calibration function on the corresponding axis, n is the number of samples, that is, the number of acceleration data on the corresponding axis in the motion data, and Res is the residual value on the corresponding axis.
[0105] Based on the above embodiment, based on the optimal calibration functions on the three axes, the acceleration data on the three axes in the motion data are offset calibrated to obtain the calibrated motion data, and then the following is further included:
[0106] Based on the acceleration data on the three axes in the calibration motion data, determine the first arrays corresponding to the acceleration data on the three axes respectively;
[0107] The acceleration data in the first array is divided into equal lengths to obtain a plurality of sub-arrays;
[0108] Based on the range of each sub-array, the acceleration data in the first array is filtered to obtain filtered acceleration data;
[0109] The filtered motion data is determined based on the filtered acceleration data in the three axes and the acceleration data in the three axes in the calibration motion data.
[0110] Considering that the motion data obtained through data collection by the three-axis acceleration sensor not only has sampling error problems, but also noise problems, that is, it often contains certain noise components, after completing the bias calibration of the motion data through the bias calibration method of gravity calibration, the calibrated motion data can also be filtered (adaptive filtering) to filter out the noise components and further optimize the data quality.
[0111] Specifically, after the motion data is bias calibrated to obtain the calibrated motion data, during the filtering process, the calibrated motion data can be processed first to generate a corresponding array, that is, the acceleration data in the three axes are respectively extracted to form a corresponding array, so that the arrays s_raw corresponding to the acceleration data in the three axes can be obtained. For the sake of distinction, this array s_raw is referred to as the first array here.
[0112] Next, the acceleration data in the first array s_raw may be divided into equal lengths to obtain a plurality of sub-arrays, that is, the acceleration data in s_raw may be grouped into equal length slices to obtain a plurality of sub-arrays, each sub-array S containing n samples, S = [s1, s2, ..., sn]. Here, the value of the length n will affect the final result, so as a preferred embodiment of the present invention, the sampling frequency may be used as a reference value of the group length n.
[0113] Subsequently, the range of each sub-array can be calculated, that is, the difference between the maximum value and the minimum value in the sub-array Diff(S) = Max(s) – Min(s) can be calculated. Then, the acceleration data in the first array can be filtered based on this difference to obtain filtered acceleration data. Specifically, when filtering is required based on the range of each sub-array, the acceleration data in the first array can be filtered to obtain filtered acceleration data, which is referred to as filtered acceleration data here.
[0114] Specifically, it is possible to first determine whether it is necessary to filter the acceleration data in the corresponding axis of the calibration motion data based on the range of the sub-array, specifically, to filter the acceleration data in the sub-array in the acceleration data in the corresponding axis, that is, when the range reflects that the gap between the acceleration data in the corresponding sub-array is small (for example, 0.1), it indicates that the acceleration data in the sub-array contains noise, which will cause the motion data to be distorted, and therefore, it is necessary to filter and reduce noise in the acceleration data in the sub-array; conversely, when the range reflects that the gap between the acceleration data in the corresponding sub-array is large, it indicates that the acceleration data in the sub-array does not contain noise, and the motion data is close to the true value, and therefore, no filtering is required.
[0115] Furthermore, when the extreme difference reflection needs to be filtered, the acceleration data in the corresponding subarray can be filtered to obtain filtered acceleration data. Correspondingly, when the extreme difference reflection does not need to be filtered, the acceleration data in the corresponding subarray can be directly retained and used as the filtered acceleration data corresponding to the corresponding subarray. All subarrays and all axes are traversed to obtain the filtered acceleration data corresponding to the acceleration data in the calibration motion data.
[0116] Then, the final filtered data can be determined based on the filtered acceleration data in the three axes, that is, the final filtered motion data obtained by filtering the calibration motion data; here, specifically, on the basis of the filtered acceleration data in the three axes, combined with the acceleration data in the three axes in the calibration motion data, calculations are performed to obtain the filtered motion data.
[0117] Based on the above embodiment, based on the range of each sub-array, the acceleration data in the first array is filtered to obtain filtered acceleration data, including:
[0118] When the extreme difference of any sub-array is less than or equal to the difference threshold, determining the target acceleration data corresponding to the acceleration data in the sub-array from the acceleration data in the second array;
[0119] Replacing the acceleration data in the sub-array with the target acceleration data to obtain filtered acceleration data corresponding to the sub-array, wherein the acceleration data in the second array is obtained by filtering the acceleration data in the first array;
[0120] When the extreme difference of any sub-array is greater than the difference threshold, the acceleration data in the sub-array is determined as the filtered acceleration data corresponding to the sub-array;
[0121] Based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data in the corresponding axial direction is determined.
[0122] Specifically, the process of filtering the acceleration data in the first array according to the range of each sub-array to obtain filtered acceleration data specifically includes the following steps:
[0123] First, a threshold corresponding to the range, ie, a difference threshold, can be determined. This difference threshold is used to characterize the critical value of the filtering process, ie, the minimum value of the range (the difference between the maximum and minimum values) between acceleration data caused by noise that can be tolerated / accepted.
[0124] Next, a state function can be established based on the difference threshold to determine whether the acceleration data in the corresponding subarray needs to be filtered. Here, the state function can be expressed as The initial value of state(S) is 0, and a is the difference threshold.
[0125] Here, the difference threshold can be obtained through a sinusoidal vibration test, that is, a sinusoidal vibration test is performed under different frequencies and amplitudes to test the acquisition accuracy of the triaxial acceleration sensor, and the experimental data is visualized. A section of data containing more noise is selected for slicing to obtain m groups of data, and the difference Diff between the maximum and minimum values in each group of data is calculated respectively, and the mean of Diff of all groups is obtained, that is, This average is used as a reference value for the difference threshold a. In addition, a segment of real motion data containing different motion amplitudes can also be collected to observe when more noise is generated, and the data of the corresponding segment can be intercepted to calculate the difference threshold a.
[0126] Furthermore, when the value of the state function is 0, that is, when the extreme difference of the corresponding sub-array is less than or equal to the difference threshold, filtering processing is required at this time. Specifically, the acceleration data in the second array after filtering is used to process the acceleration data in the corresponding sub-array in the first array, so as to obtain the filtered acceleration data corresponding to the corresponding sub-array. Here, the acceleration data in the second array s_filter is obtained after the acceleration data in the first array s_raw is subjected to Kalman filtering fk.
[0127] That is, when the extreme difference of the corresponding sub-array is less than or equal to the difference threshold, the acceleration data corresponding to the acceleration data in the sub-array can be intercepted from the second array as the target acceleration data; that is, when state(S) = 0, the acceleration data corresponding to S (acceleration data after Kalman filtering) fk(S) is intercepted from s_filter as the target acceleration data. After that, the acceleration data in the corresponding sub-array can be replaced with the target acceleration data to obtain the filtered acceleration data corresponding to the sub-array, that is, the acceleration data in the sub-array S is replaced with the target acceleration data fk(S) to obtain the filtered acceleration data corresponding to S.
[0128] Correspondingly, when the value of the state function is 1, that is, when the extreme difference of the corresponding subarray is greater than the difference threshold, no filtering is required at this time, so the acceleration data in the subarray can be directly used as the filtered acceleration data corresponding to the subarray; that is, when state(S) = 1, the acceleration data in S remains unchanged as the filtered acceleration data corresponding to S. Repeat the above process, traverse all subarrays, and obtain the filtered acceleration data corresponding to each subarray.
[0129] Finally, the filtered acceleration data on the corresponding axis can be determined based on the filtered acceleration data corresponding to each sub-array. That is, the acceleration data on each axis can be determined by taking the axis as a unit and the multiple sub-arrays into which the first array is divided. The filtered acceleration data on this axis can be determined based on the filtered acceleration data corresponding to these multiple sub-arrays. The filtered motion data on the three axes can be obtained by traversing all the axes. This data is the final motion data obtained by adaptively filtering the calibrated motion data to remove the noise components therein.
[0130] Figure 3 is a comparison chart of the effectiveness of the calibration motion data provided by the present invention before and after filtering, such as Figure 3 As shown in the figure, by comparing the acceleration data before (raw) and after (adaptive) adaptive filtering, it can be seen that the noise generated by hardware differences in different motion conditions during the sampling process can be removed through adaptive filtering, thereby further improving the data quality.
[0131] Based on the above embodiment, based on the filtered acceleration data on three axes and the acceleration data on three axes in the calibration motion data, the filtered motion data is determined, including:
[0132] Determine the acceleration data in the vector and direction based on the acceleration data in the three axes in the calibration motion data;
[0133] Based on the acceleration data in the vector and direction, and the filtered acceleration data in the three axes, the filtered motion data is determined.
[0134] Specifically, the process of determining the filtered motion data according to the filtered acceleration data on three axes and the acceleration data on three axes in the calibration motion data includes:
[0135] First, the acceleration data on the three axes in the calibration motion data can be used to calculate the acceleration data on the three-axis vector and direction. That is, the acceleration data on the three axes in the calibration motion data can be used to calculate the acceleration data on the vector and direction through the vector summation formula. The calculation formula here can be expressed as: Among them, x, y and z are the acceleration data in the x-axis, y-axis and z-axis respectively, and ENMO is the acceleration data in the vector and direction;
[0136] Subsequently, the filtered motion data can be determined based on the acceleration data in the vector and direction, and the filtered acceleration data in the three axes. Specifically, the calculated acceleration data in the vector and direction and the filtered acceleration data in the three axes after adaptive filtering are combined to form the final filtered motion data.
[0137] Based on the above embodiments, the overall process of the method for enhancing the quality of motion data can be divided into two parts, namely, a bias calibration process of gravity calibration and an adaptive filtering process. Figure 4 is an overall flow chart of the bias calibration process of motion data provided by the present invention, Figure 5 is an overall flow chart of the filtering process of the calibration motion data provided by the present invention, such as Figure 4 and Figure 5 As shown, the method specifically includes:
[0138] Among them, the bias calibration process includes: first, obtaining motion data, which is the acceleration data obtained by collecting data when the three axes of the three-axis acceleration sensor point to the direction of gravity respectively; then, determining the calibration function on the three axes, and determining the calibration values on the three axes based on the calibration function and the motion data; then, based on the calibration value and the gravity acceleration in the direction of gravity, optimizing the parameters of the calibration function to obtain the optimal calibration function; then, based on the optimal calibration function on the three axes, bias calibration is performed on the acceleration data on the three axes in the motion data to obtain calibrated motion data.
[0139] Among them, the calibration function includes bias and calibration sensitivity, and the calibration values in the three axes are determined based on the calibration function and the motion data; based on the calibration values and the gravitational acceleration in the gravity direction, the calibration function is parameter optimized to obtain the optimal calibration function, including: based on the motion data, and the calibration function and its initial values of bias and calibration sensitivity, the calibration values in the three axes are determined; based on the calibration values and the gravitational acceleration, the optimal values of the bias and calibration sensitivity in the calibration function in the three axes are determined; based on the optimal values, the bias and calibration sensitivity in the calibration function in the three axes are parameter optimized to obtain the optimal calibration function.
[0140] Further, based on the above embodiment, based on the calibration values and the gravitational acceleration, the optimal values of the bias and calibration sensitivity in the calibration function in the three axes are determined, including: performing residual calculations based on the calibration values and the gravitational acceleration to obtain residual values in the three axes; based on the residual values, performing parameter optimization by the least squares method to obtain the optimal values of the bias and calibration sensitivity in the calibration function in the three axes.
[0141] The adaptive filtering process includes: first, based on the acceleration data on the three axes in the calibration motion data, determining the first arrays corresponding to the acceleration data on the three axes respectively; then, dividing the acceleration data in the first array into equal lengths to obtain multiple sub-arrays; then, based on the extreme differences of each sub-array, filtering the acceleration data in the first array to obtain filtered acceleration data; then, determining the filtered motion data based on the filtered acceleration data on the three axes and the acceleration data on the three axes in the calibration motion data.
[0142] Among them, based on the range of each sub-array, the acceleration data in the first array is filtered to obtain filtered acceleration data, including: when the range of any sub-array is less than or equal to the difference threshold, from the acceleration data in the second array, the target acceleration data corresponding to the acceleration data in the sub-array is determined, and the acceleration data in the second array is obtained by filtering the acceleration data in the first array; the acceleration data in the sub-array is replaced by the target acceleration data to obtain the filtered acceleration data corresponding to the sub-array; when the range of any sub-array is greater than the difference threshold, the acceleration data in the sub-array is determined as the filtered acceleration data corresponding to the sub-array; based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data on the corresponding axis is determined.
[0143] Further, based on the filtered acceleration data in three axes and the acceleration data in three axes in the calibration motion data, the filtered motion data is determined, including: determining the acceleration data in the vector and direction based on the acceleration data in the three axes in the calibration motion data; determining the filtered motion data based on the acceleration data in the vector and direction and the filtered acceleration data in three axes.
[0144] The method provided in the embodiment of the present invention solves the defects of the traditional solution in that the motion data collected is large in error, contains noise and has low quality due to hardware differences, by performing bias calibration on the motion data and adaptively filtering the calibrated motion data. It reduces the sampling error, eliminates the noise component and improves the data quality of the motion data. It can effectively improve the quality problem of the motion data under the premise of limited hardware level, and lays the foundation for the smooth development of motion monitoring and the improvement of motion monitoring accuracy.
[0145] The following is a description of a motion data quality enhancement device provided by the present invention. The motion data quality enhancement device described below and the motion data quality enhancement method described above can correspond to each other.
[0146] Figure 6 is a schematic diagram of the structure of the motion data quality enhancement device provided by the present invention, such as Figure 6 As shown, the device comprises:
[0147] An acquisition unit 610 is used to acquire motion data, where the motion data is acceleration data acquired when the three axes of the three-axis acceleration sensor are respectively pointing to the direction of gravity;
[0148] A calculation unit 620, configured to determine a calibration function in the three axes, and determine calibration values in the three axes based on the calibration function and the motion data;
[0149] An optimization unit 630, configured to optimize parameters of the calibration function based on the calibration value and the gravitational acceleration in the gravitational direction to obtain an optimal calibration function;
[0150] The calibration unit 640 is configured to perform bias calibration on the acceleration data in the three axes in the motion data based on the optimal calibration functions in the three axes to obtain calibrated motion data.
[0151] The motion data quality enhancement device provided by the present invention determines the calibration values on the three axes through the calibration functions and motion data on the three axes, wherein the motion data is the acceleration data obtained by data acquisition when the three axes in the three-axis acceleration sensor are respectively pointed to the directions of gravity; the calibration function is optimized according to the calibration value and the gravity acceleration in the direction of gravity, and the acceleration data on the three axes in the motion data are bias-calibrated according to the optimized optimal calibration function to obtain calibrated motion data, thereby improving the quality of the motion data and overcoming the defects of the traditional scheme that the motion data collected has large errors and low quality due to hardware differences, and reducing the sampling error and improving the data quality by bias-calibrating the motion data, which can effectively improve the quality problem of the motion data under the premise of limited hardware level, and lay a foundation for the smooth development of motion monitoring and the improvement of the accuracy of motion monitoring.
[0152] Based on the above embodiment, the calibration function includes bias and calibration sensitivity;
[0153] The optimization unit 630 is used to:
[0154] Determining calibration values in the three axes based on the motion data, and the calibration function and initial values of its offset and calibration sensitivity;
[0155] Based on the calibration value and the gravitational acceleration, determining optimal values of bias and calibration sensitivity in the calibration function along the three axes;
[0156] Based on the optimal value, the bias and calibration sensitivity in the calibration functions along the three axes are optimized to obtain an optimal calibration function.
[0157] Based on the above embodiment, the optimization unit 630 is used for:
[0158] Perform residual calculation based on the calibration value and the gravitational acceleration to obtain residual values in the three axes;
[0159] Based on the residual value, the parameters are optimized by the least square method to obtain the optimal values of the bias and calibration sensitivity in the calibration function in the three axes.
[0160] Based on the above embodiment, the device further includes a filtering unit, which is used to:
[0161] Based on the acceleration data in the three axes in the calibration motion data, determining first arrays corresponding to the acceleration data in the three axes respectively;
[0162] Dividing the acceleration data in the first array into equal lengths to obtain a plurality of sub-arrays;
[0163] Based on the range of each sub-array, filtering the acceleration data in the first array to obtain filtered acceleration data;
[0164] Filtered motion data is determined based on the filtered acceleration data in the three axes and the acceleration data in the three axes in the calibration motion data.
[0165] Based on the above embodiment, the filtering unit is used for:
[0166] When the extreme difference of any sub-array is less than or equal to the difference threshold, determine the target acceleration data corresponding to the acceleration data in any sub-array from the acceleration data in the second array, where the acceleration data in the second array is obtained by filtering the acceleration data in the first array;
[0167] Replacing the acceleration data in any sub-array with the target acceleration data to obtain filtered acceleration data corresponding to any sub-array;
[0168] When the extreme difference of any sub-array is greater than the difference threshold, the acceleration data in the any sub-array is determined as the filtered acceleration data corresponding to the any sub-array;
[0169] Based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data in the corresponding axial direction is determined.
[0170] Based on the above embodiment, the filtering unit is used for:
[0171] Determine acceleration data in a vector and direction based on the acceleration data in the three axes in the calibration motion data;
[0172] Based on the acceleration data in the vector and direction, and the filtered acceleration data in the three axes, filtered motion data is determined.
[0173] Figure 7 is a schematic diagram of the structure of the motion data quality enhancement system provided by the present invention, such as Figure 7 As shown, the system includes a three-axis acceleration sensor 710 and a motion data quality enhancement device 720;
[0174] The three-axis acceleration sensor 710 is used to collect data when the three axes point to the direction of gravity respectively, obtain motion data, and transmit the motion data to the motion data quality enhancement device 720;
[0175] The quality enhancement device 720 of the motion data is used to obtain the motion data, and based on the motion data and the calibration functions on the three axes, determine the calibration values on the three axes, based on the calibration values and the gravitational acceleration in the gravity direction, perform parameter optimization on the calibration function to obtain the optimal calibration function, and based on the optimal calibration function on the three axes, perform bias calibration on the acceleration data on the three axes in the motion data to obtain calibrated motion data.
[0176] The motion data quality enhancement system provided by the present invention comprises a three-axis acceleration sensor and a motion data quality enhancement device, wherein the three-axis acceleration sensor is used to collect motion data and transmit the motion data to the motion data quality enhancement device; the motion data quality enhancement device determines the calibration values on the three axes based on the motion data and the calibration functions on the three axes, optimizes the parameters of the calibration function based on the calibration values and the gravity acceleration in the gravity direction to obtain the optimal calibration function, and based on the optimal calibration function on the three axes, performs bias calibration on the acceleration data on the three axes in the motion data to obtain calibrated motion data, thereby achieving improved quality of motion data and overcoming the defects of large errors and low quality of the collected motion data due to hardware differences, reducing the sampling error and improving the data quality by bias calibration of the motion data, and effectively improving the quality problem of motion data under the premise of limited hardware level, laying a foundation for the smooth development of motion monitoring and the improvement of motion monitoring accuracy.
[0177] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the quality enhancement method of motion data, the method comprising: acquiring motion data, the motion data being acceleration data obtained by data acquisition when the three axes of the three-axis acceleration sensor are respectively pointed to the direction of gravity; determining the calibration function on the three axes, and determining the calibration values on the three axes based on the calibration function and the motion data; optimizing the parameters of the calibration function based on the calibration value and the gravity acceleration in the gravity direction to obtain the optimal calibration function; and performing bias calibration on the acceleration data on the three axes in the motion data based on the optimal calibration function on the three axes to obtain calibrated motion data.
[0178] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0179] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the motion data quality enhancement method provided by the above methods, and the method includes: acquiring motion data, wherein the motion data is acceleration data obtained by data acquisition when the three axes of a three-axis acceleration sensor respectively point to the direction of gravity; determining a calibration function on the three axes, and determining calibration values on the three axes based on the calibration function and the motion data; optimizing parameters of the calibration function based on the calibration value and the gravity acceleration in the direction of gravity to obtain an optimal calibration function; and based on the optimal calibration function on the three axes, performing bias calibration on the acceleration data on the three axes in the motion data to obtain calibrated motion data.
[0180] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the quality enhancement method of motion data provided by the above-mentioned methods, the method comprising: acquiring motion data, the motion data being acceleration data obtained by data acquisition when the three axes of a three-axis acceleration sensor respectively point to the directions of gravity; determining a calibration function in the three axes, and determining calibration values in the three axes based on the calibration function and the motion data; performing parameter optimization on the calibration function based on the calibration value and the gravitational acceleration in the direction of gravity to obtain an optimal calibration function; and performing bias calibration on the acceleration data in the three axes in the motion data based on the optimal calibration function in the three axes to obtain calibrated motion data.
[0181] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0182] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0183] Finally, it should be noted that 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for enhancing the quality of motion data, characterized in that: include: Acquiring motion data, wherein the motion data is acceleration data obtained by collecting data when the three axes of the three-axis acceleration sensor are respectively pointing to the direction of gravity; Determine calibration functions in three axes, and determine calibration values in the three axes based on the calibration functions and the motion data; Based on the calibration value and the gravitational acceleration in the gravitational direction, optimizing the parameters of the calibration function to obtain an optimal calibration function; Based on the optimal calibration functions on the three axes, performing offset calibration on the acceleration data on the three axes in the motion data to obtain calibrated motion data; The calibration function includes bias and calibration sensitivity; Determining calibration values in the three axes based on the calibration function and the motion data; Based on the calibration value and the gravitational acceleration in the gravitational direction, the calibration function is optimized to obtain an optimal calibration function, including: Determining calibration values in the three axes based on the motion data, and the calibration function and initial values of its offset and calibration sensitivity; Based on the calibration value and the gravitational acceleration, residual calculation is performed to obtain residual values on the three axes; based on the residual values, parameter optimization is performed by the least square method to obtain optimal values of bias and calibration sensitivity in the calibration function on the three axes; Based on the optimal value, optimizing the parameters of the bias and calibration sensitivity in the calibration functions in the three axes to obtain an optimal calibration function; Based on the optimal calibration function on the three axes, the acceleration data on the three axes in the motion data are subjected to bias calibration to obtain calibrated motion data, and then the method further includes: Based on the acceleration data in the three axes in the calibration motion data, determining first arrays corresponding to the acceleration data in the three axes respectively; Dividing the acceleration data in the first array into equal lengths to obtain a plurality of sub-arrays; Based on the range of each sub-array, filtering the acceleration data in the first array to obtain filtered acceleration data; Determine filtered motion data based on the filtered acceleration data in the three axes and the acceleration data in the three axes in the calibration motion data; Based on the range of each sub-array, filtering is performed on the acceleration data in the first array to obtain filtered acceleration data, including: When the extreme difference of any sub-array is less than or equal to the difference threshold, determine the target acceleration data corresponding to the acceleration data in any sub-array from the acceleration data in the second array, where the acceleration data in the second array is obtained by filtering the acceleration data in the first array; Replacing the acceleration data in any sub-array with the target acceleration data to obtain filtered acceleration data corresponding to any sub-array; When the extreme difference of any sub-array is greater than the difference threshold, the acceleration data in the any sub-array is determined as the filtered acceleration data corresponding to the any sub-array; Based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data in the corresponding axial direction is determined.
2. The method for enhancing the quality of motion data according to claim 1, characterized in that: The determining of the filtered motion data based on the filtered acceleration data on the three axes and the acceleration data on the three axes in the calibration motion data comprises: Determine acceleration data in a vector and direction based on the acceleration data in the three axes in the calibration motion data; Based on the acceleration data in the vector and direction, and the filtered acceleration data in the three axes, filtered motion data is determined.
3. A motion data quality enhancement device, characterized in that: include: An acquisition unit, used to acquire motion data, wherein the motion data is acceleration data acquired when the three axes of the three-axis acceleration sensor are respectively pointed to the direction of gravity; A calculation unit, configured to determine a calibration function in three axes, and determine calibration values in the three axes based on the calibration function and the motion data; An optimization unit, configured to optimize parameters of the calibration function based on the calibration value and the gravitational acceleration in the gravitational direction to obtain an optimal calibration function; A calibration unit, configured to perform bias calibration on the acceleration data in the three axes in the motion data based on the optimal calibration functions in the three axes to obtain calibrated motion data; The calibration function includes bias and calibration sensitivity; The computing unit is used for: Determining calibration values in the three axes based on the motion data, and the calibration function and initial values of its offset and calibration sensitivity; The optimization unit is used for: Perform residual calculation based on the calibration value and the gravitational acceleration to obtain residual values in the three axes; Based on the residual value, the least square method is used to perform parameter optimization to obtain the optimal values of the bias and calibration sensitivity in the calibration function in the three axes; Based on the optimal value, optimizing the parameters of the bias and calibration sensitivity in the calibration functions in the three axes to obtain an optimal calibration function; Also included is a filtering unit for: Based on the acceleration data in the three axes in the calibration motion data, determining first arrays corresponding to the acceleration data in the three axes respectively; Dividing the acceleration data in the first array into equal lengths to obtain a plurality of sub-arrays; Based on the range of each sub-array, filtering the acceleration data in the first array to obtain filtered acceleration data; Determine filtered motion data based on the filtered acceleration data in the three axes and the acceleration data in the three axes in the calibration motion data; The filtering unit is used for: When the extreme difference of any sub-array is less than or equal to the difference threshold, determine the target acceleration data corresponding to the acceleration data in any sub-array from the acceleration data in the second array, where the acceleration data in the second array is obtained by filtering the acceleration data in the first array; Replacing the acceleration data in any sub-array with the target acceleration data to obtain filtered acceleration data corresponding to any sub-array; When the extreme difference of any sub-array is greater than the difference threshold, the acceleration data in the any sub-array is determined as the filtered acceleration data corresponding to the any sub-array; Based on the filtered acceleration data corresponding to each sub-array, the filtered acceleration data in the corresponding axial direction is determined.
4. A system for enhancing the quality of motion data, characterized in that: comprising a three-axis acceleration sensor, and the motion data quality enhancement device as claimed in claim 3; The three-axis acceleration sensor is used to collect data when the three axes point to the directions of gravity respectively, obtain motion data, and transmit the motion data to the quality enhancement device of the motion data.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for enhancing the quality of motion data according to claim 1 or 2 is implemented.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for enhancing the quality of motion data according to claim 1 or 2 is implemented.
