A step phase detection method based on GMM and HMM
By combining the gait detection method of the Gaussian mixture model and the hidden Markov model, the navigation error problem caused by unreasonable parameter settings in the existing gait detection method is solved, the adaptive detection of gait changes is realized, and the detection efficiency is improved. The robustness and reliability simplify the application process.
Patent Information
- Application Number
- CN202111161656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing gait detection methods have the disadvantages of manual setting and individual adjustment of detection parameters, resulting in inaccurate detection results, affecting the correctness and effectiveness of navigation errors, and lack of adaptability, making it difficult to maintain robustness under different users and environments. .
The step phase detection method based on GMM and HMM is used to make a preliminary rough division of the support phase and the swing phase through the Gaussian mixture model, and the hidden Markov model is used for further probability estimation to eliminate the influence of manual selection of detection thresholds and automatically divide the data categories to improve detection reliability and robustness.
It improves the robustness to changes in pace, gait, user and environment, enhances the universality and reliability of gait detection, simplifies the selection of application methods, and avoids false detections and false detections in traditional methods. Improved navigation accuracy.
Smart Images

Figure CN113901910B
Abstract
Description
Technical Field
[0001] The invention relates to the field of pedestrian navigation, in particular to a step phase detection method based on GMM and HMM, belonging to a gait analysis method based on inertial technology. Background Art
[0002] Human motion is a highly complex dynamic process, but human gait is a regular and cyclical process. In the field of pedestrian navigation, gait analysis is to detect the gait phase in combination with the kinematics of the human body and determine the support phase in the gait cycle. The pedestrian navigation algorithm can use the characteristic of zero gait speed in the support phase to perform zero-speed correction in a timely manner to suppress the accumulation of navigation position errors and improve the long-term navigation accuracy of the system. Existing gait detection methods have the disadvantages of manual setting and individual adjustment of detection parameters. In the actual navigation process, the detection results are often inaccurate due to unreasonable method design or inappropriate parameter setting, which in turn affects the correctness and effectiveness of the zero-speed correction method and introduces navigation errors of varying degrees. Therefore, in order to ensure the reliability of gait phase detection, an adaptive gait detection method is urgently needed. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a gait phase detection method based on GMM and HMM, improve the robustness to changes in walking speed, gait, user and environment, improve the universality and reliability of existing gait detection methods, and make the selection of application methods simpler, more convenient and flexible.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] A step phase detection method based on GMM and HMM includes using Gaussian mixture model clustering method to make a preliminary rough division of support phase and swing phase, and then using hidden Markov model to make further probability estimation.
[0006] A further improvement of the technical solution of the present invention is that it comprises the following steps:
[0007] Step 1: Perform a preliminary rough division of gait phases by using Gaussian mixture clustering algorithm;
[0008] Step 2: Use a single detection threshold method to divide the rough segmentation results into several segments, and output a series of segments as a set of observation sequences by defining a function;
[0009] Step 3: Hidden Markov model is used to further detect the supporting phase.
[0010] A further improvement of the technical solution of the present invention lies in that: in the step 1, based on the characteristic that the swing amplitudes of the supporting phase and the swinging phase are greatly different, it is assumed that the supporting phase and the swinging phase belong to two different Gaussian distributions, and the Gaussian mixture model clustering method is used to obtain the probability density distributions of the two Gaussian distributions respectively, and at the same time, the supporting phase and the swinging phase are divided into corresponding clusters.
[0011] A further improvement of the technical solution of the present invention is that: in step 2, the walking process is divided into a series of continuous gait time periods, and each gait time period is defined as an observation value, thereby obtaining a set of observation sequences; considering directly identifying the support phase as zero and the non-support phase as non-zero, and outputting a series of fragments as a set of observation sequences by defining a function.
[0012] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:
[0013] The present invention improves the robustness to changes in walking speed, gait, user and environment, and improves the universality and reliability of existing gait detection methods.
[0014] The present invention uses a probability model to divide samples through Gaussian mixture clustering, which may cause missed detection and false detection. Therefore, a hidden Markov model is used to further estimate the probability of the rough division result of the first stage to obtain a more accurate division result.
[0015] The gait detection method in this paper, after using the Gaussian mixture model for rough division, also uses the hidden Markov model for further probability estimation and uses the probabilistic statistical method to exclude the non-support phase. This not only improves the reliability and robustness of the existing gait detection method, but also makes the selection of application methods simpler, more convenient and flexible.
[0016] The method of combining GMM and HMM eliminates the influence of manually selecting detection thresholds in traditional methods. Even in the face of different users, changing gaits and complex environments, the Gaussian mixture model clustering method proposed in this paper still has high reliability and robustness.
[0017] The present invention automatically divides data into different categories according to the characteristics of the data itself, without the need to manually set and correct the detection threshold, thus avoiding the passivity and blindness of the traditional trial and error method.
[0018] In the hidden Markov model prediction stage, for the human gait observation values of the input signal, the method of selecting the observation values is clarified to avoid errors caused by manual setting of the observation values based on experience. The adaptive selection of the observation values after the first stage of processing improves the applicability and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1It is a system flow chart of the present invention;
[0020] Figure 2 is a Gaussian mixture model classification result diagram of the present invention;
[0021] Figure 3 It is a segmented graph of a single detection threshold method of the present invention;
[0022] Figure 4 is a hidden Markov model structure diagram of the present invention;
[0023] Figure 5 It is the state transition diagram of the hidden Markov model of the present invention. DETAILED DESCRIPTION
[0024] The present invention is further described in detail below in conjunction with embodiments:
[0025] like Figures 1 to 5 As shown, a step phase detection method based on GMM and HMM is mainly composed of two parts, namely, a clustering part based on a Gaussian mixture model and a prediction part based on a hidden Markov model. It includes the following steps:
[0026] Step 1: According to application requirements, a gait cycle is divided into a stance phase and a swing phase; the stance phase is the stage when the sole of the foot is in full contact with the ground, and the swing phase is the stage when any part of the foot has not yet touched the ground or has left the ground;
[0027] Step 2: By analyzing the threshold of the coarse segmentation result of the Gaussian mixture model, the walking process is divided into a series of continuous gait time periods, and each gait time period is defined as an observation value, thereby obtaining a set of observation sequences;
[0028] Step 3: Use hidden Markov model to further detect the support phase;
[0029] The step 1 comprises: making a preliminary rough division of the gait phases by using a clustering algorithm: according to the large difference in the swing amplitude between the stance phase and the swing phase, assuming that the stance phase and the swing phase belong to two different Gaussian distributions, using a Gaussian mixture model clustering method to obtain the probability density distribution of the two corresponding Gaussian distributions, and dividing the stance phase and the swing phase into corresponding clusters;.
[0030] The step 2 includes: identifying the supporting phase as zero and identifying the non-supporting phase as non-zero; using a single detection threshold method to divide the rough division result into several segments, and outputting a series of segments as a set of observation sequences by defining a function.
[0031] A further improvement of the technical solution of the present invention is that the step 3 comprises:
[0032] Step 3.1: Define the structural information of the hidden Markov model to represent the dependency relationship between variables;
[0033] Step 3.2: Set model parameters;
[0034] Step 3.3: Given the hidden Markov model parameters and the observation sequence O = (o1, o2, ..., o T ), find the maximum state sequence I = (i1, i2, ..., i T ), the state sequence is the probability estimation result.
[0035] The variables in the hidden Markov model in step 3.1 are divided into two groups: the first group is the state variables {y1, y2, ..., y n}, where y i Represents the system state at the i-th moment; this method defines three hidden states and converts the state variable y i The value range of is set to a discrete space of 3 possible values The second group is the observed variables {x1, x2, ..., x n}, where x i represents the observation value at the i-th moment.
[0036] The step 3.2 includes setting three sets of parameters of the hidden Markov model: output observation probability, state transition probability, and initial state probability; these three sets of parameters are manually set based on experience.
[0037] The system flow chart is as follows: Figure 1 This method is described in detail as follows:
[0038] The gait of a person walking horizontally is a nearly periodic motion process. The whole process is always repeatedly transferred between the single-leg swing state and the single-leg support state, corresponding to the alternating separation and contact of a single foot with the ground. There are four key kinematic events in a complete gait cycle: heel strike, full foot landing, heel off the ground and toe off the ground. Using key gait events, a complete gait cycle can be divided into several continuous gait phases. In the field of pedestrian navigation, people are interested in the time period when the sole of the foot and the ground remain relatively still. As long as the correctness of the observation information of "zero speed" during this time period can be effectively guaranteed, the zero-speed correction method can be used for error correction. Therefore, this method considers dividing a gait cycle into two phases, in which the support phase is divided into the stage when the sole of the foot is in full contact with the ground, but as long as any part of the foot has not yet touched the ground or has left the ground, it is divided into the swing phase.
[0039] In the first stage of this method, a clustering algorithm is used to perform a preliminary rough division of the gait phases. Based on the large difference in swing amplitude between the stance phase and the swing phase, it is assumed that the stance phase and the swing phase belong to two different Gaussian distributions. The Gaussian mixture model clustering method can be used to obtain the probability density distribution of the two Gaussian distributions, and the stance phase and the swing phase can be divided into corresponding clusters.
[0040] Gaussian mixture clustering uses a probability model (Gaussian distribution) to characterize the data prototype. Assume that the sample set is a Gaussian mixture distribution composed of a mixture of two single Gaussian distributions, where each sample is generated by each single Gaussian distribution according to the weight. By using maximum likelihood estimation and combining the expectation maximization (EM) algorithm to iteratively optimize and solve the Gaussian mixture model parameters, the posterior probability of each sample belonging to each single Gaussian distribution can be obtained, and each sample can be classified into the single Gaussian distribution corresponding to the maximum posterior probability. The content of the Gaussian mixture model is detailed as follows:
[0041] The Gaussian mixture model requires three sets of parameters: the mean, variance, and mixing coefficient of the two Gaussian distributions. When initializing the model parameters, the same initial mean and initial variance of the two Gaussian distributions are set. After iterative optimization through maximum likelihood estimation and EM algorithm, the means and variances of two different Gaussian distributions are finally obtained. The mixing coefficient is the prior probability that each sample belongs to each single Gaussian distribution. According to Bayes' theorem, the posterior probability that each sample belongs to each Gaussian component can be calculated from the prior probability. The posterior probability can be used to determine which Gaussian distribution the sample has the highest probability of belonging to.
[0042] The process of solving the Gaussian mixture model parameters is as follows: Use maximum likelihood estimation combined with the expectation maximization (EM) algorithm to iteratively optimize and solve the Gaussian mixture model parameters. In each iteration, first calculate the posterior probability of each sample belonging to each Gaussian component based on the current model parameters (E step), and then update the model parameters according to the formula (M step). The specific steps of the algorithm are as follows:
[0043] Input: Sample set D = {x1, x2, ..., x m}; Number of Gaussian mixture components 2
[0044] process:
[0045] 1. Initialize the model parameters of the Gaussian mixture distribution
[0046] 2.repeat
[0047] for j=1,2,...,m do
[0048] Calculate the sample x according to the formula i The posterior probability generated by each Gaussian mixture component
[0049] end for
[0050] 3. for i = 1, 2, ..., k do
[0051] Calculate the new mean vector
[0052] Calculate the new covariance matrix
[0053] Calculate new mixing coefficients
[0054] end for
[0055] 4. Update the model parameters
[0056] 5.Until the stopping condition is met
[0057] 6. for j = 1, 2, ..., m do
[0058] Determine x according to the formula i Cluster markers
[0059] x i Assign to the corresponding cluster
[0060] end for
[0061] Output: cluster division results, mean and variance of each Gaussian distribution
[0062] The Gaussian mixture model clustering method proposed in this paper does not require manual setting and correction of thresholds, thus avoiding the passivity and blindness of the traditional trial and error method. The gait phase division method based on the clustering algorithm is an algorithm based on local search. The thresholds generated are all local dynamic thresholds, which have strong adaptability to gait changes. Since the clustering algorithm can automatically divide the data into different categories based on the characteristics of the data itself without any prior knowledge, the Gaussian mixture model clustering method proposed in this paper has high reliability and robustness even in the face of different users, changing gaits and complex environments. Its adaptability is mainly reflected in two aspects, namely, adaptability to measurement value fluctuations and adaptability to detection parameters.
[0063] In the work, by analyzing the threshold of the coarse segmentation result of the Gaussian mixture model, the walking process can be divided into a series of continuous gait time periods, and each gait time period is defined as an observation value, thereby obtaining a set of observation sequences. Figure 2 The clustering results of the Gaussian mixture model shown in the figure are considered to directly identify the supporting phase as zero and the non-supporting phase as non-zero in order to eliminate the influence of the manually selected threshold. Based on the consideration of zero as the threshold, the single detection threshold method is used to divide the coarse division results into several fragments, and a series of fragments are output as a set of observation sequences by defining a function. In order to describe the above division method, the function f(x) is defined:
[0064]
[0065] refer to Figure 3 , by definition, the continuous angular velocity data is divided into a series of segments, and each segment corresponds to a value. The resulting observation sequence will be used as the input to the hidden Markov model to obtain the final support phase prediction result. The corresponding observation sequence for this example is:
[0066] [0,-1,1,0,-1,1,-1,-1,-1,0,-1,1,0,-1,1,0,-1,1,0,-1,0]
[0067] Since Gaussian mixture clustering uses a probability model to divide samples, there will be cases of missed detection and false detection of the support phase. The reason is that, first, when the local upward fluctuation of the measured value in the support phase is mistakenly detected as the swing phase, it is easy to mistakenly detect the short support phase as the swing phase, further aggravating the missed detection of the support phase. Second, when the local downward fluctuation of the measured value in the swing phase is mistakenly detected as the support phase, it is easy to mistakenly detect the short swing phase as the support phase, further aggravating the false detection of the support phase. Third, the calculation error of the algorithm itself leads to missed detection and false detection of the support phase. Therefore, it is necessary to use the hidden Markov model to further estimate the probability of the rough division results of the first stage to obtain a more accurate division result.
[0068] The variables in the Hidden Markov Model are divided into two groups. Figure 4 As shown in Figure 1, it is the structural information of the hidden Markov model, which represents the dependency relationship between variables. The first group is the state variables {y1, y2, ..., y n}, where y i Represents the system state at the i-th moment. Figure 5 As shown in Figure 1, the system switches between multiple states. The state of the system at the next moment is determined only by the current state and does not depend on any previous state. This method defines three hidden states and converts the state variable y i The range of values of (called state space) is set to a discrete space of three possible values The second group is the observed variables {x1, x2, ..., x n}, where x i represents the observed value at the i-th moment. At any moment, the value of the observed variable depends only on the state variable, that is, the observed value x i From state y i The value of other state variables and observation variables is irrelevant. i is discrete and its range is {-1, 0, 1}. In addition to structural information, the hidden Markov model also requires the following three sets of parameters:
[0069] Output observation probability: The probability of the model obtaining each observation value based on the current state, usually recorded as a matrix B = [b ij ] N×M , where b ij =P(x t =o j |y t =s i ), 1≤i≤N, 1≤j≤M, indicating that at any time t, if the state is s i , then the observed value is o j The output observation probability matrix is:
[0070]
[0071] State transition probability: Figure 5 As shown, it is the probability of the model switching between various states, usually recorded as a matrix B = [a ij ] N×M , where a ij =P(y t+1 =s j |y t =s i ), 1≤i, j≤N, indicating that at any time t, if the state is s i , then at the next moment the state is s j The probability of this method is defined in three hidden states to represent a typical state transition when a person is walking: state1→state2→state3. The state transition probability matrix is:
[0072]
[0073] Initial state probability: The probability of each state of the model appearing at the initial moment, usually recorded as π = (π1, π2, ..., π N ), where π i =P(y1=s i ), 1≤i≤N, indicating that the initial state of the model is s i The probability of the initial state is: π = (0.4, 0.3, 0.3).
[0074] By specifying the state space, observation space and the three sets of parameters mentioned above, the hidden Markov model can be determined, usually represented by the parameter λ = [A, B, π]. Given a hidden Markov model λ and an observation sequence O = (o1, o2, ..., o T ), we can find the maximum state sequence I = (i1, i2, ..., i T ). This state sequence is the probability estimation result.
Claims
1. A step phase detection method based on GMM and HMM, characterized in that: The method includes using a Gaussian mixture model clustering method to make a preliminary rough division between the support phase and the swing phase, and then using a hidden Markov model to make further probability estimation; the method includes the following steps: Step 1: A preliminary rough division of gait phases is performed by using a Gaussian mixture clustering algorithm; the stance phase is the stage when the sole of the foot is in full contact with the ground, and the swing phase is the stage when any part of the foot has not yet touched the ground or has left the ground; according to the large difference in swing amplitude between the stance phase and the swing phase, it is assumed that the stance phase and the swing phase belong to two different Gaussian distributions, and the probability density distribution of the two Gaussian distributions is obtained by using a Gaussian mixture model clustering method, and the stance phase and the swing phase are divided into corresponding clusters; Step 2: By analyzing the threshold of the coarse segmentation result of the Gaussian mixture model, the walking process is divided into a series of continuous gait time periods, and each gait time period is defined as an observation value, thereby obtaining a set of observation sequences; In order to eliminate the influence of manually selected thresholds, the supporting phase is directly identified as zero and the non-supporting phase is identified as non-zero. Based on the consideration of taking zero as the threshold, a single detection threshold method is used to divide the coarse segmentation results into several fragments, and a series of fragments are output as a set of observation sequences by defining a function. Define the function f(x): By definition, the continuous angular velocity data is divided into a series of segments, and each segment corresponds to a value; the obtained observation sequence will be used as the input to the hidden Markov model to obtain the final support phase prediction result; Step 3: Hidden Markov model is used to further detect the supporting phase.
Citation Information
Cited By
Pedestrian gait detection method based on online stride frequency estimation and multi-stage false peak elimination
CN121730806A
