Attitude angle detection method of data glove based on linear interpolation method

Through the attitude angle detection method based on linear interpolation method, combined with multiple algorithms to process the data glove state, the problem of low attitude detection accuracy of gyroscope under static conditions is solved, and higher attitude angle detection accuracy and stability are achieved. It is suitable for Various dynamic environments.

CN119248109AInactive Publication Date: 2025-01-03NANTONG YOUPIN MATERIAL TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411348101.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art uses gyroscope combined with measurement algorithm to obtain the posture of a moving body, and the accuracy is poor under static conditions, resulting in the accumulation of posture detection errors, especially in long-term static monitoring or applications requiring high static accuracy.

Method used

Using the attitude angle detection method based on linear interpolation method, data is collected through preset sensor groups, glove status is identified and classified, attitude angle weight is set, and attitude angle weight is compensated and corrected through linear interpolation method, combined with even complex wavelet packet transformation , singular value decomposition and Hilbert envelope spectrum for data processing.

Benefits of technology

It improves the accuracy and stability of attitude angle detection, enhances the sensitivity to static and motion states, ensures the smooth continuity and real-time nature of attitude angle data, and is suitable for a variety of dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248109A_ABST
    Figure CN119248109A_ABST
Patent Text Reader

Abstract

The invention provides an attitude angle detection method of a data glove based on a linear interpolation method, and relates to the field of attitude perception, and the attitude angle detection method of the data glove based on the linear interpolation method comprises the following steps: collecting state data of the data glove through a sensor group preset on the data glove, according to the collected state data of the data gloves, the states of the data gloves are recognized and classified, and the states of the data gloves comprise the static state and the moving state; setting the weight of the attitude angle of the data glove according to the recognition result of the state of the data glove, and measuring and calculating the attitude angle of the data glove; and compensating and correcting the attitude angle of the data glove through a linear interpolation method. According to the method, the state of the data glove is accurately identified and classified by combining various algorithms, so that the accuracy of attitude angle detection is improved, the accuracy, continuity and real-time performance of attitude tracking can be effectively improved, and the method is very suitable for being used in various dynamic environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of posture perception, and in particular to a posture angle detection method of a data glove based on a linear interpolation method. Background Art

[0002] Data gloves are advanced interactive devices used to accurately capture and simulate the movements and postures of human hands. They are widely used in virtual reality, remote control, gesture recognition, and medical rehabilitation. This device uses advanced sensing technology, combined with the principles of ergonomics and motion biology, to accurately simulate and analyze the complex movements of human hands. Data gloves monitor every movement and posture change of the hand in real time by installing various sensors such as magnetometers, gyroscopes, accelerometers, etc. on key parts of the fingers and palms. The data captured by these sensors are sent to advanced processing units and analyzed through complex algorithms and mathematical models, so that every detail of the hand movement can be accurately reproduced. The design of data gloves not only takes into account accuracy and sensitivity, but also takes into account the comfort of wearing and the convenience of operation.

[0003] At present, in the field of VR and AR, the posture angle detection of data gloves can provide high-precision hand tracking, allowing users to interact with the virtual environment in a natural and intuitive way. In the field of medical rehabilitation, the posture angle detection of data gloves is very useful for monitoring and evaluating the motor function and rehabilitation progress of patients' hands. It can help doctors or therapists better understand the patient's rehabilitation status. However, the existing technology has the following major defects when using gyroscopes in combination with measurement algorithms to obtain the posture of moving bodies: when using gyroscopes in combination with measurement algorithms such as quaternion differential algorithms, although these algorithms have high accuracy under dynamic conditions, under static conditions, due to the random errors of the gyroscopes, poor accuracy will occur; affected by the random errors of the gyroscopes, the posture detection may diverge in static conditions, that is, the posture data begins to deviate from the true value, resulting in an increase in error accumulation. This is particularly problematic in applications that require long-term static monitoring or high static accuracy.

[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0005] In view of this, the present invention provides a method for detecting the attitude angle of a data glove based on a linear interpolation method to solve the problem that the attitude detection accuracy of the gyroscope is not high when the gyroscope is static.

[0006] In order to solve the above problems, the specific technical solutions adopted by the present invention are as follows: A method for detecting an attitude angle of a data glove based on a linear interpolation method, the method comprising the following steps: S1, collecting data glove status data through a sensor group preset on the data glove, the sensor group consists of a gyroscope, an accelerometer and a magnetometer; S2. Identify and classify the state of the data glove according to the collected data glove state data, where the state of the data glove includes a static state and a moving state; S3, according to the recognition result of the data glove state, setting the weight of the data glove posture angle, and measuring and calculating the posture angle of the data glove; S4. Compensate and correct the posture angle of the data glove through linear interpolation.

