A method, system, device and related equipment for real-time estimation of joint angle
Through sliding window technology and joint physiological kinematics constraint optimization, combined with acceleration and angular velocity calculations, high-precision estimation and anti-disturbance of the knee joint angle are achieved, solving the problems of low knee joint angle estimation accuracy and insufficient anti-disturbance ability in the existing technology. problem, achieving high-precision and real-time joint angle monitoring.
Patent Information
- Application Number
- CN202411041347.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-31
AI Technical Summary
The accuracy of real-time estimation of the knee joint angle in the existing technology is low. Especially when the inertial wearable inertial node is unstable or is subject to external interference, the measurement error is large and it cannot effectively resist disturbance.
Receive knee joint data through the sliding window, establish joint physiological kinematics constraints, solve the joint physiological motion optimization equation, obtain the joint axis and position vector, calculate the joint angle by combining acceleration and angular velocity, and use complementary filtering weighted average to use mathematical indicators for disturbance Judgmental and greedy algorithms dynamically update thresholds to resist perturbations.
The accuracy and anti-disturbance ability of knee joint angle estimation are improved, and the detection accuracy reaches more than 90%, ensuring the high accuracy and stability of real-time calculation.
Smart Images

Figure CN118557183B_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes a joint angle real-time estimation method, system, device and related equipment, belonging to the technical field of wearable device data acquisition. Background Art
[0002] In normal daily activities, monitoring and evaluating the mechanical and physiological characteristics of key joints can provide valuable insights into the occurrence and development of different musculoskeletal diseases. Among all joints, the knee joint is the most critical joint for human mobility. This is because the knee joint is the main bodyweight bearer and plays a vital role in mobility. Real-time monitoring of the knee joint can continuously provide important information related to knee health and mobility. This information can be used for health assessment, early diagnosis of activity-related problems, and monitoring recovery after injury or surgery. The knee angle is a key parameter for real-time monitoring of the knee joint.
[0003] In the prior art, the use of inertial wearable inertial nodes to estimate joint angles generally takes the following three steps:
[0004] First, estimate the "absolute orientation" of the inertial wearable inertial node to track the relative orientation relationship between the inertial wearable inertial node coordinate system and the earth coordinate system during body movement. In practice, the posture of the inertial wearable inertial node cannot be used directly to estimate the joint angle because the IMU (Inertial Measurement Unit) coordinate system is not aligned with the coordinate system of the body segment or joint. This misalignment will lead to large estimation errors, so we have to perform calibration procedures, which are to align the inertial wearable inertial node coordinate system with the body coordinate system. The calibration procedure is performed through kinematic constraints, and the cost function is constructed using kinematic constraints;
[0005] Secondly, the joint axis and joint position vector are used to obtain the acceleration and angular velocity of the two inertial wearable inertial nodes. The acceleration and angular velocity are calculated to obtain two sets of joint angles. The weighted average of the two sets of joint angles is obtained through complementary filtering to solve the joint angle.
[0006] Finally, external disturbances are processed. An implicit assumption of the real-time joint angle calculation algorithm is that after executing the calibration procedure (i.e., the solution of the joint axis), the inertial wearable inertial node will not move relative to the human limb on which it is installed. However, if the inertial wearable inertial node moves during the real-time measurement of the joint angle due to disturbances caused by some occasional collisions or loose accessories, a large estimation error will be generated. The idea of processing disturbances is generally to obtain data for the current period and the next period of the current period in real time through a sliding window, compare the data received by different sliding windows, and compare the second norm of the difference with the threshold. If it does not exceed the threshold, it is judged that the sensor has not moved, and the joint angle solution continues; if it exceeds the threshold, it is judged that the sensor has moved, the angle solution is stopped, the joint axis vector solution is restarted, and the joint axis vector coordinates are updated.
[0007] At present, similar technical solutions are:
[0008] Paper: Seel, T.; Raisch, J.; Schauer, T. IMU-Based Joint Angle Measurement for Gait Analysis. Sensors 2014, 14, 6891-6909. This paper proposes a new method for joint axis and position identification, as well as flexion and extension joint angle measurement. In particular, a method that uses only gyroscopes and accelerometers and does not rely on homogeneous magnetic fields is proposed. The final measurement result shows that the root mean square error of knee flexion and extension is less than 1 degree on the prosthesis and about 3 degrees on the human leg. For plantar flexion / dorsiflexion of the ankle joint, the deviation of both is about 1 degree. This paper provides the most favorable theoretical basis for the calculation of joint angles, but the paper only involves the correction of inertial wearable inertial nodes, and does not involve the problem of anti-disturbance.
[0009] Patent document 1: A wearable inertial device human gait information collection and calculation method; application number is 201711408588.4; the invention discloses a wearable inertial device human gait information collection and calculation method, which relates to the field of exoskeleton gait law information collection; comprising the following steps: step (a), installing 4 accelerometers and 2 IMUs on the human leg; step (b), calculating the first knee joint angle according to the thigh pitch angle and the calf pitch angle; step (c), calculating the second knee joint angle according to the thigh inclination angle and the calf inclination angle; step (d), establishing the first IMU coordinate system of the human thigh and the second IMU coordinate system of the calf; step (e), establishing the relationship equation between the first knee joint angle and the second knee joint angle; step (six), performing Kalman filter calculation to obtain the knee joint angle error and compensate the knee joint angle; the present invention realizes real-time non-contact measurement of human gait information, obtains accurate knee joint angle information, and combines the basic human information collected at the beginning to solve the information such as step length, step frequency and leg lift height during human walking. This patent has two major shortcomings: first, there are too many devices to be worn, a total of 4 accelerometers and 2 IMUs need to be installed, and the installation process is too complicated; second, the IMU cannot be calibrated and needs to be calibrated manually.
[0010] Patent document 2: A human motion acquisition method based on inertial sensors without the need for standard correction posture; application number is 202010117861.3; this invention discloses a human motion acquisition method based on inertial sensors without the need for standard correction posture. Step 1: Install the IMU and establish joint physiological kinematic constraints; Step 2: Using the IMU in step 1, when the number of sampling points of the IMU exceeds 100, according to the joint physiological kinematic constraints, run the optimization program and use the Gauss-Newton method to estimate the joint axis and joint position vector; Step 3: Using the solved joint axis and joint position vector, two sets of joint angles are obtained respectively by integrating the acceleration information and angular velocity; Step 4: The weighted average of the two sets of joint angles in step 3 is obtained by complementary filtering to obtain the solved joint angle. The purpose of the present invention is to decode the IMU signal of the lower limbs of the human body, and to solve the angles of the hip joint, knee joint and ankle joint of the lower limb in real time according to the kinematic model of the lower limbs of the human body. However, this patent cannot produce effective intervention measures for disturbances.
[0011] Patent document 3: A real-time method for calculating joint angles that are resistant to positional movement based on inertial sensors; application number 202010117558.3; This invention discloses a real-time method for calculating joint angles that are resistant to positional movement based on inertial sensors. The purpose of this invention is to solve the problem of measurement error caused by the movement of the sensor relative to the limbs in the process of estimating human joint angles using inertial sensors. However, the invention has too single a judgment indicator for disturbance, and the setting of the threshold is too arbitrary, which is completely determined by experience, and the detection accuracy of disturbance is not high. Summary of the invention
[0012] In order to solve the problem of low accuracy of real-time estimation of joint angles in the prior art, the present invention provides a real-time estimation method, system, device and related equipment for joint angles. The method solves the disturbance problem caused by unstable wearing or external interference during the measurement of inertial sensor wearable inertial nodes, thereby improving the measurement accuracy of wearable devices.
[0013] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0014] In a first aspect, the present invention provides a method for estimating a joint angle of a knee joint, comprising:
[0015] Receive knee joint data through a sliding window, establish joint physiological kinematic constraints, and establish joint physiological motion optimization equations based on the joint physiological kinematic constraints; solve the joint physiological motion optimization equations to obtain the joint axis and joint position vector;
[0016] Based on the joint axis and the joint position vector, two groups of joint angles are obtained through acceleration information and angular velocity; and the weighted average of the two groups of joint angles is obtained through complementary filtering to obtain the joint angle.
[0017] As a further improvement of the present invention, after receiving the knee joint data through the sliding window, the method further includes: a disturbance determination step; the disturbance determination step includes:
[0018] After collecting the knee joint data in the time window, the disturbance is judged. If the disturbance is greater than the threshold, the joint axis and joint position vector are re-estimated according to the optimization principle;
[0019] Mathematical indicators are used to quantify the changes in knee joint data in time windows, a greedy algorithm is used according to the quantified indicators to obtain an optimal threshold, and the real-time threshold is updated based on the optimal threshold.
[0020] As a further improvement of the present invention, the method of receiving knee joint data through a sliding window and establishing joint physiological kinematic constraints, and establishing joint physiological motion optimization equations based on the joint physiological kinematic constraints, includes:
[0021] Collect knee joint data in several cycles, including acceleration and angular velocity data;
[0022] Receive knee joint data through a sliding window and establish joint physiological kinematic constraints;
[0023] According to the joint physiological kinematic constraints, the joint physiological motion optimization equation is established.
[0024] Specifically, the knee joint data within several cycles, including acceleration and angular velocity data, are collected, the knee joint data is received through a sliding window, and the joint physiological kinematic constraints are established:
[0025]
[0026]
[0027] In the formula, , The first inertia node and the second inertia node are any time t Angular velocity; j 1. j 2 are the joint axis vectors of the first inertial sensor module and the second inertial sensor module respectively, , The first inertial sensor module and the second inertial sensor module are respectively t The acceleration of o 1, o 2 is the radial and tangential acceleration caused by rotation around the joint center, represents different joint centers, For any time t , is the two-norm of the matrix / vector;
[0028] in, j 1, j 2 The coordinates in the spherical coordinate system are as follows:
[0029]
[0030] In the formula, φ 1, φ 2 is the azimuth in the spherical coordinate system, θ 1, θ 2 is the polar angle in the spherical coordinate system; cos() is the cosine function, sin() is the sine function, T is the transpose of a vector;
[0031] According to the joint physiological kinematic constraints, the joint physiological motion optimization equation is established:
[0032]
[0033]
[0034] In the formula, Ψ is the sum of squared errors; e i is the error of the upper and lower joint parameters.
[0035] As a further improvement of the present invention, the solution of the joint physiological motion optimization equation to obtain the joint axis and the joint position vector is to optimize the joint physiological motion optimization equation using the Gauss-Newton method to estimate the joint axis and the joint position vector.
[0036] As a further improvement of the present invention, the two sets of joint angles are obtained based on the joint axis and the joint position vector through acceleration information and angular velocity, including:
[0037] Based on the joint axis and the joint position vector, a first set of joint angles is calculated by integrating the angular velocity;
[0038] Based on the joint axis and the joint position vector, a second set of joint angles is obtained using acceleration.
[0039] Specifically, based on the joint axis and the joint position vector, two sets of joint angles are obtained by integrating acceleration information and angular velocity, including:
[0040] Use angular velocity to find the joint angle:
[0041]
[0042] In the formula, α gyr is the joint angle calculated based on the angular velocity, , The first inertia node and the second inertia node are any time t Angular velocity; j 1. j 2 are the joint axis vectors of the first inertial sensor module and the second inertial sensor module respectively, dτ is the unit time ;
[0043] Use acceleration to find the joint angle:
[0044]
[0045] In the formula, α acc is based on the acceleration joint angle, 、 is the acceleration, x 1. x 2.y 1. y 2 is the joint plane axis, Represents the angle in two dimensions of R².
[0046] As an optional solution, the weighted average of the two groups of joint angles is obtained by complementary filtering to obtain the joint angles, including:
[0047]
[0048] In the formula, λ is the complementary filtering factor, α acc+qyr (t) Yes t The joint angle at the moment, α acc+qyr (t-△t) is the joint angle at time t-△t, α gyr (t) is the joint angle based on the angular velocity at time t, α gyr (t-△t) is the joint angle at the moment t-△t based on the angular velocity.
[0049] As a further improvement of the present invention, after receiving the knee joint data through the sliding window, a disturbance determination step is also included; the disturbance determination step includes:
[0050] After collecting the knee joint data in the time window, the disturbance is judged. If the disturbance is greater than the threshold, the joint axis and joint position vector are re-estimated.
[0051] Mathematical indicators are used to quantify the changes in knee joint data in time windows, a greedy algorithm is used according to the quantified indicators to obtain an optimal threshold, and the real-time threshold is updated based on the optimal threshold.
[0052] As a further improvement of the present invention, the changes in knee joint data in time windows are quantified using mathematical indicators, including:
[0053] Get the acceleration, angular velocity, and joint angle vector of the first window;
[0054] Get the acceleration, angular velocity, and joint angle vector of the second window;
[0055] Calculate the change in the joint angle produced by the two vectors, the joint angle change Δj= J 2- J 1. Acceleration change Δa= a 2- a 1. Angular velocity change Δ w = w 2- w 1;
[0056] Combine the changes of multiple indicators to generate the final change. The final change △Q = d × joint angle change + e × acceleration change + f × angular velocity change. The disturbance amount Δchange = mean(d × Δj + e × Δa + f × Δw), where mean represents the average value, and d, e, and f are random numbers that satisfy d + e + f = 1.
[0057] As a further improvement of the present invention, obtaining the optimal threshold using the greedy algorithm according to the quantified indicators includes:
[0058] Take initial values: take random values for d, e, and f;
[0059] Under the state where the inertial node is absolutely stationary without disturbance, use a sliding window to obtain multiple groups of ΔQ, find the minimum value a and the maximum value b in ΔQ, and form ΔQ normal ∈[a, b], ΔQ normal is the normal value range without external disturbance; under the condition of slight disturbance of the inertial node, use a sliding window to obtain multiple groups of ΔQ, find the minimum value c and the maximum value d in ΔQ to form ΔQ unnormal ∈[c, d], ΔQ unnormal is the abnormal value range affected by external disturbance;
[0060] Take various different values for d, e, and f, and find the values that make ΔQ normal and ΔQ unnormal take the maximum range of values.
[0061] As a further improvement of the present invention, updating the real-time threshold based on the optimal threshold includes:
[0062] Quantify according to different mathematical indicators and calculate the change value, and take the maximum value in the change values as the optimal threshold for updating the real-time threshold.
[0063] Specifically, perform real-time judgment and update based on the initial value:
[0064] If the current change ΔQ ∈ ΔQ normal , then the inertial module has normal motion changes;
[0065] If the current change ΔQ ∈ ΔQ unnormal , then there is a disturbance, stop the angle solution, restart the joint axis vector solution, and update the joint axis vector coordinates;
[0066] If the current change ΔQ ∉ ΔQ normal and ΔQ ∉ ΔQ unnormal :
[0067] Moreover, if ΔQ < a or ΔQ > d, continue the next round of calculation of ΔQ,
[0068] If |ΔQ-b|>|ΔQ-c|, expand ΔQnormal∈[a,ΔQ]; if |ΔQ-b|<|ΔQ-c|, expand ΔQnormal∈[ΔQ,d].
[0069] In a second aspect, the present invention provides a device for estimating a joint angle of a knee joint, comprising:
[0070] A vector solving unit is used to receive knee joint data through a sliding window, establish joint physiological kinematic constraints, and establish joint physiological motion optimization equations based on the joint physiological kinematic constraints; solve the joint physiological motion optimization equations to obtain joint axis and joint position vectors;
[0071] The angle solving unit is used to obtain two groups of joint angles based on the joint axis and the joint position vector through acceleration information and angular velocity; and to obtain the joint angle by performing weighted averaging on the two groups of joint angles through complementary filtering.
[0072] As a further improvement, it also includes: a disturbance judgment unit: used to perform disturbance judgment on the knee joint data collected in time windows. If the disturbance amount is greater than a threshold, the joint axis and joint position vector are re-estimated according to the optimization principle; mathematical indicators are used to quantify the changes in the knee joint data in time windows, and a greedy algorithm is used according to the quantified indicators to obtain the optimal threshold, and the real-time threshold is updated based on the optimal threshold.
[0073] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for estimating the joint angle of the knee joint when executing the computer program.
[0074] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for estimating the joint angle of the knee joint is implemented.
[0075] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions instruct a computer to execute the method for estimating the joint angle of the knee joint.
[0076] In a sixth aspect, the present invention provides a wearable device, comprising: two embedded wearable inertial nodes, each wearable inertial node comprising an inertial sensor module, a main control chip module, a wireless communication module and a power module, the two embedded wearable inertial nodes being used to receive knee joint data collected by the inertial sensor module in real time through the inertial sensor module, and then send the knee joint data through a sliding window through the wireless communication module; the inertial sensor module comprises a three-axis acceleration, a three-axis gyroscope, and a three-axis angular velocity.
[0077] In a seventh aspect, the present invention provides a system for estimating a joint angle of a knee joint, comprising:
[0078] A device module, using the above-mentioned wearable device;
[0079] The joint angle calculation module adopts the above-mentioned knee joint angle estimation device.
[0080] The beneficial effects of the present invention compared with the prior art are as follows:
[0081] The present invention quantifies the change in disturbance by fusing joint axes, acceleration and angular velocity, thereby solving the disturbance problem caused by unstable wearing or external interference during the measurement of inertial sensor wearable inertial nodes, and the judgment of disturbance has a high accuracy of more than 90%.
[0082] Then, the threshold is dynamically updated through a greedy algorithm based on mathematical indicators, which greatly improves the accuracy of anti-interference. The real-time calculation algorithm of the joint angle is combined with anti-interference, which not only achieves high real-time calculation, but also can detect external disturbances, and this detection will not have a significant impact on real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0084] Figure 1 A schematic diagram of the basic framework of the device provided by an embodiment of the present invention;
[0085] Figure 2 The inertial sensor network schematic diagram of an embodiment of the present invention;
[0086] Figure 3 Schematic diagram of the overall algorithm framework of an embodiment of the present invention;
[0087] Figure 4 A schematic diagram of a greedy threshold real-time calculation algorithm according to an embodiment of the present invention;
[0088] Figure 5 This is a schematic diagram of the experimental success rate of an embodiment of the present invention;
[0089] Figure 6 A flow chart of a method for estimating the joint angle of a knee joint provided by the present invention;
[0090] Figure 7 A joint angle estimation device for a knee joint provided by the present invention;
[0091] Figure 8 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0092] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0093] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0094] Based on the introduction of background technology, it can be found that the key to improving accuracy lies in the selection of perturbation index and threshold. The specific reasons are:
[0095] 1. In the setting of disturbance indicators, the indicators usually used are the measured values of the inertial wearable inertial nodes, that is, the linear acceleration and angular rate as indicators. However, this method is too simple. In addition to the changes caused by the movement of the inertial wearable inertial nodes, the measurement differences between the sliding windows also include changes caused by measurement noise. This may cause the changes caused by the movement of the inertial wearable inertial nodes to be overwhelmed by the changes caused by factors other than the movement of the inertial wearable inertial nodes. The disturbance indicator also has an impact on the setting of subsequent thresholds. Therefore, the indicators for measuring disturbances using inertial wearable inertial nodes should be carefully designed.
[0096] 2. There is no one right solution for the selection of thresholds, which are usually set arbitrarily based on intuition. To make interference detection both sensitive and robust, the selected threshold needs to balance the trade-off between the possibility of false detection and the minimum amplitude of the detected inertial wearable inertial node movement. In other words, the optimal threshold of the adopted indicator should be determined to detect the minimum inertial wearable inertial node movement and adapt to the indicator changes caused by other factors such as body movement and measurement noise.
[0097] For this reason, Figure 6 As shown, the present invention provides a method for estimating the joint angle of a knee joint, comprising:
[0098] S100, receiving knee joint data through a sliding window, establishing joint physiological kinematic constraints, and establishing joint physiological motion optimization equations based on the joint physiological kinematic constraints; solving the joint physiological motion optimization equations to obtain joint axis and joint position vectors;
[0099] S200, based on the joint axis and the joint position vector, two groups of joint angles are obtained through acceleration information and angular velocity; and the two groups of joint angles are weighted averaged through complementary filtering to obtain the joint angles.
[0100] The principle is:
[0101] Sliding window receiving knee joint data: Through the sliding window technology, this method can continuously and in real time receive sensor data of the knee joint (such as acceleration, angular velocity, etc.). The sliding window allows the data to be processed and updated over a period of time, which helps to capture dynamic changes and reduce noise interference.
[0102] Establishing joint physiological kinematic constraints: The introduction of joint physiological kinematic constraints is based on the understanding of the anatomical structure and movement laws of the human knee joint. These constraints include the range of motion of the joint, the trajectory of motion, the mechanical properties of muscles and ligaments, etc. These constraints help ensure that the estimated joint angles are consistent with the actual human physiology.
[0103] Establish and solve the optimization equation of joint physiological motion: Based on the joint physiological kinematic constraints, construct the optimization equation to solve the joint axis and joint position vector. This process is achieved through mathematical optimization methods (such as least squares method, gradient descent method, etc.), the purpose is to find the optimal joint parameters so that the estimated results are closest to the actual situation.
[0104] Acceleration information and angular velocity integration to obtain joint angles: Using the data from the acceleration sensor and angular velocity sensor (such as the gyroscope in the IMU), two sets of joint angles can be obtained through integration operations. The acceleration data can reflect the direction change of gravity acceleration, while the angular velocity data can reflect the rotation rate of the joint.
[0105] Complementary filtering weighted averaging: Complementary filtering is a method of fusing data from different sensors to reduce the error of a single sensor data by weighted averaging. Here, the angle obtained by integrating acceleration and the angle obtained by integrating angular velocity are processed by complementary filtering to obtain a more accurate and stable joint angle estimation.
[0106] Among them, the sliding window technology ensures the real-time data processing, while the optimization solution based on physiological kinematic constraints and complementary filtering weighted averaging improves the accuracy of joint angle estimation. The introduction of physiological kinematic constraints and the fusion processing of multiple sensor data make this method more robust to noise and outliers and can work stably in complex environments. This method is not only applicable to the knee joint, but can also be extended to the angle estimation of other joints, and has broad application prospects.
[0107] In clinical medicine and rehabilitation therapy, accurate joint angle estimation is of great significance for evaluating treatment effects and formulating rehabilitation plans. This method provides a powerful tool for clinicians and rehabilitation therapists. This knee joint angle estimation method achieves accurate, real-time and robust estimation of knee joint angles by comprehensively applying multiple technologies and methods, and has significant clinical and scientific research value.
[0108] As an optional solution, after receiving the knee joint data through the sliding window, the method further includes: a disturbance determination step; the disturbance determination step includes:
[0109] After collecting the knee joint data in the time window, the disturbance is judged. If the disturbance is greater than the threshold, the joint axis and joint position vector are re-estimated according to the optimization principle;
[0110] Mathematical indicators are used to quantify the changes in knee joint data in time windows, a greedy algorithm is used according to the quantified indicators to obtain an optimal threshold, and the real-time threshold is updated based on the optimal threshold.
[0111] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0112] The basic contents of the invention are as follows Figure 1 As shown, the invention consists of two parts:
[0113] 1. Equipment module: An inertial sensor network system for human equipment was created. The system consists of two embedded wearable inertial nodes. Each wearable inertial node contains an inertial sensor module (three-axis acceleration, three-axis gyroscope, three-axis angular velocity), a main control chip module, a wireless communication module, and a power module. These two inertial wearable inertial nodes receive nine-axis data in real time through the inertial sensor module, and then send it to the client's host computer through the wireless communication module.
[0114] 2. Joint angle calculation module: This module combines the greedy threshold algorithm and disturbance quantification algorithm with the traditional joint angle real-time calculation algorithm. It can finally resist uncontrollable external disturbances with high precision according to the actual situation of the inertial sensor module. At the same time, it can also calculate the current joint angle in real time. If disturbance occurs, the joint axis vector is immediately recalculated to achieve real-time correction.
[0115] The embodiment of the present invention provides a simple, low-power, low-cost intelligent wearable device based on inertial sensors to calculate the joint angle of the knee joint in real time. The device is composed of two inertial wearable inertial nodes, each of which is composed of a main control module, a nine-axis inertial sensor, a wireless communication module and a power module. The device identifies the joint axis coordinates by establishing a joint axis, thereby realizing the correction of the coordinate system, and calculates the real-time joint angle through a complementary filtering algorithm after the correction of the coordinate system. The present invention mainly solves the disturbance problem caused by unstable wearing or external interference during the measurement of the inertial sensor wearable inertial node by setting a disturbance index and designing a greedy threshold algorithm, and the judgment of the disturbance has a high accuracy of more than 90%.
[0116] The composition of the inertial sensor network of wearable inertial devices is as follows Figure 2 As shown in the figure: Each wearable inertial node consists of a main control chip of model esp32s3 and an MPU (Microprocessor Unit) 6500 (model) inertial sensor. The MPU6500 inertial sensor transmits data with the main control through the IIC (Inter-Integrated Circuit, a serial communication protocol) interface. Finally, the data received by each main control is transmitted to the host computer through the ESP-NOW (a wireless communication protocol developed by Espressif) protocol. The ESP-NOW protocol can directly, quickly and with low power consumption control smart devices without a router. It is a wireless communication protocol based on the data link layer. It simplifies the upper five layers of the network protocol, including the network layer, transport layer, session layer, presentation layer, and application layer, into one layer. When transmitting data, there is no need to go through the complex layers such as the network layer, transport layer, session layer, presentation layer, and application layer in sequence, nor is there a need to add packet headers and unpacking layers, which greatly alleviates the jamming and delay caused by packet loss when the network is congested, and has a higher response speed.
[0117] The overall algorithm framework of the joint calculation module is as follows: Figure 3 As shown, the overall steps of the algorithm are:
[0118] 1. At the beginning of the program, more than 200 sampling points are sampled. Using these sampling points, the Gauss-Newton method is used to estimate the joint axis and joint position vector according to the physiological kinematic constraints of the joint.
[0119] 2. Execute the joint angle real-time calculation algorithm and the disturbance detection algorithm respectively. Module one is the joint angle real-time calculation algorithm, and module two and module three are combined into the disturbance detection algorithm.
[0120] 3. In the real-time calculation algorithm of joint angle, the joint axis and joint position vector are solved, and two sets of joint angles are obtained through acceleration information and angular velocity. The weighted average of the two sets of joint angles is calculated through complementary filtering to solve the joint angle
[0121] 4. In the disturbance detection algorithm, after collecting the data of the time-separated windows, the disturbance is first judged. If the disturbance amount is greater than the threshold, the joint axis and joint position vector are re-estimated according to the optimization principle. After the judgment, the data changes of the time-separated windows are quantified using mathematical indicators. According to the quantified indicators, the greedy algorithm is used to obtain the optimal threshold, so as to achieve real-time threshold update.
[0122] The following is a detailed description of each step:
[0123] The real-time calculation algorithm of joint angle in module 1 includes the following steps:
[0124] Step 1: Collect knee joint data within several cycles, including acceleration and angular velocity data, receive knee joint data through a sliding window, and establish joint physiological kinematic constraints:
[0125]
[0126]
[0127] In the formula, , The first inertia node and the second inertia node are any time t Angular velocity; j 1. j 2 are the joint axis vectors of the first inertial sensor module and the second inertial sensor module respectively, , The first inertial sensor module and the second inertial sensor module are respectively t The acceleration of o 1, o 2 is the radial and tangential acceleration caused by rotation around the joint center, represents different joint centers, For any time t , is the two-norm of the matrix / vector;
[0128] in, j 1, j 2 The coordinates in the spherical coordinate system are as follows:
[0129]
[0130] In the formula, φ 1, φ2 is the azimuth in the spherical coordinate system, θ 1, θ 2 is the polar angle in the spherical coordinate system; cos() is the cosine function, sin() is the sine function, T is the transpose of a vector;
[0131] According to the joint physiological kinematic constraints, the joint physiological motion optimization equation is established:
[0132]
[0133]
[0134] In the formula, Ψ is the sum of squared errors; e i is the error of the upper and lower joint parameters.
[0135] Solve the joint physiological motion optimization equation to obtain the joint axis and joint position vector, including:
[0136] The Gauss-Newton method is used to optimize the joint physiological motion optimization equation to estimate the joint axis and joint position vector.
[0137] Based on the joint axis and the joint position vector, two sets of joint angles are obtained through acceleration information and angular velocity, including:
[0138] Use angular velocity to find the joint angle:
[0139]
[0140] In the formula, α gyr is the joint angle calculated based on the angular velocity, , The first inertia node and the second inertia node are any time t Angular velocity; j 1. j 2 are the joint axis vectors of the first inertial sensor module and the second inertial sensor module respectively, dτ is the unit time ;
[0141] Use acceleration to find the joint angle:
[0142]
[0143] In the formula, α acc is based on the acceleration joint angle, 、 is the acceleration, x 1. x 2. y1. y 2 is the joint plane axis, Represents the angle in two dimensions of R².
[0144] The weighted average of the two groups of joint angles is obtained through complementary filtering to obtain the joint angles, including:
[0145]
[0146] In the formula, λ is the complementary filtering factor, α acc+qyr (t) Yes t The joint angle at the moment, α acc+qyr ( t -△ t )yes t -△ t The joint angle at the moment, α gyr ( t ) is based on the angular velocity t The joint angle at the moment, α gyr ( t -△ t ) is based on the angular velocity t -△ t The joint angle at the moment.
[0147] The perturbation quantization algorithm of module 2 includes the following steps:
[0148] 1. Get the acceleration and angular velocity of the first window and re-estimate the joint angle vector;
[0149] 2. Get the acceleration and angular velocity of the second window and re-estimate the joint angle vector;
[0150] 3. Calculate the changes, joint angle change △j= J 2- J 1. Acceleration change △ a = a 2- a 1. Angular velocity change △ w =w2-w1;
[0151] 4. Adopt the idea of multi-indicator fusion and combine the changes of multiple indicators to produce the final change. The final change △Q = d × joint angle change + e × acceleration change + f × angular velocity change, so the disturbance Δchange = mean (d × Δj + e × Δa + f × Δw), where d + e + f = 1, which can be adjusted according to actual conditions.
[0152] Among them, mean represents the average value, and d, e, and f are random numbers that satisfy d+e+f=1.
[0153] Among them, the changes are quantified according to the sliding window:
[0154] △j=Jwindow2-Jwindow1
[0155] △a=Awindow2 -Awindow1
[0156] △w=Wwindow2 -Wwindow1
[0157] △Q=d×△j+e×△a+f×△w(d+e+f=1)
[0158] Where △j is the change in joint angle, △a is the change in acceleration, and △w is the change in angular velocity.
[0159] Module three, such as Figure 4 As shown, the real-time greedy threshold calculation algorithm includes the following steps:
[0160] After quantifying the change with ΔQ, make a judgment on ΔQ=d×Δj+e×Δa+f×Δw.
[0161] 1. Take the initial value:
[0162] For d, e, and f in ΔQ=d×Δj+e×Δa+f×Δw, random values are taken (d+e+f=1).
[0163] Under a certain value, when the inertial node is absolutely stationary and undisturbed, multiple groups of ΔQ are obtained multiple times using a sliding window, and the minimum value a and the maximum value b among these ΔQ are found to form ΔQ normal ∈[a,b]; when the inertial node is slightly disturbed, use the sliding window to obtain multiple groups of ΔQ multiple times, find the minimum value c and the maximum value d among these ΔQ to form ΔQ unnormal ∈[c,d];
[0164] Take different values of d, e, and f in ΔQ=d×Δj+e×Δa+f×Δw (d+e+f=1) and find the value that makes ΔQ normal With ΔQ unnormal Take a value in the largest range (greedy algorithm).
[0165] Among them, ΔQ normal It is the normal value range without external disturbance; ΔQ unnormal It is an abnormal value range affected by external disturbances.
[0166] 2. Make real-time judgment and update based on the initial value:
[0167] If the current changes ΔQ∈ΔQ normal, it indicates normal motion changes of the inertial module, and the next round of calculation of ΔQ continues;
[0168] If the current change ΔQ ∈ ΔQ unnormal , it indicates that a disturbance has occurred at this time. Stop the angle calculation, restart the solution of the joint axis vector, and update the joint axis vector coordinates;
[0169] If the current change ΔQ ∉ ΔQ normal and ΔQ ∉ ΔQ unnormal :
[0170] If ΔQ < a or ΔQ > d, continue the next round of calculation of ΔQ;
[0171] If |ΔQ - b| > |ΔQ - c|, expand ΔQ normal ∈[a, ΔQ], if |ΔQ - b| < |ΔQ - c|, expand ΔQ normal ∈[ΔQ, d].
[0172] As an example, the pseudo-code implementation method of the initial threshold setting algorithm includes:
[0173] Quantitatively calculate multiple sets of change values according to different mathematical indicators to obtain the change range, that is, including the change range under normal conditions and the change range under disturbed conditions, and take the maximum change range as the initial threshold setting;
[0174] Explain the greedy-based threshold algorithm:
[0175] The input is to obtain different quantization standards by taking different values of d, e, f, and the output is the maximum threshold range
[0176] By taking different values of d, e, f to obtain multiple sets of change values, find the maximum and minimum values of the change values to obtain the change value range area, and take the largest range as the initial range.
[0177] Based on the above description, the following specific advantages of this embodiment can be obtained:
[0178] High real-time performance: It is reflected that the communication protocol can achieve a control delay of milliseconds and a control distance higher than that of Bluetooth transmission;
[0179] High-precision anti-disturbance: It can exclude the changes in the normal measurement values of the IMU itself, thus avoiding false detection; it can also detect the abnormalities caused by the movement of the IMU and detect the smallest IMU movement disturbance.
[0180] Such as Figure 5As shown: the running inertial wearable inertial node is disturbed by actively creating disturbances from the outside world, 1000 times each time, and a total of 6 experiments are conducted. It can be seen that the detection accuracy of the disturbance is about 90%.
[0181] Therefore, the method of the present invention can generally achieve a high-precision anti-disturbance effect of more than 90% while calculating the joint angle in real time.
[0182] like Figure 7 As shown, the second object of the present invention is to provide a joint angle estimation system for a knee joint, comprising:
[0183] The vector solving unit 10 is used to receive the knee joint data through the sliding window, establish the joint physiological kinematics constraints, and establish the joint physiological motion optimization equation based on the joint physiological kinematics constraints; solve the joint physiological motion optimization equation to obtain the joint axis and joint position vector;
[0184] The angle solving unit 20 is used to obtain two sets of joint angles based on the joint axis and the joint position vector through acceleration information and angular velocity; and to obtain the joint angles by performing weighted averaging on the two sets of joint angles through complementary filtering.
[0185] Optionally, the device further comprises:
[0186] Disturbance judgment unit 30: used to perform disturbance judgment on the knee joint data collected in the time windows. If the disturbance amount is greater than the threshold, the joint axis and the joint position vector are re-estimated according to the optimization principle; mathematical indicators are used to quantify the changes in the knee joint data in the time windows, and a greedy algorithm is used according to the quantified indicators to obtain the optimal threshold, and the real-time threshold is updated based on the optimal threshold.
[0187] like Figure 8 As shown, the third purpose of the embodiment of the present invention is to provide an electronic device, including a memory 301, a processor 302, and a computer program stored in the memory 302 and executable on the processor, wherein the processor implements the above-mentioned knee joint angle estimation method when executing the computer program. Among them, the communication interface 303 is used to interact with the outside world and is a physical connection port for connecting different devices or systems for communication.
[0188] A fourth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for estimating the joint angle of the knee joint is implemented.
[0189] A fifth objective of an embodiment of the present invention is to provide a computer program product, which includes computer instructions, and the computer instructions instruct a computer to execute the above-mentioned method for estimating the joint angle of the knee joint.
[0190] The sixth purpose of the present invention is to provide a wearable device, comprising: two embedded wearable inertial nodes, each wearable inertial node comprising an inertial sensor module, a main control chip module, a wireless communication module and a power module, the two embedded wearable inertial nodes being used to receive knee joint data collected by the inertial sensor module in real time through the inertial sensor module, and then send the knee joint data through a sliding window through the wireless communication module; the inertial sensor module comprises a three-axis acceleration, a three-axis gyroscope, and a three-axis angular velocity.
[0191] The seventh object of the present invention is to provide a knee joint angle estimation system, comprising:
[0192] A device module, using the above-mentioned wearable device;
[0193] The joint angle calculation module adopts the above-mentioned knee joint angle estimation device.
[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0196] The present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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, readable storage media, optical storage, etc.) containing computer-usable program codes.
[0197] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0198] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for estimating the joint angle of a knee joint, characterized in that: include: The knee joint data is received through a sliding window, and joint physiological kinematic constraints are established, and joint physiological motion optimization equations are established based on the joint physiological kinematic constraints; Solve the joint physiological motion optimization equation to obtain the joint axis and joint position vector; Based on the joint axis and the joint position vector, two sets of joint angles are obtained through acceleration information and angular velocity; the two sets of joint angles are weighted averaged through complementary filtering to obtain the joint angles; After receiving the knee joint data through the sliding window, the method further includes a disturbance determination step; the disturbance determination step includes: After collecting the knee joint data in the time window, the disturbance is judged. If the disturbance is greater than the threshold, the joint axis and joint position vector are re-estimated. The changes of knee joint data in time windows are quantified using mathematical indicators, an optimal threshold is obtained using a greedy algorithm according to the quantified indicators, and a real-time threshold is updated based on the optimal threshold; The changes in knee joint data in separated time windows are quantified using mathematical indicators, including: Get the acceleration, angular velocity, and joint angle vector of the first window; Get the acceleration, angular velocity, and joint angle vector of the second window; Calculate the change in the joint angle produced by the two vectors, the joint angle change Δj= J 2- J 1. Acceleration change Δa= a 2- a 1. Angular velocity change Δ w = w 2- w 1; The changes of multiple indicators are combined to produce the final change, the final change △Q = d × joint angle change + e × acceleration change + f × angular velocity change, the disturbance Δchange = mean (d × Δj + e × Δa + f × Δw), where mean represents the average value, d, e, f are random numbers that satisfy d + e + f = 1; The method of using a greedy algorithm to obtain an optimal threshold according to the quantitative index includes: Get initial value: get random values for d, e, and f; When the inertial node is absolutely still and undisturbed, use the sliding window to obtain multiple groups of ΔQ multiple times, find the minimum value a and the maximum value b in ΔQ, and form ΔQ normal ∈[a,b],ΔQ normal It is the normal value range that is not disturbed by the outside world. When the inertial node is slightly disturbed, use the sliding window to obtain multiple groups of ΔQ multiple times, find the minimum value c and the maximum value d in ΔQ to form ΔQ unnormal ∈[c,d],ΔQ unnormal It is an abnormal value range affected by external disturbances; Take different values of d, e, and f to find the value that makes ΔQ normal With ΔQ unnormal Take the value with the largest range.
2. The method for estimating the joint angle of the knee joint according to claim 1, characterized in that: The method of receiving knee joint data through a sliding window and establishing joint physiological kinematic constraints, and establishing joint physiological motion optimization equations based on the joint physiological kinematic constraints, includes: Collect knee joint data in several cycles, including acceleration and angular velocity data; Receive knee joint data through a sliding window and establish joint physiological kinematic constraints; According to the joint physiological kinematic constraints, the joint physiological motion optimization equation is established.
3. The method for estimating the joint angle of the knee joint according to claim 1, characterized in that: The method of solving the joint physiological motion optimization equation to obtain the joint axis and the joint position vector is to optimize the joint physiological motion optimization equation using the Gauss-Newton method to estimate the joint axis and the joint position vector.
4. The method for estimating the joint angle of the knee joint according to claim 1, characterized in that: The method of obtaining two sets of joint angles based on the joint axis and the joint position vector through acceleration information and angular velocity includes: Based on the joint axis and the joint position vector, a first set of joint angles is calculated by integrating the angular velocity; Based on the joint axis and the joint position vector, a second set of joint angles is obtained using acceleration.
5. The method for estimating the joint angle of the knee joint according to claim 1, characterized in that: The updating of the real-time threshold based on the optimal threshold comprises: Quantify and calculate the change value according to different mathematical indicators, take the maximum value of the change value as the optimal threshold, and use it to update the real-time threshold.
6. A device for estimating the joint angle of a knee joint, based on the method for estimating the joint angle of a knee joint according to any one of claims 1 to 5, characterized in that: include: A vector solving unit, used for receiving knee joint data through a sliding window, establishing joint physiological kinematic constraints, and establishing joint physiological motion optimization equations based on the joint physiological kinematic constraints; Solve the joint physiological motion optimization equation to obtain the joint axis and joint position vector; The angle solving unit is used to obtain two groups of joint angles based on the joint axis and the joint position vector through acceleration information and angular velocity; and to obtain the joint angle by performing weighted averaging on the two groups of joint angles through complementary filtering.
7. The knee joint angle estimation device according to claim 6, characterized in that: Also includes: Disturbance judgment unit: used to collect the knee joint data in the time window and make disturbance judgment. If the disturbance amount is greater than the threshold, the joint axis and joint position vector are re-estimated according to the optimization principle. Mathematical indicators are used to quantify the changes in knee joint data in time windows, a greedy algorithm is used according to the quantified indicators to obtain an optimal threshold, and the real-time threshold is updated based on the optimal threshold.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for estimating the joint angle of the knee joint according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for estimating the joint angle of the knee joint according to any one of claims 1 to 5 is implemented.
10. A computer program product, comprising computer instructions, characterized in that: The computer instructions instruct the computer to execute the method for estimating the joint angle of the knee joint as described in any one of claims 1-5.
Citation Information
Patent Citations
Wearable inertial device human body gait information acquisition and calculation method
CN108245164A
A Real-Time Method for Solving Joint Angles Against Position Shifting Based on Inertial Sensors
CN111887856B
A method for human motion acquisition based on inertial sensors without requiring standard posture correction
CN111895997B
Real-time calculation method for angle of anti-position-movement joint based on inertial sensors
CN111887856A
Human body action acquisition method based on inertial sensor without standard posture correction
CN111895997A
