Joint angle calculation method based on linear magnetometer calibration in indoor environment

By calibrating the magnetometer using a linear calibration algorithm based on magnetic inclination in an indoor environment and combining it with accelerometer and gyroscope data, the problem of low joint angle calculation accuracy caused by the magnetometer being susceptible to environmental interference is solved, achieving higher calculation accuracy and stability.

CN118936512BActive Publication Date: 2025-09-05SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410986733.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-09-05
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

In indoor environments, the magnetometer of the inertial sensor is easily affected by environmental interference, resulting in low accuracy in joint angle calculation.

Method used

The magnetometer is calibrated using a linear calibration algorithm based on magnetic inclination. Combined with accelerometer and gyroscope data, human motion data is collected through the wearing position of the inertial sensor and the experimental paradigm design, and the magnetometer is calibrated and the joint angle is calculated.

Benefits of technology

The accuracy and stability of joint angle calculation are improved, the calculation cost is reduced, the measurement steps are simplified, and the measurement portability is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118936512B_ABST
    Figure CN118936512B_ABST
Patent Text Reader

Abstract

The present invention provides a joint angle calculation method based on linear magnetometer calibration in an indoor environment. 1) Considering the walking motion of the human body in the indoor environment, the number and placement of inertial sensors are determined. 2) A linear calibration algorithm based on magnetic inclination is used to calibrate the magnetometer and correct the initial posture of the inertial sensor data during walking motion in the indoor environment, providing more accurate data for joint angle calculation to ensure calculation accuracy. 3) By fusing the information of the accelerometer, gyroscope, and magnetometer, and updating the posture in combination with the changes in gait cycle parameters, the joint angle is calculated based on the calibrated data obtained in steps 1 and 2. The present invention implements a linear magnetometer calibration algorithm based on magnetic inclination and performs joint angle calculation in an indoor environment, breaking through the limitations of existing methods in terms of calculation amount, calibration steps, calibration effect, etc., effectively reducing costs, and improving measurement portability and the accuracy of joint angle calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of numerical analysis and linear optimization, and in particular to a joint angle calculation method based on linear magnetometer calibration in an indoor environment. Background Art

[0002] With the continuous advancement of science and technology and people's increasing interest in health and exercise, joint angle calculation methods based on inertial sensors have been widely used in fields such as sports science, rehabilitation medicine, and human posture recognition. Accurately calculating the angles of lower limb joints, especially in complex indoor environments, is crucial for improving training outcomes, accelerating rehabilitation, and optimizing home monitoring. However, inertial sensors are susceptible to various interferences in indoor environments. In particular, magnetometer data is susceptible to changes in the surrounding magnetic field, which reduces the accuracy of joint angle calculation. Therefore, how to effectively calibrate magnetometers in complex indoor environments to improve the accuracy of joint angle calculation has become a key research topic.

[0003] Inertial sensors primarily include accelerometers, gyroscopes, and magnetometers. Accelerometers measure linear acceleration, gyroscopes measure angular velocity, and magnetometers measure the strength of the Earth's magnetic field. By fusing the data from these three sensors, real-time monitoring and calculation of an object's posture and motion state can be achieved.

[0004] In joint angle calculation, inertial sensors are typically worn at key joints, such as the knee and ankle, to capture motion data. Accelerometer and gyroscope data are combined to generate preliminary joint angle information, which is then corrected using magnetometer data to improve calculation accuracy and stability. While magnetometers play an important role in providing directional information, their measurements are susceptible to fluctuations in the surrounding magnetic field. This interference is particularly pronounced in indoor environments.

[0005] Common interference sources include electromagnetic interference from metal structures in buildings, electrical equipment, and other electronic devices. This interference can cause deviations in the magnetic field strength and direction measured by the magnetometer, affecting the accuracy of the magnetometer-based attitude and angle calculations.

[0006] The linear calibration method of magnetometers based on magnetic inclination breaks through the limitation of traditional magnetometer calibration methods, which mostly rely on the use of high-precision turntables, and solves the problems of large computational complexity and complex steps in nonlinear methods. The advantage of this method lies in its simple linear processing flow, which effectively reduces costs and simplifies measurement steps.

[0007] Against this backdrop, this paper proposes a joint angle calculation method based on linear magnetometer calibration in indoor environments. This method aims to address the existing issues of magnetometers being susceptible to environmental interference and resulting in low joint angle calculation accuracy. This method effectively calibrates the magnetometer using a linear calibration algorithm based on magnetic inclination, combining data from accelerometers and gyroscopes to accurately calculate lower limb joint angles. Summary of the Invention