[0007] Preferably, identifying and classifying the state of the data glove according to the collected data glove state data comprises the following steps: S21, decomposing the non-stationary signal in the data glove state data by using the dual complex wavelet packet transform method, and establishing a reconstructed attractor orbit matrix; S22, performing singular value decomposition on the reconstructed attractor orbit matrix based on the singular value decomposition method, calculating the difference spectrum of the singular values, and reconstructing the glove state data; S23, calculating the Hilbert envelope spectrum of the reconstructed glove state data, and extracting characteristic information of the glove state; S24: Based on the extracted feature information of the data glove state, classify the state of the data glove using a state classification algorithm.

[0008] Preferably, decomposing the non-stationary signal in the data glove state data by using the dual complex wavelet packet transform method and establishing a reconstructed attractor track matrix comprises the following steps: S211, performing dual-tree complex wavelet packet transform on the non-stationary signal in the data glove state data by wavelet basis, and decomposing the signal into wavelet packet components of different frequencies and scales; S212, selecting an interesting component containing glove state information from the decomposed wavelet packet components; S213, constructing and reconstructing the attractor orbit matrix with the selected components of interest.

[0009] Preferably, performing singular value decomposition on the reconstructed attractor orbit matrix based on the singular value decomposition method, calculating the difference spectrum of the singular values, and reconstructing the glove state data includes the following steps: S221, performing singular value decomposition on the reconstructed attractor orbit matrix to obtain an orthogonal matrix and a diagonal matrix, and taking the elements in the diagonal matrix as singular values; S222, arranging the obtained singular values ​​in descending order to form a singular value sequence, calculating the difference between adjacent singular values ​​in the singular value sequence, and establishing a differential spectrum according to the obtained difference; S223, by analyzing the difference spectrum, finding the position corresponding to the peak in the difference spectrum, and selecting the singular value corresponding to the peak as the key singular value; S224, determining the corresponding singular vector according to the selected key singular value, and reconstructing the glove state data according to the key singular value and its corresponding singular vector.

[0010] Preferably, calculating the Hilbert envelope spectrum of the reconstructed glove state data and extracting characteristic information of the glove state comprises the following steps: S231, performing Hilbert transform on the reconstructed glove state data to obtain an analytical signal in a complex form; S232, extracting the envelope of the analytical signal to obtain a Hilbert envelope; S233, extracting features from the Hilbert envelope to obtain feature information of the data glove state.

[0011] Preferably, according to the recognition result of the data glove state, setting the weight of the data glove posture angle, and measuring and calculating the posture angle of the data glove includes the following steps: S31, when the data glove is in a stationary state, the weight value of the data glove posture angle calculation is set to 0, and when the data glove is in a moving state, the weight value of the data glove posture angle calculation is set to 1; S32, based on the fusion attitude measurement algorithm, fusing the state data collected by the accelerometer and the magnetometer to obtain a first direction cosine matrix; S33, analyzing the state data collected by the gyroscope through a quaternion differential equation to obtain a second direction cosine matrix; S34. Based on the first direction cosine matrix and the second direction cosine matrix, the posture angle of the data glove is calculated by a matrix fusion formula.

[0012] Preferably, based on the fusion attitude measurement algorithm, fusing the state data collected by the accelerometer and the magnetometer to obtain the first direction cosine matrix includes the following steps: S321, preprocessing the state data collected by the accelerometer and the magnetometer, the preprocessing including noise removal, unit calibration and coordinate system conversion; S322, converting the preprocessed measurement data of the accelerometer and the magnetometer into a unit vector, and establishing a vector group according to the unit vector of the accelerometer and the unit vector of the magnetometer, wherein the vector group represents the orientation of the data glove in two different directions; S323, calculating the posture information of the data glove by using a quaternion algorithm according to the established vector group, where the posture information of the data glove includes a pitch angle, a tilt angle, and a yaw angle; S324: Establish a first direction cosine matrix of the data glove according to the posture information of the data glove.

[0013] Preferably, analyzing the state data collected by the gyroscope by using a quaternion differential equation to obtain a second direction cosine matrix comprises the following steps: S331, preprocessing the measurement data in the state data collected by the gyroscope; S332, numerically integrating the preprocessed gyroscope data through a quaternion differential equation to obtain an updated quaternion; S333. Construct a second direction cosine matrix by updating the quaternion.

[0014] Preferably, based on the first direction cosine matrix and the second direction cosine matrix, the calculation formula for calculating the posture angle of the data glove by the matrix fusion formula is: G = ω × C1 + (1-ω) × C2; Where G represents the posture angle of the data glove; ω represents the weight value of the posture angle calculation of the data glove; C1 represents the first direction cosine matrix; C2 represents the second direction cosine matrix.

