A TUG test action staging method based on kinematic constraint hidden Markov model
By introducing a kinematically constrained Hidden Markov Model and an improved Viterbi decoding, the problems of accuracy and computational complexity in action phased segmentation in TUG testing are solved, achieving efficient action phased segmentation and accurate identification of similar action phases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUZHOU UNIV
- Filing Date
- 2026-02-26
- Publication Date
- 2026-06-26
AI Technical Summary
Existing TUG test action staging methods based on inertial sensors rely on fixed thresholds and traditional machine learning, which cannot effectively capture the temporal correlation of action sequences, resulting in insufficient accuracy in action staging, especially in the case of similar action stages, which are prone to confusion.
We employ a kinematically constrained Hidden Markov Model (KCHMM), and by introducing torso tilt angle constraints and clustering algorithms, we discretize continuous features, improve the Viterbi decoding process, and utilize biomechanical prior knowledge to correct state transitions, thereby enhancing the accuracy of action phased analysis.
It significantly improves the accuracy of action phase segmentation, especially the recognition rate of similar action phases, increasing from 75.42% to 95.53%, while reducing computational complexity and improving the robustness and adaptability of the method.
Smart Images

Figure CN122272001A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical rehabilitation assessment and motion recognition technology, and in particular to a TUG test motion staging method based on a kinematically constrained hidden Markov model. Background Technology
[0002] The Timed Up and Go (TUG) test is a standardized tool for assessing balance, gait stability, and fall risk in older adults and individuals with motor dysfunction. Figure 1 As shown. Traditional TUG testing mainly relies on total time as an assessment indicator, but this limits the identification of specific functional impairments in specific movement phases (such as turning or sitting). The simple total time indicator masks the heterogeneous damage in specific phases. Therefore, the introduction of intelligent devices to automatically stage TUG test movements can help doctors to more accurately assess patients' motor function.
[0003] Existing automatic staging methods based on inertial measurement units (IMUs) have limitations: threshold-based segmentation methods mainly rely on manually set fixed empirical thresholds, lacking generalization ability. Due to significant differences in the motor abilities of elderly individuals, with varying amplitude and speed of movements, fixed thresholds often fail due to signal amplitude fluctuations. While traditional machine learning methods such as Support Vector Machines (SVMs), Random Forests (RFs), and K-Nearest Neighbors (KNNs) have shown some effectiveness in this field, they typically treat consecutive time windows as independent samples for classification, ignoring the inherent temporal correlation of action sequences. This makes it difficult to distinguish samples that are similar in mechanical characteristics but have different temporal logic. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a TUG test action staging method based on kinematically constrained hidden Markov models. By introducing kinematic prior knowledge to constrain the decoding process of the HMM, the accuracy of action staging is improved and the computational complexity is reduced.
[0005] This invention provides a method for TUG test action staging based on a kinematically constrained hidden Markov model, comprising: Data acquisition process: Acquire and preprocess human IMU data collected by IMU sensor during the timing stand-up and walk test. The IMU data includes Z-axis acceleration and Z-axis angular velocity. The observation state sequence generation process involves: using a sliding window to calculate the linear regression slope SL of the Z-axis acceleration within the window, and calculating the maximum absolute value of the X-axis angular velocity. M abs Integrating the Z-axis angular velocity yields the torso tilt angle; SL and Mabs Summation as clustering input feature F Using clustering algorithms to analyze input features F Clustering into K discrete symbols generates the observation state sequence required for the HMM model; Model construction and training process: A KCHMM model is constructed, which defines 6 hidden states, corresponding to the 6 actions in the stand-up and walk test process; model parameters... Where A is the state transition matrix and B is the emission probability matrix. The state probability vector is fixed at [1, 0, 0, 0, 0, 0]. State decoding process: Define a preset range of human torso tilt angles for each action stage; introduce angle matching weights into the forward recursive steps of the Viterbi algorithm. If the current torso tilt angle does not conform to the preset range of human torso tilt angles for the candidate state, the angle matching weight is reduced by an exponential decay function; the path probability is corrected by judging the matching degree between the observation angle and the preset angle interval of each state, and finally the optimal state sequence is output to realize the six-stage automatic phased TUG test.
[0006] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. By utilizing the hidden state topology of the improved Hidden Mirror Model (KCHMM), the time dependency and internal logic of the continuous action sequence "stand up-walk-turn-walk-turn in place-sit down" in the TUG test are effectively presented. The recognition accuracy has a very low correlation with the TUG completion time (r=0.208), proving that the method is not affected by the slow movement of the elderly and has extremely high clinical application value.
[0007] 2. By introducing the torso tilt angle as a kinematic constraint during the Viterbi decoding process, biomechanical prior knowledge is used to correct the model's estimation errors for "turning in place" and "sitting down" actions, thereby eliminating semantic ambiguity in single inertial sensor data. The recall rate of the "sitting down" stage is significantly improved from 75.42% in the standard HMM to 95.53%, effectively correcting the misjudgments of the traditional Viterbi algorithm and significantly improving the accuracy and robustness of human motion phase segmentation.
[0008] 3. Use the K-Means algorithm to divide continuous features F Discretization allows for adaptation to discrete HMMs and reduces computational complexity.
[0009] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0010] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0011] Figure 1 This is a schematic diagram of the TUG testing process in the prior art; Figure 2 This is an overall flowchart of the method in Embodiment 1 of the present invention; Figure 3 This is a flowchart illustrating the specific execution of the method in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram comparing the confusion matrix of the method (KCHMM) of this invention with that of the traditional HMM in terms of the staging results. Detailed Implementation
[0012] This application provides a TUG test action staging method based on a kinematically constrained Hidden Markov Model (HMM). By introducing kinematic prior knowledge to constrain the HMM decoding process, the accuracy of action staging is improved and the computational complexity is reduced.
[0013] The overall concept of the technical solution in this application is as follows: To address the problems existing in the current technology, the applicant considers using clustering algorithms to separate continuous features. FThe TUG test actions are discretized into an observed state sequence, and a Hidden Markov Model (HMM) is introduced to stage them. As a classic probabilistic time series model, the HMM can effectively characterize the dynamic changes of action stages through hidden state transition mechanisms, making it very suitable for the analysis of dynamic systems with hidden state sequences. This model does not rely on absolute signal strength thresholds but models the time series through probabilistic statistical characteristics, capturing the transition relationships between sample states at adjacent time points. This effectively solves the temporal logic problems that traditional machine learning models cannot handle, significantly improving the ability to identify similar action phases. However, the "turning in place" and "sitting down" phases in the TUG test have similar sensor signals, and the standard Viterbi algorithm in existing HMMs only relies on probabilistic statistics. When processing similar action patterns in the TUG test, it is prone to state confusion, leading to stageing errors. The applicant improved the staging accuracy by introducing kinematic prior knowledge to constrain the decoding process of the HMM and improved the Viterbi algorithm by introducing physical constraint weights to "penalize" state transitions that violate human kinematic constraints, thereby solving the problem of confusion between phases of similar actions. Example 1
[0014] This embodiment provides a method for TUG test action staging based on a kinematically constrained hidden Markov model, such as... Figure 2 As shown, it includes: S1. Data acquisition process: Acquire and preprocess human IMU data collected by IMU sensor during the timing stand-up and walking test. The IMU data includes Z-axis acceleration and Z-axis angular velocity.
[0015] S2. Observation state sequence generation process: Use a sliding window to calculate the linear regression slope SL of the Z-axis acceleration within the window, and calculate the maximum absolute value of the X-axis angular velocity. M abs Integrating the Z-axis angular velocity yields the torso tilt angle; SL and M abs Summation as clustering input feature F Using clustering algorithms to analyze input features F Clustering into K discrete symbols generates the observation state sequence required for the HMM model.
[0016] S3. Model Construction and Training Process: Construct a KCHMM model, which defines 6 hidden states, corresponding to the 6 actions in the standing-walking test process; model parameters... Where A is the state transition matrix and B is the emission probability matrix. The state probability vector is fixed at [1, 0, 0, 0, 0, 0].
[0017] S4. State Decoding Process: Define a preset range of human torso tilt angles for each action stage; introduce angle matching weights into the forward recursive steps of the Viterbi algorithm. If the current torso tilt angle does not conform to the preset range of human torso tilt angles for the candidate state, the angle matching weight is reduced by an exponential decay function; the path probability is corrected by judging the matching degree between the observation angle and the preset angle range of each state, and finally the action state sequence is output to realize the six-stage automatic phased TUG test.
[0018] In one specific embodiment, such as Figure 3 As shown, the detailed execution process is as follows: Step 1: Data Collection Subjects wore a wireless IMU sensor (model: Cometa, Italy) at the level of the L3-L4 vertebrae in the lumbar region. This position is close to the body's center of mass and can stably reflect trunk movements. The sampling frequency was strictly set to 200Hz. Subjects performed the standard TUG test: stand up from a 40cm high chair, walk forward 3 meters, walk around the obstacle, walk back to the chair, turn around and sit down.
[0019] Step 2: Data Preprocessing and Feature Extraction 2.1 Filtering Processing: The raw IMU signal contains sensor electronic noise and mechanical vibration (typically higher than 5Hz). In this embodiment, a 4th-order Butterworth low-pass filter is used to process the Z-axis acceleration and angular velocity, with a cutoff frequency set to 5Hz. Typical IMU data includes triaxial acceleration and triaxial angular velocity, but this embodiment only requires the Z-axis acceleration (perpendicular to the coronal plane) and Z-axis angular velocity (along the human body's vertical axis) as the core signals.
[0020] 2.2 Standardization and Smoothing: Z-score standardization is performed on the filtered data to eliminate differences in units (m / s). 2 The difference between the rad / s and the Z-axis acceleration (acc-z) and angular velocity (gyr-z) signals was then selected, and a 10th-order polynomial fitting was applied for smoothing to preserve the overall morphological trend of the motion phase.
[0021] 2.3 Feature Extraction: A sliding window technique was used, with a window length of 70 sampling points (approximately 0.35 seconds) and an overlap rate of 20%. For the data within each sliding window, the following calculations were performed: linear regression slope ( SL (Regarding Z-axis acceleration) The calculation formula is: This feature can capture quasi-constant speed motion patterns during the standing and sitting phases.
[0022] Maximum absolute angular velocity ( ): For Z-axis angular velocity The calculation formula is: This feature quantifies the peak dynamic range during the turnaround phase.
[0023] trunk tilt angle : Through formula The angular velocity is obtained by integrating it and used as the control variable for subsequent kinematic constraints.
[0024] Feature fusion: SL and The final input features are obtained by adding them together. F .
[0025] Step 3: Generation of Observation Sequences To adapt to discrete Hidden Markov Models (HMMs) and reduce computational complexity, the K-Means algorithm is used to transform continuous features. F Discretization, converting input features F Clustering into K discrete symbols generates the observation state sequence required for the HMM model. In this embodiment, the number of clusters K=4. Experiments show that the silhouette coefficient at this K value is 0.7995, and the inter-class separation is 1.1415, which can effectively balance feature discrimination and model complexity.
[0026] Step 4: Model Building and Training A Kinematic-Constrained HMM (KCHMM) model with six hidden states was constructed, corresponding to the six stages of TUG. The six hidden states are defined as: Sit to Stand, Forward Walk, Turn Around Obstacle, Backward Walk, In-Place Turn, and Stand to Sit. Model parameters were obtained statistically from the training data using the Baum-Welch algorithm. The initialization and training details are as follows: 4.1 Initialization of State Transition Matrix A A statistical initialization strategy is adopted, utilizing the true phase labels labeled in the training set for computation. From the state... S i arrive S j transition probability The calculation formula is: ,in, This represents the observations from time [time] in the training set. t status S i Transition to timet +1 state S j The total number of times, where U=6 is the total number of hidden states. From state S i Transition to any state S n The number of times. This initialization method strictly follows the timing characteristics of TUG testing, forcibly setting the probability of illegal reverse transitions (such as jumping directly from the "sit down" phase to the "turn around obstacle" phase) to zero.
[0027] 4.2 Initialization of Emission Probability Matrix B emission matrix Quantified in the hidden state S j The next observation m The probability of a discrete cluster symbol. It is estimated based on the co-occurrence frequency of states and observations in the training set, using the following formula: .in,\ Indicates hidden state S j With the m The frequency of simultaneous occurrence of observation symbols in the training data, where K=4 is the total number of observation symbols (i.e., the number of clusters). It is in hidden state S j The next observation l The number of times each symbol is used.
[0028] 4.3 Setting the initial state probability vector π According to the standard procedure of the TUG test, the test always begins with the subject standing up from the chair (i.e., the "standing" phase S1). To strictly enforce this physical constraint, It is deterministically initialized to [1, 0, 0, 0, 0, 0], that is, the probability of the "stand up" phase is 1.0, and the probability of the other states is 0.
[0029] Step 5: State Decoding Traditional Hidden Markov Models (HMMs) easily confuse the "turning in place" and "sitting down" stages because they are similar in sensor signals. This embodiment introduces physical constraint weights into the forward recursive steps of the traditional Viterbi algorithm, resulting in an improved KC-Viterbi algorithm. The physical constraint logic is as follows: each action stage corresponds to a specific range of human torso tilt angles. For example, during "walking straight," the torso is nearly vertical, with an angle close to 0°; in the initial stage of "standing up," the torso needs to lean forward, with a larger angle. If the currently observed torso tilt angle does not conform to the preset physical angle range of the candidate state, the path probability of that state is reduced through an exponential decay function, thereby forcibly correcting illegal state transitions and ultimately backtracking to obtain the optimal state sequence.
[0030] 5.1 Physical Constraint Logic: Each action phase corresponds to a specific range of human torso tilt angles. For example, during the "obstacle walking" phase, the torso rotates approximately 180 degrees; at the end of the "turning in place" phase, the torso rotates approximately 360 degrees compared to the initial rotation.
[0031] 5.2 Weight Calculation: If the observation angle In candidate state Within the preset range, weight Calculated based on matching degree, the value is relatively large; if If the distance exceeds the specified range, the weight will decrease exponentially with distance: ,in It is the minimum distance from the current angle to the interval boundary. Indicates the observation angle. This indicates the preset range of human torso tilt angles for the corresponding candidate states. This mechanism effectively “punishes” state transitions that violate human kinematic constraints (such as being judged as the end of a turn before the torso has completed nearly 180 degrees of rotation).
[0032] The method in this embodiment was used for leave-one-out cross-validation (LOOCV) on a dataset of 30 subjects (aged 24-86 years): 1. Improved recognition accuracy: The overall recognition accuracy of the KCHMM model reached 91.12%, an improvement of 9.2% compared to the standard Viterbi algorithm (81.92%). Figure 4 As shown.
[0033] 2. Addressing the pain point of confusion: For the most difficult-to-distinguish "turning around" and "sitting down" stages, this invention significantly improves the recall rate of the "sitting down" stage from 75.42% in the standard HMM to 95.53%, effectively correcting the misjudgment of traditional algorithms.
[0034] 3. Strong robustness: In comparisons across different age groups, the performance difference between the younger group (Macro F1: 0.902) and the older group (Macro F1: 0.897) was only 0.55%. Furthermore, the correlation between recognition accuracy and TUG completion time was extremely low (r=0.208), demonstrating that this method is not affected by bradykinesia in the elderly and has extremely high clinical application value.
[0035] A detailed comparison of classification results is shown in the table below: Table 1. Classification performance of the model for the six states.
[0036] Table 2 Comparison of the model in this embodiment with other machine models
[0037] All results are reported as mean ± standard deviation of leave-one cross-validation.
[0038] SVM: Support Vector Machine.
[0039] KNN: K-nearest neighbor.
[0040] RF: Random Forest.
[0041] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. By utilizing the hidden state topology of the improved Hidden Mirror Model (KCHMM), the time dependency and internal logic of the continuous action sequence "stand up-walk-turn-walk-turn in place-sit down" in the TUG test are effectively presented. The recognition accuracy has a very low correlation with the TUG completion time (r=0.208), proving that the method is not affected by the slow movement of the elderly and has extremely high clinical application value.
[0042] 2. By introducing the torso tilt angle as a kinematic constraint during the Viterbi decoding process, biomechanical prior knowledge is used to correct the model's estimation errors for "turning in place" and "sitting down" actions, thereby eliminating semantic ambiguity in single inertial sensor data. The recall rate of the "sitting down" stage is significantly improved from 75.42% in the standard HMM to 95.53%, effectively correcting the misjudgments of the traditional Viterbi algorithm and significantly improving the accuracy and robustness of human motion phase segmentation.
[0043] 3. The continuous feature F is discretized using the K-Means algorithm, thereby adapting it to discrete HMM and reducing computational complexity.
[0044] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0045] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0046] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0047] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0048] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for staging TUG test actions based on a kinematically constrained hidden Markov model, characterized in that, include: Data acquisition process: Acquire and preprocess human IMU data collected by IMU sensor during the timing stand-up and walk test. The IMU data includes Z-axis acceleration and Z-axis angular velocity. The process of generating the observed state sequence involves using a sliding window to calculate the linear regression slope of the Z-axis acceleration within the window. SL Calculate the maximum absolute value of the X-axis angular velocity. M abs The torso tilt angle is obtained by integrating the Z-axis angular velocity. Will SL and M abs Summation as clustering input feature F ; Using clustering algorithms to divide input features F Clustering into K discrete symbols generates the observation state sequence required for the HMM model; Model construction and training process: A KCHMM model is constructed, which defines 6 hidden states, corresponding to the 6 actions in the stand-up and walk test process; model parameters... Where A is the state transition matrix and B is the emission probability matrix. The state probability vector is fixed at [1, 0, 0, 0, 0, 0]. State decoding process: Define a preset range of human torso tilt angles for each action stage; introduce angle matching weights into the forward recursive steps of the Viterbi algorithm. If the current torso tilt angle does not conform to the preset range of human torso tilt angles for the candidate state, the angle matching weight is reduced by an exponential decay function; the path probability is corrected by judging the matching degree between the observation angle and the preset angle interval of each state, and finally the optimal state sequence is output to realize the six-stage automatic phased TUG test.
2. The method according to claim 1, characterized in that: During the generation of the observation state sequence, the length of the sliding window is set to 70 sampling points, and the overlap rate is 20%.
3. The method according to claim 1, characterized in that: During the generation of the observed state sequence, the linear regression slope SL The calculation formula is ; in, This is the acceleration along the Z-axis.
4. The method according to claim 1, characterized in that: During the model construction and training process, the initialization of the state transition matrix A adopts a statistical initialization strategy, which is calculated using the real phase labels labeled in the training set, and the probability of illegal reverse transition is set to zero.
5. The method according to claim 1, characterized in that: During the model construction and training process, the emission matrix The calculation formula is: ,in, Indicates hidden state S j With the m The frequency of simultaneous occurrence of each observation symbol in the training data, where K is the total number of observation symbols. It is in hidden state S j The next observation l The number of times each symbol is used.
6. The method according to claim 1, characterized in that: The formula for calculating the angle matching weight during the state decoding process is as follows: ; in, It is the minimum distance from the current angle to the interval boundary. Indicates the observation angle. This indicates the preset range of human torso tilt angles for the corresponding candidate states.
7. The method according to claim 1, characterized in that, During the data acquisition process, the preprocessing includes: using a 4th-order Butterworth low-pass filter to filter the Z-axis acceleration and angular velocity, with a cutoff frequency set to 5Hz; and performing Z-score normalization on the filtered data.
8. The method according to claim 1, characterized in that: During the data acquisition process, the IMU sensor is positioned at the level of the L3-L4 vertebrae in the lumbar region.