[0008] The purpose of this invention is to implement a joint angle calculation method based on linear magnetometer calibration in an indoor, dynamic motion environment. By designing the inertial sensor's wearing position and experimental paradigm, inertial sensor data is collected during human motion. A linear magnetometer calibration method based on magnetic inclination is applied to calibrate the magnetometer. The joint angle parameters of the lower limbs are then calculated based on the calibrated inertial sensor data.

[0009] The present invention provides a joint angle calculation method based on linear magnetometer calibration in an indoor environment, which breaks through the limitations of existing methods in terms of calculation amount, calibration steps, calibration effect, etc., effectively reduces costs, improves measurement portability and the accuracy of joint angle calculation.

[0010] To achieve the above object, the technical solution of the present invention is as follows:

[0011] Step 1: Based on the design of the inertial sensor's wearing position and motion paradigm, complete the walking motion data collection work in a complex environment and obtain the raw walking motion data in an indoor environment;

[0012] Step 2: Based on the raw data obtained in step 1, the magnetometer is calibrated by a magnetometer linear calibration method based on magnetic inclination to obtain calibrated magnetometer data;

[0013] Step 3: Based on the magnetometer calibrated data obtained in step 2, the accelerometer and gyroscope raw data collected by the inertial sensor are compensated for errors;

[0014] Step 4: Calculate the lower limb joint angles using the calibrated accelerometer, gyroscope, and magnetometer data obtained in steps 1, 2, and 3, through zero-speed correction and complementary filtering.

[0015] As a further improvement of the present invention, the specific steps of step 1 are as follows:

[0016] Inertial sensors are worn at the waist, on the outside of the thighs, on the outside of the calves, and on the insteps of the feet. The movement paradigm is a three-meter sit-and-go test (TUG), in which the subject sits quietly on a chair of moderate height with their feet flat on the ground, their calves perpendicular to the ground, their knees at a 90-degree angle, and their backs upright. At the beginning, the subject is required to stand up, remain still for 3 seconds, and then walk at a normal speed to a marker 3 meters away from the chair. After passing the marker, turn around, walk back to the chair, turn around and sit down again, and return to a sitting position. This entire process is repeated twice.

[0017] As a further improvement of the present invention, the specific steps of step 2 are as follows:

[0018] Build an inertial sensor calibration model, install the inertial sensor at the joint position of the human body, and perform linear calibration based on the magnetic inclination angle on the raw accelerometer and magnetometer data obtained during the movement of the inertial sensor;

[0019] According to the original accelerometer data and magnetometer data collected by the inertial sensor, n groups of accelerometer and magnetometer corresponding data are selected to construct the information matrix H:

[0020]

[0021] in and are the three-axis original accelerometer data collected by the accelerometers of the inertial sensors at the corresponding parts, and the values ​​are the average accelerations of n relatively stable segments; similarly, and They are the three-axis raw magnetometer data collected by the magnetometer of the inertial sensor at the corresponding position, and the numerical value is the average value of the magnetic field intensity of n relatively stable segments.

[0022] Assume that the unknown parameter vector E in the calibration process is:

[0023]

[0024] Based on the unknown parameters, the entire model is constructed in the following matrix form according to n groups of stationary data segments during the motion process:

[0025]

[0026] Where ε is the general noise in the measurement process, and K is a column vector of constant values ​​related to the local magnetic inclination of the data measurement. The result is simplified to K = HE + ε

[0027] According to the least squares estimation method, the solution of the unknown parameter vector E is:

[0028]

[0029] Calibrate the model by error

[0030]

[0031] The calibrated magnetometer value can be solved and Complete the linear calibration of the magnetometer based on the magnetic inclination.

[0032] As a further improvement of the present invention, the specific steps of step 3 are as follows:

[0033] First, the raw data of the inertial sensor is preprocessed, including a series of operations such as filtering, denoising, and coordinate system transformation, aiming to eliminate or reduce these interferences, thereby improving the signal-to-noise ratio and retaining the effective signals in the data.

[0034] The foot accelerometer is then calibrated using the zero-speed correction method, and the calibrated accelerometer and magnetometer data are used to calculate the Euler angles. The inertial sensor calculates the Euler angles by fusing the accelerometer and magnetometer data. The accelerometer is used to calculate the pitch angle (Pitch) and roll angle (Roll).

[0035]

[0036] The magnetometer calculates the heading angle (Yaw) by compensating for pitch and roll. The method uses accelerometer data to calculate pitch and roll, and then uses magnetometer data combined with the compensated magnetic field value to calculate the heading angle.