[0015] Preferably, compensating and correcting the posture angle of the data glove by linear interpolation method comprises the following steps: S41, performing missing point detection on the posture angle of the data glove, and using the detected missing points as points to be interpolated; S42, taking the attitude angle data points before and after each to-be-interpolated point as reference data points; S43, performing linear interpolation calculation on the missing points of each attitude angle according to the reference data points; S44, applying the calculated linear interpolation result to the posture angle data of the data glove to achieve compensation correction of the posture angle of the data glove.

[0016] The beneficial effects of the present invention are: 1. The present invention realizes accurate recognition and classification of data glove states by combining multiple algorithms, thereby improving the accuracy of posture angle detection. By comprehensively analyzing data glove state data, including decomposition, reconstruction, feature extraction and other steps of non-stationary signals, the sensitivity to state switching is improved, which helps to accurately judge the static state and motion state of the gloves. The posture angle of the data glove is compensated and corrected by linear interpolation method, which can effectively process missing points, make the posture angle data smoother and more continuous, improve the stability and reliability of the data, and can effectively improve the accuracy, continuity and real-time performance of posture tracking, which is very suitable for use in various dynamic environments.

[0017] 2. The present invention can better capture the frequency and scale information of non-stationary signals in the data glove state data by using dual complex wavelet packet transform, which helps to improve the sensitivity and accuracy of glove state changes. By establishing a reconstructed attractor orbit matrix, it helps to retain key state information in the state identification process. Using singular value decomposition to process the reconstructed attractor orbit matrix helps to extract key state features. The feature extraction of the Hilbert envelope not only provides more information, but also enhances the interpretability of the glove state data, which can better understand and use these data, and helps to more accurately identify and classify the state of the data glove.

[0018] 3. The present invention improves the accuracy of attitude angle measurement by fusing the data of the accelerometer and the magnetometer. Preprocessing and unit vector conversion ensure the quality and consistency of the data, providing a basis for accurate attitude information. The weight of attitude angle calculation is dynamically adjusted according to the static or moving state of the data glove, which helps to maintain the accuracy and stability of measurement when the data glove is in different states. The fusion of the first and second direction cosine matrices effectively combines the advantages of different sensors and improves the overall efficiency of attitude angle measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 The present invention is a flowchart of a method for detecting the posture angle of a data glove based on a linear interpolation method. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0021] According to an embodiment of the present invention, a method for detecting the posture angle of a data glove based on a linear interpolation method is provided.

[0022] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1As shown, according to the method for detecting the posture angle of a data glove based on the linear interpolation method according to an embodiment of the present invention, the method for detecting the posture angle of a data glove based on the linear interpolation method comprises the following steps: S1, collecting data glove status data through a sensor group preset on the data glove, the sensor group consists of a gyroscope, an accelerometer and a magnetometer; It should be noted that the gyroscope measures the angular velocity of the data glove on three spatial axes, the accelerometer is used to measure the acceleration of the data glove on three spatial axes, and the magnetometer is used to measure the magnetic field strength around the glove.

[0023] S2. Identify and classify the state of the data glove according to the collected data glove state data, where the state of the data glove includes a static state and a moving state; As a preferred embodiment, according to the collected data glove status data, identifying and classifying the status of the data glove includes the following steps: S21, decomposing the non-stationary signal in the data glove state data by using the dual complex wavelet packet transform method, and establishing a reconstructed attractor orbit matrix; As a preferred implementation, the non-stationary signal in the data glove state data is decomposed by the dual complex wavelet packet transform method, and the reconstruction attractor trajectory matrix is ​​established, including the following steps: S211, performing dual-tree complex wavelet packet transform on the non-stationary signal in the data glove state data by wavelet basis; decomposing the signal into wavelet packet components of different frequencies and scales; It should be noted that performing dual-tree complex wavelet packet transform on the non-stationary signal in the data glove state data by wavelet basis includes the following steps: Select bior2 in the Biorthogonal wavelet system as the wavelet basis (Biorthogonal wavelet has a pair of orthogonal basis functions, which are used to decompose and reconstruct signals respectively. Bior2 is one of the Biorthogonal wavelet series and is usually used in wavelet transform applications). In the dual-tree complex wavelet packet transform, two tree structures are constructed, and each tree corresponds to a set of wavelets and scaling functions. The glove state data is input into the dual-tree complex wavelet packet transform. In this process, the non-stationary signal is decomposed by two trees at the same time, and each layer of decomposition will produce wavelet packet components of different scales and frequencies. From the output of the two trees, a series of wavelet packet components of different frequencies and scales can be obtained. These components represent the characteristics of non-stationary signals at different frequencies and scales.

