Exoskeleton gait recognition method and apparatus
Patent Information
- Application Number
- CN201911036697.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2039-10-29
AI Technical Summary
[0004]本申请提供了一种基于双层隐马尔可夫模型的外骨骼步态辨识方法和装置,可以解决现有方案中的问题
[0032]本发明提出利用双层隐马尔可夫模型建模和辨识人体-外骨骼运行模式和步态相位,上层隐马尔可夫模型辨识运动模态,下层隐马尔可夫模型辨识每种运动模态下的步态相位,下层隐马尔可夫模型利用不同行走速度数据训练一簇隐马尔可夫模型模型,使本发明的方法适用于不同运动模态和不同行走速度,为外骨骼控制提供模式切换、行走步态等可靠数据,具备良好的扩展能力和适应能力,提高了辨别准确度,而且即使偶发识别错误也仅限相邻状态,可极大避免执行器误动作。
Smart Images

Figure CN110859629B_ABST
Abstract
Description
Technical Field
[0001] This application relates to an exoskeleton gait recognition method and device based on a two-layer hidden Markov model, belonging to the field of artificial intelligence technology. Background Technology
[0002] Lower limb exoskeleton robots are wearable assistive robots designed to help humans complete tasks they cannot perform on their own, reduce physical burden, and improve work efficiency. They have broad application prospects in both military and civilian fields. The key to lower limb exoskeleton robot assistive technology lies in recognizing human gait and implementing corresponding control strategies under different gait states to achieve the goal of assistance. Human walking has certain quasi-periodic characteristics, but walking varies greatly among different people, in different motion modes, and under different environments. Accurately and reliably identifying the motion state and providing reliable information for control strategies is a key problem that needs to be solved.
[0003] In existing technologies, traditional threshold- and rule-based recognition methods are ill-suited to the diversity, randomness, and changing external environments and gait modalities of human movement. Consequently, they suffer from limited scalability and poor adaptability. Therefore, many studies have utilized machine learning for gait recognition. For example, some methods combine plantar pressure data with ensemble learning to identify gait phases. However, relying solely on plantar pressure provides insufficient gait information, making it difficult to guarantee adaptability to different movement modalities. Other methods utilize multi-source foot information but lack hip and knee joint motion information. Still others use multi-source information such as plantar pressure and joint angles, employing threshold- and rule-based recognition, which suffers from poor scalability and adaptability. Additionally, there are methods that use other machine learning techniques to process multi-source data for gait recognition. However, none of these methods can guarantee 100% accuracy in open environments. Furthermore, because exoskeletons are directly coupled to the human body, if the exoskeleton performs movements according to an incorrect modality, it can cause unexpected torques on the human body, leading to incoordination or even falls and injuries. Compared to other machine learning methods, Hidden Markov Models (HMMs) utilize a dual stochastic process, effectively using time-series data to describe dynamic state changes, achieving significant results in speech recognition. By modeling human-exoskeleton walking using a jump-free HMM, the relationship between sensor data (manifest state) and gait (implicit state) is modeled through a stochastic process. Even if occasional recognition errors occur, they are limited to the next adjacent gait phase, without oscillating transitions, thus avoiding accidental execution and significantly reducing the risk of injury. Summary of the Invention
[0004] This application provides a method and apparatus for exoskeleton gait recognition based on a two-layer hidden Markov model, which can solve the problems in existing solutions. This application provides the following technical solution:
[0005] Firstly, a method for exoskeleton gait recognition based on a two-layer hidden Markov model is provided, the method comprising:
[0006] Collect M-dimensional sensor data of the exoskeleton during movement;
[0007] Transform the M-dimensional sensing data;
[0008] The transformed M-dimensional sensing data is input into a trained two-layer hidden Markov model, and the motion pattern of the exoskeleton is obtained through the upper layer of the two-layer hidden Markov model.
[0009] Obtain the walking speed of the exoskeleton;
[0010] The walking speed is input into the two-layer hidden Markov model, and the gait phase of the exoskeleton is obtained through the lower layer of the two-layer hidden Markov model.
[0011] Optionally, obtaining the walking speed of the exoskeleton includes:
[0012] Obtain n walking stride lengths SLen and gait periods T;
[0013] Each walking speed
[0014] Calculate the average speed of n walking speeds, and use the average speed as the walking speed of the exoskeleton;
[0015] in,
[0016] Len lt and Len ls These are the lengths of the exoskeleton's left thigh and lower leg, respectively. rt and Len rs These are the lengths of the right thigh and lower leg of the exoskeleton, respectively, θ l and These are the left hip joint angle and knee joint angle, θ. r and These are the right hip joint angle and knee joint angle, respectively; the gait period T is the time between the first and second foot strikes the ground, and n is an integer greater than or equal to 2. Optionally, inputting the walking speed into the two-layer hidden Markov model to obtain the gait phase of the exoskeleton includes:
[0017] Based on the walking speed, the speed model is interpolated to obtain the actual walking speed model;
[0018] The gait phase of the exoskeleton is calculated using the actual walking speed model.
[0019] Secondly, a method for training a two-layer Hidden Markov Model is provided, the method comprising:
[0020] Acquire sample data, which includes K sets of M-dimensional motion data under N motion modes;
[0021] The first initialization model is trained based on the sample data to obtain the upper model of the two-layer hidden Markov model. The upper model of the trained two-layer hidden Markov model is used to obtain the motion pattern of the exoskeleton based on the motion data.
[0022] The second initialization model is trained based on the sample data to obtain the lower layer model of the two-layer hidden Markov model. The lower layer model of the trained two-layer hidden Markov model is used to obtain the gait phase of the exoskeleton based on the motion data.
[0023] Optionally, the first initialization model includes: λ = (N, M, π(s), A(S), B(S)); where N is the number of motion modes, that is, the upper-level Markov process has N states, and the state space is S = {s1, s2, ... s}. N}, where M is the number of variables, and π(s) is the initial state probability distribution of the system. A(S) is the state transition probability matrix. Represents the state s at time t t To s t+1 The transition probability, B (S) To observe the probability distribution of variables Represents the state s at time t j The observation vector is v k The output probability. At time t, the state of the upper Markov chain is q. s ,t∈{s1,s2,…,s N}
[0024] Optionally, training the first initialization model based on the sample data to obtain the upper-layer model of the two-layer Hidden Markov Model includes:
[0025] Based on the observed sequence O = o1, o2, ..., o t A is calculated using the Baum-Welch algorithm. (S) and B (S) Among them, o i It is a vector consisting of M variables.
[0026] Optionally, the second initialization model includes:
[0027] λ n =(G n ,M,π(r),A(R),B(R)); among them, Gn Let G be the number of gait phases in the nth movement mode, i.e., the lower-level Markov process has G. n There are states, and the state space is R. n ={r1,r2,…,r Gn}, where M is the number of variables, and π(r) is the initial state probability distribution. A (R) State transition probability matrix Represents the state r at time t t towards r t+1 The transition probability of B; (R) To observe the probability distribution of variables Represents the state r at time t j The observation vector is v k The output probability; at time t, the state of the lower Markov chain is q. s,t ∈{s1,s2,…,s N}
[0028] Optionally, training the second initialization model based on the sample data to obtain the lower-layer model of the two-layer Hidden Markov Model includes:
[0029] Based on the walking speed and observation sequence, the Baum-Welch algorithm is used to calculate... and Repeat L n Next, a model of the actual walking speed is obtained.
[0030] Thirdly, an exoskeleton gait recognition device based on a two-layer hidden Markov model is provided. The device includes a processor and a memory, wherein the memory stores at least one program instruction, and the processor loads and executes the at least one program instruction to implement the method described above.
[0031] The beneficial effects of this application are as follows:
[0032] This invention proposes to model and identify human-exoskeleton operating modes and gait phases using a two-layer Hidden Markov Model (HMM). The upper-layer HMM identifies the motion modes, while the lower-layer HMM identifies the gait phase under each motion mode. The lower-layer HMM trains a cluster of HMM models using data from different walking speeds, making the method applicable to different motion modes and walking speeds. This provides reliable data for exoskeleton control, such as mode switching and walking gait, and has good scalability and adaptability. It improves the accuracy of identification, and even if occasional identification errors occur, they are limited to adjacent states, which can greatly avoid actuator malfunctions.
[0033] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0034] Figure 1 Flowchart of the exoskeleton gait recognition method based on a two-layer hidden Markov model as described in this invention;
[0035] Figure 2 The flowchart for training a two-layer hidden Markov model as described in this invention. Detailed Implementation
[0036] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0037] Please refer to Figure 1 and Figure 2 It illustrates a flowchart of an exoskeleton gait recognition method based on a two-layer hidden Markov model according to an embodiment of this application, as shown below. Figure 1 and Figure 2 As shown, the method includes:
[0038] Step 101: Collect M-dimensional sensor data of the exoskeleton during movement;
[0039] Step 102: Transform the M-dimensional sensing data.
[0040] Optionally, the M-dimensional sensing data can be filtered before transformation.
[0041] Step 103: Input the transformed M-dimensional sensing data into the trained two-layer Hidden Markov Model, and obtain the motion pattern of the exoskeleton through the upper layer of the two-layer Hidden Markov Model.
[0042] The steps for training a two-layer hidden Markov model include:
[0043] Step 1: Construct an exoskeleton gait recognition framework based on a two-layer hidden Markov model, including model building and sample data preparation.
[0044] First, model establishment. A two-layer Hidden Markov Model (HMM) models the relationship between the explicit state (sensor data) and the implicit state (motion model, gait phase) through a stochastic process. Assuming that normal human walking gait includes movement patterns such as standing, walking on flat ground, climbing stairs, and descending stairs, with several gait phases in each movement pattern, sensor data is used to identify the current movement pattern and gait phase. The ten-tuple λ = (N, G) of the HMM is...n ,M,π (s) ,π (r) A (S) A (R) B (S) B (R) The specific definition is as follows:
[0045] (1) The sensor used for gait identification collects M variables, with the symbol set being V = {v1, v2, ..., v...}. M The observed value of the model at time t is o. t ∈{o1,o2,…,o M}, where o i A vector consisting of M variables;
[0046] (2) If there are N motion patterns, then the upper-level Markov process corresponding to each motion pattern has N states, and the state space is S = {s1, s2, ... s}. N The number of gait phases in the nth movement pattern is G. n There are , corresponding to the lower-level Markov process G. n There are states, and the state space is R. n ={r1,r2,…,r Gn};
[0047] (3) If at a certain time t, the upper-level Markov chain can only be in one of the motion modes and gait phases, then the state of the upper-level Markov chain at that time is q. s,t , and q s,t ∈{s1,s2,…,s N The state of the lower-level Markov chain is q. r,t , and q r,t ∈{r1,r2,…,r N};
[0048] (4)A (S) State transition probability matrix Represents the state s at time t t To s t+1 The transition probability, B (S) To observe the probability distribution of variables Represents the state s at time t j The observation vector is v k The output probability of π. (s) Let the initial state probability distribution of the system be... A (R) State transition probability matrix Represents the state r at time t t towards r t+1 The transition probability, B (R) To observe the probability distribution of variables Represents the state r at time t j The observation vector is v k The output probability of π. (R) Let the initial state probability distribution of the system be...
[0049] Second, sample data preparation. K sets of M-dimensional sensor data were collected from multiple individuals across N motion modes to ensure a balanced data volume across all modes. Motion data at L different speeds were collected for each mode. After filtering and scaling, the data were labeled according to different gait phases, such as early support, mid-support, late support, early swing, and late swing. The sample data was then divided into training and testing data sets.
[0050] Step 2: Offline training of the upper-level Hidden Markov model corresponding to the motion pattern
[0051] Using modality transformation data from offline datasets, and with known labels, the model parameters can be solved.
[0052] The specific process is as follows:
[0053] 1) Initialize the model λ = (N, M, π) (s) A (S) B (S) (That is, the first initialization model) parameters, where N is the number of motion modes, M is the number of sensor variables, and π (s) The initial state probability distribution;
[0054] 2) Based on the observation sequence O = o1, o2, ..., o in the training data t The Baum-Welch algorithm is used to solve for the model parameters A. (S) and B (S) .
[0055] 3) Repeat the training process of 1) and 2) multiple times, use the Viterbi algorithm to verify the recognition accuracy of the model on the test dataset, and select a set of model parameters with the highest accuracy as the final model training result.
[0056] As can be seen from the above, in practical applications, the motion patterns of the exoskeleton can be obtained after inputting motion data into the upper-level model of the Hidden Markov Model.
[0057] Step 104: Obtain the walking speed of the exoskeleton.
[0058] Optionally, obtaining the walking speed of the exoskeleton includes:
[0059] First, obtain the walking stride length SLen and gait period T;
[0060] Second, the walking speed
[0061] in,
[0062] Len lt and Len ls These are the lengths of the exoskeleton's left thigh and lower leg, respectively. rt and Len rs These are the lengths of the right thigh and lower leg of the exoskeleton, respectively, θ l and These are the left hip joint angle and knee joint angle, θ. r and These are the angles of the right hip joint and knee joint, respectively.
[0063] The gait period T is the time elapsed between two strikes of the same foot on the same side, that is, the time between the first strike and the next. Furthermore, due to the inherent randomness of walking, walking speed can fluctuate significantly. Therefore, the average speed calculated n times is used as the current walking speed, and this average speed is determined as the walking speed. For example, the average speed obtained from 3-5 calculations can be used.
[0064] Step 105: Input the walking speed into the two-layer hidden Markov model, and obtain the gait phase of the exoskeleton through the lower layer of the two-layer hidden Markov model.
[0065] The training process of the lower-level models in a Hidden Markov Model includes:
[0066] 1) For the nth motion pattern, initialize model λ n =(G n ,M,π (r) A (R) B (R) ) parameters, where G n M represents the number of motion patterns, and π represents the number of sensor variables. (r) The initial state probability distribution;
[0067] 2) Based on walking speed Observation sequence O l =o l,1 ,o l,2 ,…,o l,t The Baum-Welch algorithm is used to solve for the model parameters. and The model λ is obtained n,l ;
[0068] 3) Repeat the training process of 1) and 2) multiple times, use the Viterbi algorithm to verify the recognition accuracy of the model on the test dataset, and select the model parameters with the highest accuracy as the final model training result.
[0069] 4) Sequentially process L n Training was conducted at different walking speeds, repeating steps 1 through 3, to obtain a cluster of L. n A model (i.e., a velocity model of actual motion).
[0070] 5) For each motion pattern n = 1 → N, repeat steps 1) to 4) above to train L for each motion pattern. n One model.
[0071] Accordingly, inputting the walking speed into the two-layer hidden Markov model to obtain the gait phase of the exoskeleton includes:
[0072] Based on the walking speed, the speed model is interpolated to obtain the actual walking speed model;
[0073] The gait phase of the exoskeleton is calculated using the actual walking speed model.
[0074] Optionally, the motion mode r can be solved using the Viterbi algorithm. n .
[0075] This invention proposes to model and identify human-exoskeleton operating modes and gait phases using a two-layer Hidden Markov Model (HMM). The upper-layer HMM identifies the motion modes, while the lower-layer HMM identifies the gait phase under each motion mode. The lower-layer HMM trains a cluster of HMM models using data from different walking speeds, making the method applicable to different motion modes and walking speeds. This provides reliable data for exoskeleton control, such as mode switching and walking gait, and has good scalability and adaptability. It improves the accuracy of identification, and even if occasional identification errors occur, they are limited to adjacent states, which can greatly avoid actuator malfunctions.
[0076] This embodiment also provides an exoskeleton gait recognition device based on a two-layer hidden Markov model. The device includes a processor and a memory. The memory stores at least one program instruction. The processor loads and executes the at least one program instruction to implement the recognition method described above.
[0077] This embodiment also provides a training device for a two-layer hidden Markov model. The device includes a processor and a memory. The memory stores at least one program instruction. The processor loads and executes the at least one program instruction to implement the training method described above.
[0078] This embodiment also provides a storage medium storing at least one program instruction, which is loaded and executed by a processor to implement the training method described above.
[0079] This embodiment also provides a storage medium storing at least one program instruction, which is loaded and executed by a processor to implement the identification method described above.
[0080] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0081] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for exoskeleton gait recognition based on a two-layer hidden Markov model, characterized in that, The method includes: Collect M-dimensional sensor data of the exoskeleton during movement; Transform the M-dimensional sensing data; Acquire sample data, which includes K sets of M-dimensional motion data under N motion modes; A first initialization model is trained based on the sample data to obtain the upper-layer model of the two-layer Hidden Markov Model. The trained upper-layer model of the two-layer Hidden Markov Model is used to obtain the motion pattern of the exoskeleton based on the motion data. The first initialization model includes: ;in, The number of motion patterns, i.e., the number of upper-level Markov processes, is... There are states, and the state space is... , For the number of variables, Let the initial state probability distribution of the system be... , Here is the state transition probability matrix. Represents the state at time t Towards The transition probability, To observe the probability distribution of variables , representing the state at time t The time observation vector is The output probability; at time t, the state of the upper Markov chain is ; A second initialization model is trained based on the sample data to obtain the lower layer model of the two-layer Hidden Markov Model. The trained lower layer model of the two-layer Hidden Markov Model is used to obtain the gait phase of the exoskeleton based on the motion data. The second initialization model includes: ;in, The number of gait phases in the nth movement mode, i.e., the number of phases in the lower-level Markov process. There are states, and the state space is... , For the number of variables, The initial state probability distribution, ; State transition probability matrix , representing the state at time t Towards The transition probability; To observe the probability distribution of variables , representing the state at time t The time observation vector is The output probability; at time t, the state of the lower Markov chain is ; The transformed M-dimensional sensing data is input into a trained two-layer hidden Markov model, and the motion pattern of the exoskeleton is obtained through the upper layer of the two-layer hidden Markov model. Obtaining the walking speed of the exoskeleton; obtaining the walking speed of the exoskeleton includes: Obtain n walking stride lengths SLen and gait periods T; Each walking speed ; Calculate the average speed of n walking speeds, and use the average speed as the walking speed of the exoskeleton; in, , and These are the lengths of the left thigh and lower leg of the exoskeleton, respectively. and These are the lengths of the right thigh and lower leg of the exoskeleton, respectively. and These are the angles of the left hip joint and knee joint, respectively. and These are the angles of the right hip joint and knee joint, respectively; the gait period T is the time between the first and second foot strikes the ground, and n is an integer greater than or equal to 2; The walking speed is input into the two-layer Hidden Markov Model (HMM), and the gait phase of the exoskeleton is obtained through the lower layer of the HMM; wherein, inputting the walking speed into the HMM to obtain the gait phase of the exoskeleton includes: Based on the walking speed, the speed model is interpolated to obtain the actual walking speed model; The gait phase of the exoskeleton is calculated using the actual walking speed model. The step of training a second initialization model based on the sample data to obtain the lower layer model of the two-layer Hidden Markov Model includes: Based on the walking speed and observation sequence, the Baum-Welch algorithm is used to calculate... and ,repeat Next, a model of the actual walking speed is obtained.
2. The method according to claim 1, characterized in that, The step of training a first initialization model based on the sample data to obtain the upper-layer model of the two-layer Hidden Markov Model includes: Based on the observation sequence Calculate using the Baum-Welch algorithm and ;in, for A vector consisting of variables.
3. An exoskeleton gait recognition device based on a two-layer hidden Markov model, characterized in that, The device includes a processor and a memory, the memory storing at least one program instruction, the processor loading and executing the at least one program instruction to implement the method as claimed in claim 1 or 2.
Citation Information
Patent Citations
Positioning method based on layered hidden Markov model (HMM)
CN106371064A
Zero-speed detection method based on hidden Markov model and indoor pedestrian inertial navigation system
CN109883429A
Indentifying One or More Activities of an Animate or Inanimate Object
US20110066383A1
Exoskeleton gait analysis system and method based on multi-sensor fusion
CN106176149A