[0037]

[0038] At this point, the Euler angles of the corresponding limb segments are obtained using the inertial sensor accelerometer and magnetometer.

[0039] Subsequently, the complementary filter fusion algorithm is used to update the lower limb posture, mainly based on the gyroscope's measurement value, and the estimated values ​​of the accelerometer and magnetometer are used to compensate the gyroscope to obtain a more accurate result. The input of the complementary filter is the Euler angle calculated by the accelerometer and magnetometer. The Euler angle after integrating the angular velocity output by the gyroscope Complementary filtering can be viewed as a combination of a low-pass filter (for accelerometer and magnetometer data) and a high-pass filter (for gyroscope data).

[0040]

[0041] Because gyroscopes typically outperform accelerometers in dynamic performance, they are generally weighted higher in complementary filtering, meaning the high-pass filter plays a dominant role. Updated Euler angle information for each limb segment is obtained.

[0042] As a further improvement of the present invention, the specific steps of step 4 are as follows:

[0043] Euler angles of each limb segment, calculate the knee and ankle angles of the lower limbs, where the knee angle θ knee_angle =θ thigh -θ calf , ankle joint angle: θ ankle_angle =θ foot -θ calf -90°.

[0044] Beneficial effects of the present invention:

[0045] 1. This invention discloses a method for calculating joint angles in indoor environments based on linear magnetometer calibration. When calculating human posture using the accelerometer and gyroscope in inertial sensors, the final calculated result can deviate from the true value due to accumulated errors. Using magnetic field strength data obtained by a magnetometer helps further correct the calculated joint angles, improving the accuracy and stability of the calculation. Therefore, obtaining accurate magnetometer output is particularly important in the joint angle calculation process.

[0046] 2. The linear magnetometer-based calibration algorithm of the present invention achieves joint angle calculation in indoor environments. A comparison of magnetometer data before and after calibration shows that after linear calibration of the magnetometer based on magnetic inclination, the convergence of the local total magnetic field intensity is significantly better than that of the original inertial sensor data. In addition, the three-dimensional spatial dispersion of the magnetometer is reduced, which is consistent with the relatively stable nature of the Earth's magnetic field, indicating that this method can achieve effective magnetometer calibration.

[0047] 3. In the TUG task, the complementary filtering method was used to update posture data, accurately calculating the angular changes of the knee and ankle joints. After initial alignment, coordinate system transformation, and complementary filtering, it was possible to accurately capture and calculate changes in spatial posture. The accuracy of parameters such as joint angles was improved by using calibrated magnetometer data. The calculated parameters were significantly more consistent with the data from the motion capture system, fully demonstrating the accuracy and reliability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is the wearing position of the inertial sensor of the present invention;

[0049] Figure 2 This is a schematic diagram of the three-meter sit-stand TUG of the present invention;

[0050] Figure 3 is a calibration flow chart of the magnetometer of the present invention;

[0051] Figure 4 is the magnetometer calibration result during the three-meter sit-stand TUG process of the present invention;

[0052] Figure 5 It is a schematic diagram of the lower limb joint calculation of the present invention;

[0053] Figure 6 This is a diagram showing changes in knee joint angles according to the present invention;

[0054] Figure 7 It is a diagram of ankle joint angle changes of the present invention. DETAILED DESCRIPTION