[0024] S212, selecting an interesting component containing glove state information from the decomposed wavelet packet components; Specifically, for each wavelet packet component, its coefficients are squared and summed to obtain the energy of the wavelet packet component. The energies of all wavelet packet components are compared, and components with higher energy are selected. High-energy components usually contain important information of the signal, and wavelet packet components with significant energy are selected as components of interest.

[0025] S213, constructing and reconstructing the attractor orbit matrix with the selected components of interest.

[0026] Specifically, feature extraction is performed on the selected components of interest, including extracting important time series features or frequency domain features from the signal, such as peak value, frequency, energy, etc. The selected features are used as input to reconstruct the phase space and organize the points in the phase space into a matrix form, that is, to reconstruct the attractor orbit matrix. Each row represents a state vector, and the columns represent different dimensions or features.

[0027] S22, performing singular value decomposition on the reconstructed attractor orbit matrix based on the singular value decomposition method, calculating the difference spectrum of the singular values, and reconstructing the glove state data; As a preferred implementation, the singular value decomposition is performed on the reconstructed attractor orbit matrix based on the singular value decomposition method, and the difference spectrum of the singular values ​​is calculated, and the glove state data is reconstructed, which includes the following steps: S221, performing singular value decomposition on the reconstructed attractor orbit matrix to obtain an orthogonal matrix and a diagonal matrix, and taking the elements in the diagonal matrix as singular values; Specifically, performing singular value decomposition on the reconstructed attractor orbit matrix will generate three matrices, including: an orthogonal matrix composed of left singular vectors, a diagonal matrix containing singular values ​​on the diagonal, and an orthogonal matrix composed of right singular vectors.

[0028] S222, arranging the obtained singular values ​​in descending order to form a singular value sequence, calculating the difference between adjacent singular values ​​in the singular value sequence, and establishing a differential spectrum according to the obtained difference; Specifically, the differences between adjacent singular values ​​can establish a differential spectrum, which is a graph representing the trend of changes in singular values. The horizontal axis represents the index of the singular value, and the vertical axis represents the difference between adjacent singular values.

[0029] S223, by analyzing the difference spectrum, finding the position corresponding to the peak in the difference spectrum, and selecting the singular value corresponding to the peak as the key singular value; Specifically, in the difference spectrum, the peak corresponds to a large jump in the change of the singular value. The peak position is located by finding the maximum or local maximum in the difference spectrum, which is done by finding the local maximum point in the difference spectrum or applying the peak detection algorithm. After finding the peak position, the singular value at the corresponding position is the key singular value. These singular values ​​usually correspond to mutations or important structural changes in the data.

[0030] S224, determining the corresponding singular vector according to the selected key singular value, and reconstructing the glove state data according to the key singular value and its corresponding singular vector.

[0031] Specifically, the singular values ​​and singular vectors generated by singular value decomposition exist in pairs. The singular values ​​correspond to the singular vectors, which describe the direction of the data in the feature space. Then, according to the position index of the key singular value, the corresponding singular vector is found, the key singular value is multiplied by the corresponding singular vector, and an inverse transformation is performed to restore the original glove state data.

[0032] S23, calculating the Hilbert envelope spectrum of the reconstructed glove state data, and extracting characteristic information of the glove state; As a preferred implementation, calculating the Hilbert envelope spectrum of the reconstructed glove state data and extracting characteristic information of the glove state includes the following steps: S231, performing Hilbert transform on the reconstructed glove state data to obtain an analytical signal in a complex form; It should be noted that Hilbert transform is a mathematical tool used to extract an analytical signal from an original signal. This analytical signal is a complex representation of the original signal, containing the amplitude and phase information of the signal. Through Hilbert transform, a complex signal can be obtained.

[0033] S232, extracting the envelope of the analytical signal to obtain a Hilbert envelope; It should be noted that extracting the envelope from the analytical signal means obtaining the profile of the signal amplitude changing over time. Envelope extraction can be achieved by calculating the amplitude of the analytical signal (the modulus of the complex number). This envelope describes the overall amplitude change of the signal while ignoring its phase information.

[0034] S233, extracting features from the Hilbert envelope to obtain feature information of the data glove state.

[0035] It should be noted that after obtaining the Hilbert envelope, feature extraction can be performed on it. Features are simplified representations of data that capture the most important information in the data, including: Peak features: By looking for peaks in the Hilbert envelope, these peaks correspond to important changes in the glove state.

