VR remote control method and system based on gyroscope data fusion
By using error estimation model and dynamic compensation technology, the zero bias value of the gyroscope is dynamically adjusted, and the problem of low pose estimation accuracy when environmental factors change is solved, achieving higher pose estimation accuracy and system reliability.
Patent Information
- Application Number
- CN202510517858.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-24
AI Technical Summary
When faced with changes in environmental factors, the existing VR remote control control methods cannot dynamically adjust the zero deviation value of the gyroscope, resulting in low accuracy of the posture estimation results.
By obtaining the current environment data and gyroscope three-axis data, input it into the pre-trained error estimation model, output the error estimation value and predicted confidence, conduct confidence determination to obtain the zero-bias estimation result, and dynamic compensation is performed to correct the gyroscope data.
The accuracy of pose estimation and the reliability of the system are improved, and reliable pose estimation results can be obtained in complex and changeable environments.
Smart Images

Figure CN120048100A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of VR remote control technology, and particularly to a VR remote control method and system based on gyroscope data fusion. Background Art
[0002] Virtual Reality (VR) technology has made remarkable progress in recent years, providing users with immersive experiences. In a VR system, the remote control is one of the main tools for users to interact with the virtual world, and its accuracy and response speed directly affect the quality of the user experience. To improve the control accuracy of the remote control, sensors such as gyroscopes are integrated to sense the changes in the user's actions and postures. By fusing data from different sensors, more accurate attitude estimation can be achieved, thereby improving the accuracy of remote control operations. However, in practical applications, due to the influence of environmental factors such as temperature, humidity, and mechanical vibration, the sensor data will be interfered, resulting in deviations in the attitude estimation results.
[0003] In an existing technology, a method for attitude estimation based on gyroscope data fusion is to use the Extended Kalman Filter (EKF) algorithm. This method first initializes the sensor parameters, including setting a fixed zero bias value to compensate for the inherent drift error of the gyroscope. Then, using the reference information provided by the accelerometer and magnetometer, combined with the angular velocity data output by the gyroscope, the attitude matrix is updated in real time through a filtering algorithm. The specific steps are as follows: First, obtain the initial attitude information, which depends on the gravity direction and geomagnetic field direction measured by the accelerometer and magnetometer. Next, input this information into the filter, taking into account the angular velocity measured by the gyroscope and compensating according to the preset fixed zero bias value. On this basis, the filter iteratively calculates and updates the attitude estimation result. This method can effectively integrate multi-source sensing information and provide relatively stable and continuous attitude tracking capabilities.
[0004] Although the above method improves the accuracy of attitude estimation to a certain extent, the method of compensating with a fixed zero bias value has obvious limitations. Especially when the influence of environmental factors is not fully considered, it will lead to low accuracy of attitude estimation results. The derivation process shows that when the environmental conditions change, such as the temperature rises or the mechanical structure is deformed by heat, the zero bias of the gyroscope will change accordingly. However, the existing method does not dynamically adjust this parameter, making the originally set zero bias compensation no longer applicable, thus causing a large cumulative error. In addition, the increase in humidity will also affect the working state of electronic components, further exacerbating the measurement error. Mechanical vibration will also interfere with the sensor readings, especially in a high-frequency vibration environment, this interference is particularly significant. Due to not considering these dynamic change factors, the existing compensation mechanism cannot correct the errors caused by external conditions in time, ultimately resulting in the attitude estimation result deviating from the true value, reducing the reliability and accuracy of the entire system, and causing low accuracy of VR remote control. Summary of the Invention
[0005] The present invention provides a VR remote control method and system based on gyroscope data fusion to improve the accuracy of VR remote control.
[0006] In a first aspect, to solve the above technical problems, the present invention provides a VR remote control method based on gyroscope data fusion, including: Obtain the current environmental data, gyroscope three-axis data, and accelerometer data; Input the current environmental data into a pre-trained error estimation model, and output an error estimation value and a prediction confidence level; Perform a confidence determination based on the error estimation value and the prediction confidence level to obtain a zero bias estimation result; Perform an attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result; Perform dynamic compensation based on the zero bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; Perform fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data, and output a final attitude estimation result.
[0007] In an optional implementation manner, the training process of the error estimation model includes: Construct an error estimation model based on historical environmental data and historical zero bias errors, train the model, and determine that the training is completed when the number of training times reaches a preset upper limit or it is detected that the loss function of the model meets the conditions, and obtain the trained model; Input the current environmental data into the trained model to obtain an error estimation value and a prediction confidence level.
[0008] In an alternative embodiment, the confidence determination based on the error estimation value and the prediction confidence to obtain a zero-bias estimation result includes: When the prediction confidence is greater than a preset confidence threshold, the error estimation value is used as the zero-bias estimation result, and subsequent steps are not performed; When the prediction confidence is less than the confidence threshold, supplementary environmental data is acquired; The supplementary environmental data is normalized to obtain normalized environmental data; The error estimation model is retrained based on the normalized environmental data to obtain an optimized model; The current environmental data is input into the optimized model, and the confidence determination of the output confidence and zero-bias error is performed again until the confidence requirement is met.
[0009] In an alternative embodiment, the attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result includes: Low-pass filtering is performed on the gyroscope three-axis data to obtain noise-reduced angular velocity; Discrete integration is performed based on the noise-reduced angular velocity to obtain an attitude angle change amount; Gravity vector decomposition is performed based on the accelerometer data to obtain the device tilt angle; Weighted fusion is performed based on the attitude angle change amount and the device tilt angle to obtain a stable attitude angle; Quaternion conversion is performed based on the stable attitude angle to obtain a preliminary attitude estimation result.
[0010] In an alternative embodiment, the dynamic compensation based on the zero-bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data includes: Mean filtering is performed based on the zero-bias estimation result to obtain a zero-bias correction result; The corrected angular velocity is calculated by the following formula: Wherein, represents the corrected angular velocity, represents the original angular velocity, represents the temperature drift coefficient, represents the temperature change amount, represents the zero-bias correction result; Outlier detection is performed based on the corrected angular velocity to obtain corrected gyroscope data.
[0011] In an alternative embodiment, the fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data to output a final attitude estimation result includes: Perform attitude residual calculation based on the preliminary attitude estimation result and the corrected gyroscope data to obtain the rotation difference amount; Perform weight allocation based on the rotation difference amount to obtain the dynamic fusion coefficient; Perform linear interpolation on the preliminary attitude estimation result according to the dynamic fusion coefficient to obtain the final attitude estimation result.
[0012] In an alternative embodiment, the obtaining of the device tilt angle by decomposing the gravity vector according to the accelerometer data includes: Perform mean filtering on the accelerometer data to obtain the low-frequency gravity component; Perform state analysis on the low-frequency gravity component to obtain the motion state; When the motion state is the moving state, perform motion acceleration compensation on the low-frequency gravity component to obtain the dynamic gravity projection vector; When the motion state is the static state, perform tilt angle calculation on the low-frequency gravity component to obtain the static tilt angle; Perform weighted fusion on the dynamic gravity projection vector and the static tilt angle to obtain the device tilt angle.
[0013] In a second aspect, the present invention provides a VR remote control system based on gyroscope data fusion, including: A data acquisition module for acquiring current environment data, gyroscope three-axis data, and accelerometer data; An error estimation module for inputting the current environment data into a pre-trained error estimation model and outputting an error estimation value and a prediction confidence level; A zero-bias result module for performing confidence determination based on the error estimation value and the prediction confidence level to obtain a zero-bias estimation result; An attitude analysis module for performing attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result; A dynamic compensation module for performing dynamic compensation based on the zero-bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; A fusion correction module for performing fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data and outputting a final attitude estimation result.
[0014] In a third aspect, the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the VR remote control method based on gyroscope data fusion described in any one of the above is implemented.
[0015] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the VR remote control method based on gyroscope data fusion described in any one of the above.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) The process of obtaining the current environmental data, the three-axis gyroscope data, and the accelerometer data ensures a comprehensive understanding of the device's operating environment and its own motion state. High-quality data acquisition provides a reliable basis for subsequent analysis and helps improve the accuracy and reliability of the final attitude estimation result.
[0017] (2) Input the current environmental data into a pre-trained error estimation model, and output an error estimation value and a prediction confidence level. By using the pre-trained model to process the environmental data, it is possible to effectively identify the factors affecting the accuracy of sensor readings and give the corresponding error estimation value and confidence level. This process not only improves the understanding of potential errors but also provides an important basis for subsequent confidence determination.
[0018] (3) Perform confidence determination based on the error estimation value and the prediction confidence level to obtain a zero-bias estimation result. This step realizes the effective estimation of the sensor zero bias through the comprehensive analysis of the error estimation value and its confidence level. Accurate zero-bias estimation is crucial for eliminating systematic biases in sensor measurements and can significantly improve the accuracy of attitude estimation.
[0019] (4) Perform attitude analysis based on the three-axis gyroscope data and the accelerometer data to obtain a preliminary attitude estimation result. Combining multiple sensor data for attitude analysis can make full use of their respective advantages and provide more comprehensive attitude information. This method not only improves the accuracy of attitude estimation but also enhances the robustness of the system, enabling it to operate stably in different working environments.
[0020] (5) Perform dynamic compensation based on the zero-bias estimation result and the three-axis gyroscope data to obtain corrected gyroscope data. Using dynamic compensation technology to correct the gyroscope data can effectively eliminate the influence of error sources such as zero bias, thereby improving the reliability of the gyroscope data. The gyroscope data after dynamic compensation is closer to the true value and provides high-quality input for subsequent attitude fusion correction.
[0021] (6) Perform fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data, and output the final attitude estimation result. By fusing the preliminary attitude estimation result and the corrected gyroscope data, the accuracy of attitude estimation can be further optimized. This method makes full use of information from different sources, improves the accuracy and stability of attitude estimation, and ensures reliable attitude estimation results even in complex and changeable working environments. Description of the Drawings
[0022] Figure 1 is a schematic flowchart of a VR remote control method based on gyroscope data fusion provided by the first embodiment of the present invention; Figure 2 is a schematic structural diagram of a VR remote control system based on gyroscope data fusion provided by the second embodiment of the present invention. Detailed Embodiments
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] Referring to Figure 1 , the first embodiment of the present invention provides a VR remote control method based on gyroscope data fusion, including the following steps: S11. Obtain current environmental data, gyroscope three-axis data, and accelerometer data; S12. Input the current environmental data into a pre-trained error estimation model, and output an error estimation value and a prediction confidence level; S13. Perform confidence determination based on the error estimation value and the prediction confidence level to obtain a zero-bias estimation result; S14. Perform attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result; S15. Perform dynamic compensation based on the zero-bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; S16. Perform fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data, and output the final attitude estimation result.
[0025] In step S11, obtain current environmental data, gyroscope three-axis data, and accelerometer data.
[0026] In one implementation, the current environmental data is collected by the temperature and humidity sensors and the barometric pressure sensor built in the device, transmitted in the form of I2C digital signals, and stored as a 32-bit floating-point array containing timestamps (for example, [25.5, 45.2, 1013] correspond to temperature in °C, humidity in %, and barometric pressure in hPa respectively). It is mainly used to compensate for the zero drift of the sensors caused by environmental factors. The three-axis data of the gyroscope is output by the MEMS gyroscope through the SPI interface at a sampling rate of 200 Hz, and the raw values are stored in the 16-bit two's complement format (when the measurement range is ±2000 dps, it corresponds to 0.065 ° / s / LSB). These data are used to calculate the angular velocity change of the device and update the attitude quaternion. The accelerometer data is used to collect analog signals through the on-board ADC with a 16-bit resolution and converted into a three-dimensional floating-point array in standard gravity unit g (such as [0.12, 0.98, 0.15]). It is used for both the direct calculation of the tilt angle under static conditions and the fusion with the gyroscope data to form the input source for the 9-axis attitude calculation of the IMU. After the three types of data are aligned with the time reference through the hardware time synchronization module, they are written into a circular buffer with a length of 50 frames, providing a time-domain continuous multi-modal input for the subsequent dynamic / static state classifier.
[0027] In one implementation, the current environmental data includes data in two dimensions: environmental temperature and magnetic field intensity. The environmental temperature is measured by a PT100 platinum resistance temperature sensor with a resolution of 0.1 °C, and the magnetic field intensity is collected by a three-axis magnetometer with an accuracy of ±0.15 μT. According to the time-varying characteristics of the environmental parameters (for example, when the temperature drift rate ≤ 0.5 °C / min, a sampling rate of 1 Hz is set; when a 500 μT step change occurs in the magnetic field at the moment of motor start and stop, a transient capture of 100 Hz is enabled), a dynamic adjustment mechanism is used to balance the storage efficiency and the requirement for feature retention (in a steady-state environment, 4:1 lossy compression is enabled to reduce the storage volume by 50%, and 24-bit raw data records are maintained during the transient stage). When recording the data, a timestamp with μs-level accuracy, the device azimuth angle, and the sensor health status flag bit are attached, and finally, it is stored in the HDF5 hierarchical format as an environmental data set containing metadata. This data set will be used as the reference input source for subsequent sensor error compensation and joint criterion for motion state.
[0028] In step S12, the current environmental data is input into a pre-trained error estimation model to output an error estimation value and a prediction confidence level.
[0029] In one implementation, the training process of the error estimation model includes: constructing an error estimation model based on historical environmental data and historical zero bias errors, training the model, and determining that the training is completed when the number of training times reaches the preset upper limit or it is detected that the loss function of the model meets the conditions, obtaining the trained model; inputting the current environmental data into the trained model to obtain an error estimation value and a prediction confidence level.
[0030] It should be noted that the zero-bias error estimate refers to the inherent deviation of the system when the sensor is under static reference conditions (such as when there is no external acceleration or angular velocity input). For example, the zero-bias of a gyroscope is manifested as a non-zero constant value in the three-axis output (such as [0.03, -0.12, 0.08]° / s). Its function is to eliminate the cumulative error of the sensor's inherent deviation on dynamic measurements (such as attitude angle integration) through a compensation algorithm. The prediction confidence is a probabilistic evaluation index output by the model (ranging from 0 to 1), which characterizes the credibility of the current error estimate. For example, a confidence of 0.95 means that the model believes that the probability of the estimated error falling within the range of ±0.1° / s is 95%. This parameter is used to dynamically adjust the weight allocation of the sensor fusion algorithm (such as enabling redundant sensor cross-validation at low confidence).
[0031] In one implementation, the error estimation model is constructed by combining a double-layer bidirectional LSTM network with an attention mechanism. The input layer is the time-series data of environmental parameters (a 60-second sliding window of temperature and magnetic field intensity), and the output layer is the parameters of the Gaussian mixture model (the mean corresponds to the zero-bias error, and the variance is related to the confidence). During training, the batch size is set to 64, the initial learning rate is 0.001 (using the cosine annealing decay strategy), the weighted mean squared error loss function is used (the confidence weight coefficient is set to 2.0), and a regularization layer with a Dropout rate of 0.3 is added. The training termination condition is that the loss decrease amplitude of the validation set is less than 1e-5 for 10 consecutive epochs, or the total number of training times reaches 500 times (whichever triggers first). Finally, the model achieves performance indicators of an average absolute error of 0.05° / s and a confidence calibration error of less than 0.02 on the test set.
[0032] It should be noted that the historical data is collected from a multi-device calibration experimental environment, including the original output of sensors in a temperature cycling chamber (-40°C to 85°C with a 5°C step) and a magnetic field controllable chamber. The true zero-bias value is recorded by a high-precision turntable (the reference accuracy reaches 0.001° / s). The following steps are performed during data processing: outlier removal (filtering transient interference by the 3σ principle, where σ represents the data standard deviation); alignment of environmental parameters and zero-bias error time series (interpolating to fill in missing points); sliding window segmentation (window length of 60 seconds, step size of 10 seconds); data augmentation (adding ±5% temperature noise and time-domain random jitter); 5) normalization processing (scaling environmental parameters to [-1,1], and normalizing zero-bias error according to the range). The final dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0033] In step S13, confidence determination is performed based on the error estimate value and the prediction confidence to obtain a zero-bias estimation result.
[0034] In one implementation, when the prediction confidence is greater than a preset confidence threshold, the error estimate value is used as the zero-bias estimation result, and no subsequent steps are performed; when the prediction confidence is less than the confidence threshold, supplementary environmental data is acquired; the supplementary environmental data is normalized to obtain normalized environmental data; the error estimation model is retrained based on the normalized environmental data to obtain an optimized model; the current environmental data is input into the optimized model, and the confidence of the output confidence and zero-bias error is determined again until the confidence requirement is met.
[0035] It should be noted that the core purpose of setting the confidence threshold is to balance the reliability requirement of the estimation result and the consumption of computing resources. When the prediction confidence is higher than the threshold, it indicates that the current environmental conditions are within the scope covered by the model training, and the error estimate value can be directly adopted; if it is lower than the threshold, it indicates that environmental mutations or sensor anomalies lead to insufficient generalization ability of the model, and the supplementary data acquisition process needs to be triggered. The confidence threshold is set to 0.85, that is, when the confidence is greater than 0.85, the zero-bias estimation result is directly output to avoid redundant calculations.
[0036] In one implementation, the supplementary environmental data is limited to two types: environmental temperature and magnetic field intensity, and its acquisition method is based on a precise sensing device and a specific data association logic. The environmental temperature data is collected in real time by a distributed A-level precision thermocouple. The measurement error of this device is controlled within ±0.3°C. When deploying, multiple monitoring points are set within a radius of 1 meter centered on the device, and finally the average temperature of each point is taken as the environmental characterization value. The magnetic field intensity data is captured by a three-axis fluxgate magnetometer. This device has a resolution of 0.1 μT and records the transient magnetic field disturbance waveform at a high sampling rate of 10 kHz. At the same time, the magnetic field data is associated with the motor start / stop events in the device operation log through timestamp alignment technology. All the collected data is strictly screened during the storage process, and the humidity parameter interference is clearly excluded. Only the triple sequence composed of temperature, magnetic field intensity, and precise timestamp is retained as the effective data set.
[0037] It should be noted that the standardization process realizes the normalized expression of environmental parameters through multi-stage data conversion. First, data cleaning operations are performed, and hard filtering rules are set according to the physical measurement ranges of sensors, including removing abnormal data points where the temperature exceeds 150 °C or the magnetic field strength exceeds 2000 μT. Subsequently, baseline alignment is carried out, converting the original temperature data into the offset relative to the standard laboratory environment of 25 °C, and at the same time mapping the magnetic field strength data to the geomagnetic reference system to eliminate the influence of geographical differences. Next, normalization mapping is implemented. For the temperature parameter, it is linearly scaled to the range of 0 to 1 according to its operating temperature range from minus 40 degrees Celsius to 85 degrees Celsius, and the magnetic field strength is dynamically proportionally adjusted according to the maximum fluctuation range of ±800 μT in historical records. Finally, through time series alignment technology, a 1-millisecond time window is used to perform moving average filtering on the temperature and magnetic field data, effectively suppressing the interference of high-frequency noise on data quality.
[0038] It should be noted that the model retraining adopts an incremental learning framework to achieve dynamic optimization, and its complete process includes five key links. In the initial stage, the newly obtained supplementary environmental data is fused and amplified with the original training set, with emphasis on maintaining the continuity and integrity of the time series. In the parameter adjustment link, by freezing the weight parameters of the underlying feature extraction layer of the neural network, only the fully connected parameters of the output layer are fine-tuned to retain the existing knowledge structure. The learning rate setting adopts a dynamic regulation strategy, reducing the initial learning rate to one-tenth of the original value (such as 0.0001), and introducing an early stopping mechanism to automatically terminate the training when the validation loss has not improved for 3 consecutive training cycles. In the validation stage, 20% of the supplementary data is randomly selected to construct a temporary validation set to evaluate the generalization ability and stability of the model on unknown data. Finally, in the updated decision link, a clear performance improvement threshold is set. When the average confidence improvement of the optimized model on the validation set exceeds 0.15 (for example, from 0.72 to above 0.88), the model replacement program is triggered and the threshold judgment logic of the system is updated synchronously.
[0039] In step S14, attitude analysis is performed based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result.
[0040] In one implementation, low-pass filtering is performed on the gyroscope three-axis data to obtain the noise-reduced angular velocity; discrete integration is performed on the noise-reduced angular velocity to obtain the attitude angle change; gravity vector decomposition is performed on the accelerometer data to obtain the device tilt angle; weighted fusion is performed on the attitude angle change and the device tilt angle to obtain the stable attitude angle; and quaternion conversion is performed on the stable attitude angle to obtain the preliminary attitude estimation result.
[0041] It should be noted that low-pass filtering realizes data purification by filtering out high-frequency noise components in the gyroscope signal. Its core process is to set a specific frequency threshold and use a classical filter for signal processing. Taking an industrial-grade gyroscope as an example, after selecting the cut-off frequency parameter in the design stage, the original angular velocity sequence is calculated point by point through a multi-order difference equation, and the denoised angular velocity after smoothing is output. For example, for the interference signal generated by the high-frequency vibration of the drone motor, the fluctuation amplitude of the angular velocity after filtering can be reduced from plus or minus 3 degrees per second of the original data to plus or minus 0.5 degrees per second, effectively retaining the low-frequency component of the actual rotation of the device. The denoised angular velocity specifically refers to the angular velocity data that can more accurately reflect the actual motion state of the device after this processing.
[0042] It should be noted that discrete integration obtains the change amount of the device's rotation angle by multiplying the denoised angular velocity by the time interval and accumulating. In specific implementation, with a fixed sampling period as the time reference, continuous accumulation operations in the time dimension are performed on the angular velocity data of the three axes respectively. For example, when the device rotates continuously around a certain axis, the angular velocity data collected every 20 milliseconds can be integrated to calculate the actual rotation angle during this time period. It should be noted that due to the existence of the inherent error of the sensor, long-term integration will cause the angle deviation to gradually accumulate, so it is necessary to correct the error regularly through the accelerometer data. In a typical scenario, an angular velocity of 0.5 degrees per second on a certain axis will generate an angle offset of 1 degree after 2 seconds of integration.
[0043] It should be noted that weighted fusion realizes data optimization by dynamically allocating the credibility weights of the gyroscope integration result and the accelerometer tilt angle. The core of this strategy is to automatically adjust the contribution ratio of the two types of sensors according to the device's motion state. For example, a higher weight is given to the gyroscope during high-speed rotation to maintain dynamic response, while the weight ratio of the accelerometer is increased during static or low-speed motion to improve static accuracy.
[0044] It should be noted that quaternion conversion maps the fused stable attitude angle into a four-dimensional hypercomplex form, and this representation method effectively avoids the dimensional locking defect of traditional Euler angles. The conversion process is based on the spatial geometric relationship between the rotation angle and the rotation axis, and the four components of the quaternion are constructed through trigonometric function operations. For example, when the device detects a 30-degree rotation around the X axis, the generated quaternion will reflect the relationship between the rotation angle and the axis direction with a proportional coefficient. The preliminary attitude estimation result provides singularity-free and high-precision input data for the subsequent attitude solution algorithm through this mathematical representation form, and its physical meaning is to completely describe the instantaneous orientation state of the device in three-dimensional space.
[0045] In one implementation, mean filtering is performed on the accelerometer data to obtain a low-frequency gravity component; state analysis is performed on the low-frequency gravity component to obtain a motion state; when the motion state is a moving state, motion acceleration compensation is performed on the low-frequency gravity component to obtain a dynamic gravity projection vector; when the motion state is a stationary state, an inclination angle calculation is performed on the low-frequency gravity component to obtain a static inclination angle; the dynamic gravity projection vector and the static inclination angle are weighted and fused to obtain the device inclination angle.
[0046] It should be noted that by calculating the average value of the accelerometer data within a specific time window, the low-frequency component of the gravitational acceleration is effectively separated. For example, the original acceleration data collected by VR contains high-frequency vibration interference (such as hand shaking). After mean filtering using a sliding window of 10 sampling points, the gravity component representing the overall attitude of the device can be obtained. This process can eliminate instantaneous impact noise (such as the generated spike signal) and ensure the stability of the gravity vector.
[0047] It should be noted that based on the fluctuation characteristics of the low-frequency gravity component, it is judged whether the device is in a stationary or moving state. The specific method is: calculate the variance value of the gravity component within a 3-second time window. If the variance continuously remains below a preset threshold (such as 0.05g², where g represents the gravitational acceleration), it is determined to be in a stationary state; otherwise, if the variance exceeds the threshold and lasts for more than 0.5 seconds, it is determined to be in a moving state. For example, when the user is walking with a VR device, the gravity component will show periodic fluctuations, triggering the recognition of the moving state.
[0048] It should be noted that when the device is in a moving state, the accelerometer data will be mixed with linear motion acceleration (such as the inertial force generated by a sudden brake of a car). At this time, high-pass filtering technology is used to strip the dynamic interference and retain the gravity projection vector. The compensation process estimates the direction of the motion acceleration in real time and reversely cancels the interference component from the original data. For example, when a drone makes a sharp turn, the system reduces the dynamic error of the gravity vector from ±15° to ±3° through the compensation algorithm.
[0049] It should be noted that in a stationary state, the gravity component can be directly decomposed into the axes of the device coordinate system, and the inclination angle is calculated through trigonometric functions. For example, when the gyroscope is placed flat on the table, the gravity component of the Z axis is 1g, and the components of the XY axis are 0. At this time, the inclination angle is 0°; if the X-axis component is detected to be 0.5g, the device is tilted 30° around the Y axis. Here, g represents the gravitational acceleration.
[0050] It should be noted that in the moving state, the dynamic gravity projection vector accounts for 70% of the weight, and the static inclination angle accounts for 30%, ensuring the continuity of attitude tracking during the maneuvering process. The static inclination angle accounts for 90% of the weight, and the dynamic data only serves as a smoothing aid.
[0051] In step S15, dynamic compensation is performed based on the zero-bias estimation result and the gyroscope triaxial data to obtain corrected gyroscope data.
[0052] In one implementation, mean filtering is performed according to the zero-bias estimation result to obtain a zero-bias correction result; The corrected angular velocity is calculated by the following formula: where, represents the corrected angular velocity, represents the original angular velocity, represents the temperature drift coefficient, represents the temperature change, represents the zero-bias correction result; Outlier detection is performed based on the corrected angular velocity to obtain corrected gyroscope data.
[0053] It should be noted that mean filtering eliminates the influence of random fluctuations on the systematic error by calculating the average value of the zero-bias estimation result within a set time window. The selection of the window size directly affects the filtering effect and response speed, and is configured according to the dynamic characteristics of the device. For example, in an industrial-grade inertial measurement unit, if a window of 50 sampling points (corresponding to a time span of 0.5 seconds) is set, the fluctuation amplitude of the zero-bias estimation in a vibrating environment can be reduced from the original plus or minus 0.5 degrees per second to plus or minus 0.1 degrees per second. A too small window will result in insufficient noise suppression, while a too large window will delay the system's response to the actual change of the zero-bias.
[0054] It should be noted that the original angular velocity involved in the formula refers to the measured value directly output by the gyroscope, which includes the superposition of the true rotation signal and the systematic error. The temperature drift coefficient characterizes the rate of change of the sensor error with temperature, and is obtained through experimental calibration of the temperature compensation module, with a value of 0.8. The temperature drift coefficient represents the relative change rate of the gyroscope zero-bias per 1°C change in temperature, with the unit of 1 / °C. The temperature change is the temperature difference between two effective measurements, and its value is collected by the temperature sensor, with the unit of °C. The corrected angular velocity formula dynamically compensates for the angular velocity drift caused by temperature through the product of the temperature drift coefficient and the temperature change. The product of the two represents the relative change rate of the angular velocity caused by temperature change, which is a dimensionless quantity. The zero-bias correction result is the estimated value of the systematic error processed by mean filtering, used to offset the inherent bias of the gyroscope, and has the same unit as the angular velocity unit. For example, when the ambient temperature rises and causes the zero-bias to increase by 0.2 degrees per second, the correction term will accurately deduct this deviation amount to ensure that the output angular velocity only reflects the actual motion.
[0055] In one implementation, outlier detection first calculates the statistical mean and standard deviation of the corrected angular velocity within a sliding time window, and then identifies the outlier data based on the three-sigma principle. The specific process includes: taking the corrected angular velocities of the last 30 sampling points to form a detection window; calculating the arithmetic mean of the window data as the reference value; calculating the absolute deviation of each data point from the reference value and obtaining the standard deviation; marking all data points with deviations exceeding three standard deviations as outliers; and replacing the outliers with forward recursive interpolation. For example, when a VR device encounters electromagnetic interference and a data spike of more than 10 times the normal range suddenly appears in the angular velocity of a certain axis, the detection system will identify it as an anomaly and replace it with the linear interpolation result of the adjacent data before and after to ensure the stability of attitude calculation.
[0056] In step S16, based on the preliminary attitude estimation result and the corrected gyroscope data, fusion correction is performed to output the final attitude estimation result.
[0057] In one implementation, attitude residual calculation is performed based on the preliminary attitude estimation result and the corrected gyroscope data to obtain the rotation difference; weight allocation is performed based on the rotation difference to obtain the dynamic fusion coefficient; and linear interpolation is performed on the preliminary attitude estimation result according to the dynamic fusion coefficient to obtain the final attitude estimation result.
[0058] It should be noted that the rotation difference is used to quantify the deviation between the preliminary attitude estimation result and the attitude calculated from the gyroscope data. The specific process is as follows: First, the preliminary attitude estimation result is aligned with the real-time calculated attitude obtained by integrating the corrected gyroscope data, and then the Euler angle difference or the modulus of the quaternion product between the two in three-dimensional space is calculated. For example, in the attitude control of an unmanned aerial vehicle, if the preliminary attitude provided by the visual SLAM system is 30° around the Z axis, and the result calculated by gyroscope integration is 28.5°, then the rotation difference is 1.5°. The key parameters include the time alignment window (such as 200 ms) and the difference normalization threshold (such as setting the maximum tolerance deviation to 5°), and when the threshold is exceeded, the recalibration mechanism will be triggered.
[0059] It should be noted that the dynamic fusion coefficient dynamically adjusts the credibility weight of the data source according to the magnitude of the rotation difference. The allocation strategy uses a piecewise function: when the difference is less than 2°, 80% weight is given to the preliminary attitude estimation; when the difference is in the range of 2° to 8°, the weight decreases linearly from 80% to 30%; when the difference exceeds 8°, it completely relies on the gyroscope data. For example, when a VR device is quickly turned by the user and the difference reaches 6° due to visual tracking delay, the system will adjust the fusion coefficient to 45% and give priority to the high-frequency response characteristics of the gyroscope. The core parameters include the weight turning point threshold, the attenuation slope coefficient (such as reducing the weight by 8% per degree of difference), and the minimum guarantee weight (not less than 20% to prevent the data source from completely failing).
[0060] It should be noted that linear interpolation weights and synthesizes two-way attitude data based on dynamic fusion coefficients. For attitude data in quaternion form, spherical linear interpolation is used to ensure the shortest rotation path; for Euler angles, axial weighting is directly performed. During specific implementation, the system updates the interpolation result at a period of 10 ms. For example, when the fusion coefficient is 0.6, the final attitude = 0.6 × visual attitude + 0.4 × gyroscope attitude. If the visual system fails briefly due to occlusion, the interpolation algorithm will smoothly transition the weight from 0.8 to 0.2 within 50 ms to avoid sudden changes in the manipulator attitude. The key parameters include the interpolation period (which needs to match the sensor sampling rate), the type of interpolation curve (such as linear / exponential smoothing), and the tolerance range for attitude data format conversion (less than 0.01 radians).
[0061] In summary, the present invention discloses a VR remote control method based on gyroscope data fusion, aiming to improve the accuracy of attitude estimation through a series of steps. First, the method involves obtaining current environmental data, gyroscope three-axis data, and accelerometer data to ensure a comprehensive understanding of the device operating environment and its own motion state. Subsequently, the current environmental data is input into a pre-trained error estimation model, and an error estimation value and a prediction confidence level are output. This process utilizes a model constructed from historical environmental data and zero bias error, providing a basis for identifying factors affecting the accuracy of sensor readings and giving corresponding error estimation values and confidence levels.
[0062] Next, confidence determination is performed based on the error estimation value and the prediction confidence level to obtain a zero bias estimation result. This step realizes the effective estimation of the sensor zero bias through comprehensive analysis of the error estimation value and its confidence level, which is crucial for eliminating systematic biases in sensor measurements. After obtaining the zero bias estimation result, the next step is to perform attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result. This step combines data from multiple sensors, making full use of their respective advantages to provide more comprehensive attitude information, not only improving the accuracy of attitude estimation but also enhancing the robustness of the system, enabling it to operate stably in different working environments.
[0063] To further optimize the attitude estimation results, this method adopts a dynamic compensation technique to correct the gyroscope data, eliminate the influence of error sources such as zero bias, and thus improve the reliability of the gyroscope data. Specifically, this process includes performing mean filtering based on the zero bias estimation results to obtain the zero bias correction results, and calculating the corrected angular velocity using a specific formula. The gyroscope data after dynamic compensation is closer to the true value, providing high-quality input for subsequent attitude fusion correction. Finally, fusion correction is performed based on the preliminary attitude estimation results and the corrected gyroscope data to output the final attitude estimation results. By fusing information from different sources, this method further improves the accuracy and stability of attitude estimation, and reliable attitude estimation results can be obtained even in complex and variable working environments.
[0064] Referring to Figure 2 , the second embodiment of the present invention provides a VR remote control system based on gyroscope data fusion, including: A data acquisition module for acquiring current environmental data, gyroscope three-axis data, and accelerometer data; An error estimation module for inputting the current environmental data into a pre-trained error estimation model to output an error estimation value and a prediction confidence level; A zero bias result module for performing confidence determination based on the error estimation value and the prediction confidence level to obtain a zero bias estimation result; An attitude analysis module for performing attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result; A dynamic compensation module for performing dynamic compensation based on the zero bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; A fusion correction module for performing fusion correction based on the preliminary attitude estimation result and the corrected gyroscope data to output the final attitude estimation result.
[0065] It should be noted that the VR remote control system based on gyroscope data fusion provided in the embodiment of the present invention is used to execute all the process steps of the VR remote control method based on gyroscope data fusion in the above embodiment. The working principles and beneficial effects of the two correspond one by one, and thus will not be elaborated here.
[0066] The embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a data acquisition program. When the processor executes the computer program, it implements the steps in each of the above embodiments of the VR remote control method based on gyroscope data fusion, such as Figure 1The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the data acquisition module.
[0067] Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device.
[0068] The electronic device can be a computing device such as a desktop computer, a notebook, a palm computer, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than the above, or combine some components, or different components. For example, the electronic device may further include input / output devices, network access devices, a bus, etc.
[0069] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device and connects various parts of the entire electronic device through various interfaces and lines.
[0070] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory and invoking the data stored in the memory, the processor realizes various functions of the electronic device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0071] Among them, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be realized. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0072] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0073] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A VR remote control method based on gyroscope data fusion, characterized in that: include: Get current environment data, gyroscope three-axis data and accelerometer data; Inputting the current environment data into a pre-trained error estimation model, and outputting an error estimation value and a prediction confidence; Performing a confidence determination based on the error estimate and the prediction confidence to obtain a zero bias estimation result; Performing attitude analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary attitude estimation result; Perform dynamic compensation according to the zero bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; According to the preliminary attitude estimation result and the corrected gyroscope data, a fusion correction is performed to output a final attitude estimation result, specifically including: Performing attitude residual calculation based on the preliminary attitude estimation result and the corrected gyroscope data to obtain a rotation difference; Performing weight allocation according to the rotation difference to obtain a dynamic fusion coefficient; The preliminary posture estimation result is linearly interpolated according to the dynamic fusion coefficient to obtain a final posture estimation result.
2. The VR remote control method based on gyroscope data fusion according to claim 1 is characterized in that: The training process of the error estimation model includes: An error estimation model is constructed based on historical environmental data and historical zero bias errors, and the model is trained. When the number of training times reaches a preset upper limit or the loss function of the model is detected to meet the conditions, the training is considered complete, and a trained model is obtained. The current environment data is input into the trained model to obtain an error estimate and a prediction confidence.
3. The VR remote control method based on gyroscope data fusion according to claim 1 is characterized in that: The performing confidence determination according to the error estimate value and the prediction confidence to obtain a zero bias estimation result includes: When the prediction confidence is greater than a preset confidence threshold, the error estimate is used as a zero bias estimation result, and subsequent steps are not performed; When the prediction confidence is less than the confidence threshold, acquiring supplementary environmental data; Standardizing the supplementary environmental data to obtain standardized environmental data; Retraining the error estimation model according to the standardized environmental data to obtain an optimized model; The current environmental data is input into the optimization model, and the confidence level of the output confidence level and zero bias error are re-determined until the confidence level requirement is met.
4. The VR remote control method based on gyroscope data fusion according to claim 1, characterized in that: The performing posture analysis according to the gyroscope three-axis data and the accelerometer data to obtain a preliminary posture estimation result includes: Perform low-pass filtering on the three-axis data of the gyroscope to obtain a noise-reduced angular velocity; Perform discrete integration according to the noise reduction angular velocity to obtain a change in attitude angle; Decomposing the gravity vector according to the accelerometer data to obtain the device tilt angle; Perform weighted fusion according to the attitude angle change amount and the device tilt angle to obtain a stable attitude angle; Quaternion conversion is performed according to the stable attitude angle to obtain the preliminary attitude estimation result.
5. The VR remote control method based on gyroscope data fusion according to claim 1, characterized in that: The step of performing dynamic compensation according to the zero bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data includes: Perform mean filtering according to the zero bias estimation result to obtain a zero bias correction result; The corrected angular velocity is calculated using the following formula: in, represents the corrected angular velocity, represents the original angular velocity, represents the temperature drift coefficient, represents the temperature change, Indicates the zero bias correction result; An abnormal value detection is performed according to the corrected angular velocity to obtain corrected gyroscope data.
6. The VR remote control method based on gyroscope data fusion according to claim 4 is characterized in that: Decomposing the gravity vector according to the accelerometer data to obtain the device tilt angle includes: Performing mean filtering on the accelerometer data to obtain a low-frequency gravity component; Performing state analysis according to the low-frequency gravity component to obtain a motion state; When the motion state is a motion state, motion acceleration compensation is performed according to the low-frequency gravity component to obtain a dynamic gravity projection vector; When the motion state is a static state, calculating the tilt angle according to the low-frequency gravity component to obtain a static tilt angle; The dynamic gravity projection vector and the static tilt angle are weightedly fused to obtain the device tilt angle.
7. A VR remote control system based on gyroscope data fusion, characterized in that: include: A data acquisition module is used to obtain current environment data, gyroscope three-axis data and accelerometer data; An error estimation module, used to input the current environment data into a pre-trained error estimation model, and output an error estimation value and a prediction confidence; A zero bias result module, used to perform confidence determination according to the error estimate value and the prediction confidence to obtain a zero bias estimation result; A posture analysis module, used to perform posture analysis based on the gyroscope three-axis data and the accelerometer data to obtain a preliminary posture estimation result; A dynamic compensation module, used for performing dynamic compensation according to the zero bias estimation result and the gyroscope three-axis data to obtain corrected gyroscope data; A fusion correction module is used to perform fusion correction according to the preliminary attitude estimation result and the corrected gyroscope data, and output a final attitude estimation result, specifically used for: Performing attitude residual calculation based on the preliminary attitude estimation result and the corrected gyroscope data to obtain a rotation difference; Performing weight allocation according to the rotation difference to obtain a dynamic fusion coefficient; The preliminary posture estimation result is linearly interpolated according to the dynamic fusion coefficient to obtain a final posture estimation result.
8. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the VR remote control method based on gyroscope data fusion as claimed in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the VR remote control method based on gyroscope data fusion as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Signal generation and detector systems and methods for determining positions of fingers of a user
CN107106907A
MIMU (Micro Inertial Measurement Unit) error compensation method based on deep neural network
CN110749337A
MEMS gyroscope zero offset temperature compensation method and system based on WDO-LSSVM
CN116481528A
Gyroscope temperature drift compensation method for agricultural machinery inertial navigation equipment
CN116608852A
Positioning reliability judgment method and system and medium
CN119860786A
Cited By
Dynamic angle compensation method and system for three-dimensional electronic compass
CN120558185A
Aluminum plate installation directional deformation real-time diagnosis system and vector control method
CN121120646A
Aluminum plate installation directionality deformation real-time diagnosis system and vector control method
CN121120646B
Abnormality detection method and system based on industrial remote controller
CN121963452A