[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. It should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings, and the terms "inward" and "outward" refer to directions toward or away from the geometric center of a particular component, respectively.

[0056] This embodiment provides a method for calculating joint angles based on linear magnetometer calibration in an indoor environment, comprising the following steps:

[0057] Step 1: Based on the design of the wearing position and motion paradigm of the inertial sensor, complete the motion data collection work in a complex environment and obtain the raw motion data collected in complex indoor conditions;

[0058] The inertial sensors are worn at the waist, the outside of the thighs, the outside of the calves, and the instep of the feet. The specific diagram of the inertial sensor wearing position is as follows: Figure 1 shown.

[0059] The action paradigm is designed as a three-meter sit-stand TUG. Specifically, the subject sits quietly on a chair with a moderate backrest, with both feet flat on the ground, calves perpendicular to the ground, knees at 90 degrees, and back upright. At the beginning, the subject needs to stand up, stand still for 3 seconds after standing firmly, then walk at a normal speed to a marker 3 meters away from the seat, turn around after passing the marker, walk back to the chair, turn around and sit down again, and return to the sitting state. The whole process is repeated twice. The specific action paradigm diagram is shown below. Figure 2 shown.

[0060] Step 2: Based on the raw data obtained in step 1, implement the magnetometer calibration method, that is, the magnetometer linear calibration method based on the magnetic inclination, to obtain the calibrated inertial sensor data;

[0061] Build an inertial sensor calibration model, install the inertial sensor at the joint position of the human body, and perform linear calibration based on the magnetic inclination angle on the raw accelerometer and magnetometer data obtained during the movement of the inertial sensor;

[0062] According to the original accelerometer data and magnetometer data collected by the inertial sensor, n groups of accelerometer and magnetometer corresponding data are selected to construct the information matrix H:

[0063]

[0064] in and are the three-axis original accelerometer data collected by the accelerometers of the inertial sensors at the corresponding parts, and the values ​​are the average accelerations of n relatively stable segments; similarly, and They are the three-axis raw magnetometer data collected by the magnetometer of the inertial sensor at the corresponding position, and the numerical value is the average value of the magnetic field intensity of n relatively stable segments.

[0065] Assume that the unknown parameter vector E in the calibration process is:

[0066]

[0067] Based on the unknown parameters, the entire model is constructed in the following matrix form according to n groups of stationary data segments during the motion process:

[0068]

[0069] Where ε is the general noise in the measurement process, and K is a column vector of constant values ​​related to the local magnetic inclination of the data measurement. The result is simplified to K = HE + ε

[0070] According to the least squares estimation method, the solution of the unknown parameter vector E is:

[0071]

[0072] Calibrate the model by error

[0073]

[0074] The calibrated magnetometer value can be solved and Complete the linear calibration of the magnetometer based on magnetic inclination. The flow chart of the calibration process and the calibration results are as follows Figure 3 and Figure 4Numerical analysis results show that the mean value of the magnetic field strength before calibration decreased from 1.1562 to 0.9679, the standard deviation decreased from 0.3745 to 0.0149, and the coefficient of variation decreased from 0.2971 to 0.0105. This indicates that after calibration, the dispersion of the magnetometer results is greatly reduced, the data is more concentrated, the accuracy is significantly improved, the fluctuation range is significantly reduced, and the stability and consistency of the measurement results are greatly improved.

[0075] Step 3: Based on the magnetometer calibrated data obtained in step 2, the accelerometer and gyroscope raw data collected by the inertial sensor are compensated for errors;

[0076] First, the raw data of the inertial sensor is preprocessed, including a series of operations such as filtering, denoising, and coordinate system transformation, aiming to eliminate or reduce these interferences, thereby improving the signal-to-noise ratio and retaining the effective signals in the data.

[0077] The foot accelerometer is then calibrated using the zero-speed correction method, and the Euler angles are calculated using the calibrated accelerometer and magnetometer data. The inertial sensor calculates the Euler angles by fusing the accelerometer and magnetometer data. The accelerometer is used to calculate the pitch angle (Pitch) and roll angle (Roll).

[0078]

[0079] The magnetometer calculates the heading angle (Yaw) by compensating for pitch and roll. The method uses accelerometer data to calculate pitch and roll, and then uses magnetometer data combined with the compensated magnetic field value to calculate the heading angle.

[0080]

[0081] At this point, the Euler angles of the corresponding limb segments are obtained using the inertial sensor accelerometer and magnetometer.

[0082] Subsequently, the complementary filter fusion algorithm is used to update the lower limb posture, mainly based on the gyroscope's measurement value, and the estimated values ​​of the accelerometer and magnetometer are used to compensate the gyroscope to obtain a more accurate result. The input of the complementary filter is the Euler angle calculated by the accelerometer and magnetometer. The Euler angle after integrating the angular velocity output by the gyroscope Complementary filtering can be viewed as a combination of a low-pass filter (for accelerometer and magnetometer data) and a high-pass filter (for gyroscope data).

[0083]

[0084] Because gyroscopes typically outperform accelerometers in dynamic performance, they are generally weighted higher in complementary filtering, meaning the high-pass filter plays a dominant role. Updated Euler angle information for each limb segment is obtained.

[0085] Step 4: Calculate the lower limb joint angles using the processed accelerometer, gyroscope, and magnetometer data from steps 1, 2, and 3, through zero-speed correction and complementary filtering.

[0086] Euler angles of each limb segment, calculate the knee and ankle angles of the lower limbs, where the knee angle θ knee_angle =θ thigh -θ calf , ankle joint angle: θ ankle_angle =θ foot -θ calf -90°, the schematic diagram of the joint angle is as follows Figure 5 Based on the above calibrated joint angle calculation, the final joint angle results of the knee and ankle joints are as follows: Figure 6 and Figure 7 shown.

[0087] The technical means disclosed in the solution of the present invention are not limited to the technical means disclosed in the above-mentioned embodiment, but also include technical solutions composed of any combination of the above technical features.

Claims

1. A joint angle calculation method based on linear magnetometer calibration in an indoor environment, characterized in that: The following steps are involved: Step 1: Based on the design of the inertial sensor's wearing position and motion paradigm, complete the walking motion data collection work in a complex environment and obtain the raw walking motion data in an indoor environment; Step 2: Based on the raw data obtained in step 1, the magnetometer is calibrated by a magnetometer linear calibration method based on magnetic inclination to obtain calibrated magnetometer data; Step 3: Based on the magnetometer calibrated data obtained in step 2, the error of the accelerometer and gyroscope raw data collected by the inertial sensor is compensated. The specific contents of step 3 are as follows: First, the raw data from the inertial sensor is preprocessed, including filtering, denoising, and coordinate system transformation. Next, the foot accelerometer is calibrated using a zero-speed correction method, and Euler angles are calculated using the calibrated accelerometer and magnetometer data. The inertial sensor calculates Euler angles by fusing the accelerometer and magnetometer data. The accelerometer is used to calculate the pitch angle Pitch and roll angle Roll The magnetometer calculates the heading angle Yaw by compensating for pitch and roll. The specific method is to first calculate the pitch and roll angles using the accelerometer data, and then use the magnetometer data combined with the compensated magnetic field value to calculate the heading angle. So far, the Euler angles of the corresponding limb segments are obtained using the inertial sensor accelerometer and magnetometer; Subsequently, the complementary filter fusion algorithm is used to update the lower limb posture, mainly based on the gyroscope's measurement value, and the estimated values ​​of the accelerometer and magnetometer are used to compensate the gyroscope; the input of the complementary filter is the Euler angle calculated by the accelerometer and magnetometer The Euler angle after integrating the angular velocity output by the gyroscope Complementary filtering can be considered as a combination of low-pass and high-pass filters to obtain the updated Euler angle information of each limb segment; Step 4: Calculate the lower limb joint angles using the calibrated walking accelerometer, gyroscope, and magnetometer data obtained in steps 1, 2, and 3, through zero-speed correction and complementary filtering. The specific contents of step 4 are as follows: Euler angles of each limb segment, calculate the knee and ankle angles of the lower limbs, where the knee angle θ knee_angle =θ thigh -θ calf , ankle joint angle: θ ankle_angle =θ foot -θ calf -90°.

2. The joint angle calculation method based on linear magnetometer calibration in an indoor environment according to claim 1, characterized in that: The specific contents of step 1 are as follows: The inertial sensors are worn on the waist, the outer thighs of both legs, the outer calves of both legs, and the insteps of both feet; the movement paradigm is designed as a three-meter sit-stand, specifically, the subject sits quietly on a chair with a moderate height, with both feet flat on the ground, calves perpendicular to the ground, knee joints at 90 degrees, and back upright; at the beginning, the subject needs to stand up, stand still for 3 seconds after standing firmly, and then walk at a normal speed to a marker 3 meters away from the seat, turn around after passing the marker, walk back to the chair, turn around and sit down, and return to the sitting state. The whole process is repeated twice.

3. The joint angle calculation method based on linear magnetometer calibration in an indoor environment according to claim 1, characterized in that: The specific contents of step 2 are as follows: Build an inertial sensor calibration model, install the inertial sensor at the joint position of the human body, and perform linear calibration based on the magnetic inclination angle on the raw accelerometer and magnetometer data obtained during the movement of the inertial sensor; According to the original accelerometer data and magnetometer data collected by the inertial sensor, n groups of accelerometer and magnetometer corresponding data are selected to construct the information matrix H: in and are the three-axis original accelerometer data collected by the accelerometers of the inertial sensors at the corresponding parts, and the values ​​are the average accelerations of n relatively stable segments; similarly, and are the three-axis raw magnetometer data collected by the magnetometer of the inertial sensor at the corresponding position, and the numerical value is the average value of the magnetic field intensity of n relatively stable segments; Assume that the unknown parameter vector E in the calibration process is: Based on the unknown parameters, the entire model is constructed in the following matrix form according to n groups of stationary data segments during the motion process: Where ε is the general noise in the measurement process, and K is a constant related to the local magnetic inclination of the data measurement; the result is simplified to K = HE + ε; According to the least squares estimation method, the solution of the unknown parameter vector E is: Calibrate the model by error The calibrated magnetometer value can be solved and Complete the linear calibration of the magnetometer based on the magnetic inclination.