[0036] Frequency domain characteristics: By performing frequency domain analysis on the Hilbert envelope and observing the energy distribution of the Hilbert envelope at different frequencies, the frequency domain information about the glove state can be obtained.

[0037] Time domain characteristics: By analyzing the dynamic characteristics of the Hilbert envelope in the time domain, such as the rate of change of the envelope, the overall trend of the waveform, etc.

[0038] Statistical features: By calculating the statistical features of the Hilbert envelope, such as the mean, standard deviation, etc., we can obtain summary information about the distribution of glove states.

[0039] Waveform shape features: By observing the overall waveform shape of the Hilbert envelope, features that may be associated with changes in the glove state are identified.

[0040] S24: Based on the extracted feature information of the data glove state, classify the state of the data glove using a state classification algorithm.

[0041] It should be noted that by collecting the historical status data of the data gloves, analyzing and processing them, extracting the data glove status feature information and forming a data set, the data set is then divided into a training set and a test set, and the support vector machine is selected as the classification algorithm. The training set is used to train the selected classification model, and the test set is used to evaluate the performance of the trained classification algorithm. According to the evaluation results, the algorithm is tuned and optimized. After evaluation and tuning, it can be applied to new glove status data for actual status classification.

[0042] Specifically, the present invention can better capture the frequency and scale information of non-stationary signals in data glove state data by using dual complex wavelet packet transform, which helps to improve the sensitivity and accuracy of glove state changes. By establishing a reconstructed attractor orbit matrix, it helps to retain key state information in the state identification process. Using singular value decomposition to process the reconstructed attractor orbit matrix helps to extract key state features. Feature extraction of the Hilbert envelope not only provides more information, but also enhances the interpretability of the glove state data, which can better understand and use these data, and helps to more accurately identify and classify the state of the data glove.

[0043] S3, according to the recognition result of the data glove state, setting the weight of the data glove posture angle, and measuring and calculating the posture angle of the data glove; As a preferred embodiment, according to the recognition result of the data glove state, the weight of the data glove posture angle is set, and the posture angle of the data glove is measured and calculated, including the following steps: S31, when the data glove is in a stationary state, the weight value of the data glove posture angle calculation is set to 0, and when the data glove is in a moving state, the weight value of the data glove posture angle calculation is set to 1; Specifically, the benefit of setting the weight value is that the data source used for attitude angle calculation can be flexibly selected according to the state changes of the data glove, thereby optimizing the accuracy and stability of the attitude angle. In a stationary state, the first direction cosine matrix obtained by fusing the accelerometer and magnetometer may be more accurate because these sensors can provide a relatively stable reference, while in a moving state, the gyroscope may be more suitable for attitude angle calculation because it can more sensitively capture the rotation of the glove.

[0044] S32, based on the fusion attitude measurement algorithm, fusing the state data collected by the accelerometer and the magnetometer to obtain a first direction cosine matrix; As a preferred implementation, based on a fusion attitude measurement algorithm, the state data collected by the accelerometer and the magnetometer are fused to obtain a first direction cosine matrix, including the following steps: S321, preprocessing the state data collected by the accelerometer and the magnetometer, the preprocessing including noise removal, unit calibration and coordinate system conversion; Specifically, accelerometers and magnetometers may be subject to various interferences and noises when collecting data. The purpose of noise removal is to retain the true signal and reduce measurement errors. The data can be smoothed by using filtering techniques (such as low-pass filters).

[0045] Accelerometers and magnetometers usually output raw analog or digital signals, and unit calibration is to convert these signals into physical units; The accelerometer and magnetometer are mounted on the data glove and take measurements relative to the data glove's coordinate system. In order to align these measurements with the device's fixed coordinate system, a coordinate system transformation is required.

[0046] S322, converting the preprocessed measurement data of the accelerometer and the magnetometer into a unit vector, and establishing a vector group according to the unit vector of the accelerometer and the unit vector of the magnetometer, wherein the vector group represents the orientation of the data glove in two different directions; It should be noted that since the accelerometer measures the acceleration due to gravity, it points to the center of the earth and can be used as a reference for vertical upward (or downward). The magnetometer measures the direction of the earth's magnetic field and is generally used to determine the direction on the horizontal plane.

[0047] Specifically, the preprocessed accelerometer and magnetometer measurement data may have different scales. Converting them into unit vectors is to eliminate the scale differences so that they have consistent weights in the calculation. A unit vector is a vector with a length of 1, indicating direction regardless of magnitude. By simply connecting the unit vectors of the accelerometer and magnetometer to form a vector group, this vector group represents the orientation of the data glove in two different directions.

[0048] S323, calculating the posture information of the data glove by using a quaternion algorithm according to the established vector group, where the posture information of the data glove includes a pitch angle, a tilt angle, and a yaw angle; Specifically, quaternion is a mathematical tool that is often used to represent rotation. In posture calculation, quaternion can be used to represent the rotation of the data glove in three-dimensional space. One of the commonly used quaternion algorithms is the Madgar quaternion algorithm or the Mahane quaternion algorithm; Specifically, by using the established vector group as the input of the quaternion algorithm, the unit vectors of the accelerometer and magnetometer will be used to initialize the initial direction of the quaternion. The quaternion corresponding to the current gravity direction is calculated using the data from the accelerometer, and the quaternion corresponding to the current geomagnetic field direction is calculated using the data from the magnetometer. The quaternions of the two directions are fused based on the Kalman filter fusion algorithm to update the current quaternion. The current quaternion is converted into a rotation matrix, and the pitch angle, tilt angle, and yaw angle are extracted from the rotation matrix. The calculated pitch angle, tilt angle, and yaw angle can be used to describe the direction and rotation state of the glove in space.

[0049] S324: Establish a first direction cosine matrix of the data glove according to the posture information of the data glove.

[0050] It should be noted that the rotation matrix is ​​transposed and inversely operated to obtain the direction cosine matrix. The direction cosine matrix is ​​an orthogonal matrix, in which the elements represent the cosine values ​​between different axes. The direction cosine matrix is ​​usually represented as a 3x3 matrix, in which the elements represent the cosine values ​​between different coordinate axes.

[0051] S33, analyzing the state data collected by the gyroscope through a quaternion differential equation to obtain a second direction cosine matrix; As a preferred implementation, analyzing the state data collected by the gyroscope through a quaternion differential equation to obtain a second direction cosine matrix includes the following steps: S331, preprocessing the measurement data in the state data collected by the gyroscope; the preprocessing includes noise removal, unit calibration and coordinate system conversion; S332, numerically integrating the preprocessed gyroscope data through a quaternion differential equation to obtain an updated quaternion; It should be noted that the gyroscope provides angular velocity, that is, the rate at which an object rotates. The quaternion differential equation describes the relationship between the rate of change of the quaternion over time and the angular velocity. The preprocessed gyroscope data is numerically integrated using the numerical integration method, and the differential equation is converted into a difference equation. The value of the quaternion is gradually updated. The updated quaternion obtained by the numerical integration method represents the cumulative rotation of the gyroscope over a period of time.

[0052] S333. Construct a second direction cosine matrix by updating the quaternion.

[0053] It should be noted that the updated quaternion is converted into a rotation matrix, and the second direction cosine matrix is ​​extracted from the rotation matrix. The second direction cosine matrix is ​​a sub-matrix of the rotation matrix and includes the rotation information of the glove in space.

[0054] S34. Based on the first direction cosine matrix and the second direction cosine matrix, the posture angle of the data glove is calculated by a matrix fusion formula.

[0055] Specifically, based on the first direction cosine matrix and the second direction cosine matrix, the calculation formula for calculating the posture angle of the data glove through the matrix fusion formula is: G = ω × C1 + (1-ω) × C2; Where G represents the posture angle of the data glove; ω represents the weight value of the posture angle calculation of the data glove; C1 represents the first direction cosine matrix; C2 represents the second direction cosine matrix.

[0056] Specifically, the present invention improves the accuracy of attitude angle measurement by fusing data from an accelerometer and a magnetometer. Preprocessing and unit vector conversion ensure the quality and consistency of data, providing a basis for accurate attitude information. The weight of attitude angle calculation is dynamically adjusted according to the static or moving state of the data glove, which helps to maintain the accuracy and stability of measurement when the data glove is in different states. The fusion of the first and second direction cosine matrices is used to effectively combine the advantages of different sensors and improve the overall efficiency of attitude angle measurement.

[0057] S4. Compensate and correct the posture angle of the data glove through linear interpolation.

[0058] As a preferred embodiment, compensating and correcting the posture angle of the data glove by linear interpolation method includes the following steps: S41, performing missing point detection on the posture angle of the data glove, and using the detected missing points as points to be interpolated; Specifically, performing missing point detection on the posture angle of the data glove and using the detected missing points as points to be interpolated includes the following steps: First, set the attitude angle data threshold to determine whether the attitude angle data is within the normal range. If the attitude angle data at a certain time point is not within the normal range, it can be marked as a missing point. By analyzing the posture angle time series of the data glove and observing the changing trend of the time series, we can preliminarily identify the areas where missing points may exist; The threshold-based method identifies abnormal attitude angle data, and the abnormal values ​​may be candidates for missing points; Mark the detected missing points in the time series as target points for subsequent interpolation.

[0059] S42, taking the attitude angle data points before and after each to-be-interpolated point as reference data points; Specifically, taking the attitude angle data points before and after each interpolation point as reference data points includes the following steps: The position of each point to be interpolated is determined through the result of missing point detection, that is, the timestamp or index of the missing point; For each point to be interpolated, a fixed time window is set to determine the range of reference data points before and after it; The attitude angle data points before and after the point to be interpolated are extracted from the attitude angle data as reference data points, which are recorded as reference point 1 and reference point 2 respectively, and these reference data points will be used for subsequent linear interpolation calculations.

[0060] S43, performing linear interpolation calculation on the missing points of each attitude angle according to the reference data points; Specifically, the linear interpolation calculation of the missing points of each attitude angle according to the reference data points includes the following steps: Obtain the values ​​of the corresponding attitude angles from the data of reference point 1 and reference point 2; Calculate the relative position of the interpolation point relative to the two reference points. Usually, the time weight of linear interpolation is used. If the interpolation point is between reference point 1 and reference point 2, its weights are 1-c and c respectively, where c is the relative position of the interpolation point relative to the two reference points. For each attitude angle, use the following linear interpolation formula to calculate the value of the point to be interpolated: Interpolation result = value of reference point 1 × (1 − c) + value of reference point 2 × c; S44, applying the calculated linear interpolation result to the posture angle data of the data glove to achieve compensation correction of the posture angle of the data glove.

[0061] In summary, with the help of the above technical scheme of the present invention, the present invention realizes accurate recognition and classification of data glove states by combining multiple algorithms, thereby improving the accuracy of posture angle detection, and improves the sensitivity to state switching by comprehensively analyzing the data glove state data, including the decomposition, reconstruction, feature extraction and other steps of non-stationary signals, which is helpful to accurately judge the static state and motion state of the gloves, and compensates and corrects the posture angle of the data gloves by linear interpolation, which can effectively process missing points, make the posture angle data smoother and more continuous, improve the stability and reliability of the data, and can effectively improve the accuracy, continuity and real-time performance of posture tracking, which is very suitable for use in a variety of dynamic environments; the present invention can better capture the frequency and scale information of non-stationary signals in the data glove state data by using dual complex wavelet packet transform, which is helpful to improve the sensitivity and accuracy of glove state changes, and establish reconstruction absorption The attractor orbit matrix helps to retain key state information in the state recognition process, and the singular value decomposition is used to process the reconstructed attractor orbit matrix, which helps to extract key state features. The feature extraction of the Hilbert envelope not only provides more information, but also enhances the interpretability of the glove state data, and can better understand and use these data, which helps to more accurately identify and classify the state of the data glove. The present invention improves the accuracy of attitude angle measurement by fusing the data of the accelerometer and the magnetometer. The preprocessing and unit vector conversion ensure the quality and consistency of the data, provide a basis for accurate attitude information, and dynamically adjust the weight of the attitude angle calculation according to the static or moving state of the data glove, which helps to maintain the accuracy and stability of the measurement when the data glove is in different states. The fusion of the first and second direction cosine matrices effectively combines the advantages of different sensors and improves the overall efficiency of attitude angle measurement.

[0062] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.

[0063] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting the posture angle of a data glove based on linear interpolation, characterized in that: The method for detecting the posture angle of the data glove based on the linear interpolation method comprises the following steps: S1, collecting data glove status data through a sensor group preset on the data glove, wherein the sensor group is composed of a gyroscope, an accelerometer and a magnetometer; S2. Identify and classify the state of the data glove according to the collected data glove state data, where the state of the data glove includes a static state and a moving state; S3, according to the recognition result of the data glove state, setting the weight of the data glove posture angle, and measuring and calculating the posture angle of the data glove; S4. Compensate and correct the posture angle of the data glove through linear interpolation.

2. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 1, characterized in that: The step of identifying and classifying the state of the data glove according to the collected data glove state data comprises the following steps: S21, decomposing the non-stationary signal in the data glove state data by using the dual complex wavelet packet transform method, and establishing a reconstructed attractor orbit matrix; S22, performing singular value decomposition on the reconstructed attractor orbit matrix based on the singular value decomposition method, calculating the difference spectrum of the singular values, and reconstructing the glove state data; S23, calculating the Hilbert envelope spectrum of the reconstructed glove state data, and extracting characteristic information of the glove state; S24: Based on the extracted feature information of the data glove state, classify the state of the data glove using a state classification algorithm.

3. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 2, characterized in that: The method of decomposing the non-stationary signal in the data glove state data by using the dual complex wavelet packet transform method and establishing a reconstructed attractor track matrix comprises the following steps: S211, performing dual-tree complex wavelet packet transform on the non-stationary signal in the data glove state data by wavelet basis, and decomposing the signal into wavelet packet components of different frequencies and scales; S212, selecting an interesting component containing glove state information from the decomposed wavelet packet components; S213, constructing and reconstructing the attractor orbit matrix with the selected components of interest.

4. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 2, characterized in that: The method of performing singular value decomposition on the reconstructed attractor orbit matrix based on the singular value decomposition method, calculating the difference spectrum of the singular values, and reconstructing the glove state data includes the following steps: S221, performing singular value decomposition on the reconstructed attractor orbit matrix to obtain an orthogonal matrix and a diagonal matrix, and taking the elements in the diagonal matrix as singular values; S222, arranging the obtained singular values ​​in descending order to form a singular value sequence, calculating the difference between adjacent singular values ​​in the singular value sequence, and establishing a differential spectrum according to the obtained difference; S223, by analyzing the difference spectrum, finding the position corresponding to the peak in the difference spectrum, and selecting the singular value corresponding to the peak as the key singular value; S224, determining the corresponding singular vector according to the selected key singular value, and reconstructing the glove state data according to the key singular value and its corresponding singular vector.

5. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 2, characterized in that: The step of calculating the Hilbert envelope spectrum of the reconstructed glove state data and extracting characteristic information of the glove state comprises the following steps: S231, performing Hilbert transform on the reconstructed glove state data to obtain an analytical signal in a complex form; S232, extracting the envelope of the analytical signal to obtain a Hilbert envelope; S233, extracting features from the Hilbert envelope to obtain feature information of the data glove state.

6. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 1, characterized in that: The method of setting the weight of the data glove posture angle according to the recognition result of the data glove state and measuring and calculating the posture angle of the data glove comprises the following steps: S31, when the data glove is in a stationary state, the weight value of the data glove posture angle calculation is set to 0, and when the data glove is in a moving state, the weight value of the data glove posture angle calculation is set to 1; S32, based on the fusion attitude measurement algorithm, fusing the state data collected by the accelerometer and the magnetometer to obtain a first direction cosine matrix; S33, analyzing the state data collected by the gyroscope through a quaternion differential equation to obtain a second direction cosine matrix; S34. Based on the first direction cosine matrix and the second direction cosine matrix, the posture angle of the data glove is calculated by a matrix fusion formula.

7. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 6, characterized in that: The method of fusing the state data collected by the accelerometer and the magnetometer based on the fusion attitude measurement algorithm to obtain the first direction cosine matrix includes the following steps: S321, preprocessing the state data collected by the accelerometer and the magnetometer, wherein the preprocessing includes noise removal, unit calibration and coordinate system conversion; S322, converting the preprocessed measurement data of the accelerometer and the magnetometer into a unit vector, and establishing a vector group according to the unit vector of the accelerometer and the unit vector of the magnetometer, wherein the vector group represents the orientation of the data glove in two different directions; S323, calculating the posture information of the data glove by using a quaternion algorithm according to the established vector group, wherein the posture information of the data glove includes a pitch angle, a tilt angle, and a yaw angle; S324: Establish a first direction cosine matrix of the data glove according to the posture information of the data glove.

8. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 6, characterized in that: The step of analyzing the state data collected by the gyroscope by using the quaternion differential equation to obtain the second direction cosine matrix comprises the following steps: S331, preprocessing the measurement data in the state data collected by the gyroscope; S332, numerically integrating the preprocessed gyroscope data through a quaternion differential equation to obtain an updated quaternion; S333. Construct a second direction cosine matrix by updating the quaternion.

9. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 6, characterized in that: The calculation formula for calculating the posture angle of the data glove by matrix fusion formula based on the first direction cosine matrix and the second direction cosine matrix is: G = ω × C1 + (1-ω) × C2; Where G represents the posture angle of the data glove; ω represents the weight value of the posture angle calculation of the data glove; C1 represents the first direction cosine matrix; C2 represents the second direction cosine matrix.

10. The method for detecting the attitude angle of a data glove based on linear interpolation according to claim 1, characterized in that: The method of compensating and correcting the posture angle of the data glove by linear interpolation includes the following steps: S41, performing missing point detection on the posture angle of the data glove, and using the detected missing points as points to be interpolated; S42, taking the attitude angle data points before and after each to-be-interpolated point as reference data points; S43, performing linear interpolation calculation on the missing points of each attitude angle according to the reference data points; S44, applying the calculated linear interpolation result to the posture angle data of the data glove to achieve compensation correction of the posture angle of the data glove.