A lower limb gait pattern recognition method based on IMU
By arranging IMU sensors at the waist and combining LDA algorithms to identify multiple gait patterns in the lower limbs of the human body, the problems of incomplete identification and complex calculations in the prior art are solved, and simple and efficient gait pattern recognition is achieved.
Patent Information
- Application Number
- CN202310451662.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-04-25
AI Technical Summary
The prior art is difficult to effectively identify the various gait patterns common to human lower limbs in daily life, and usually requires multiple sensors, which has high computational complexity.
A single IMU sensor is arranged at the waist. By calculating the eigenvalues and Euler angles in the nine-axis data, combined with the linear discriminant analysis (LDA) algorithm, it is possible to identify gait patterns such as standing, walking, turning, going upstairs, going upslopes, downslopes, downslopes, etc., to reduce the dimension to the low-dimensional feature space and calculate the Euclidean distance for classification.
The complete recognition of seven common gait patterns is achieved, with small calculations and simplified the recognition process. The recognition of multiple gait patterns can be completed with only one IMU sensor.
Smart Images

Figure CN116570270B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pattern recognition, and in particular to a lower limb gait pattern recognition method based on IMU. Background Art
[0002] In the field of lower-limb exoskeletons, recognizing lower-limb gait patterns is a crucial task. Everyday lower-limb movements include standing, walking, turning, climbing and descending stairs, and going uphill and downhill. Identifying these different gait patterns is essential for lower-limb exoskeletons to assist with lower-limb movement. These gait patterns occur cyclically, and the data collected by sensors will also exhibit cyclical variations.
[0003] An inertial measurement unit (IMU) is a sensor that can detect changes in angle, acceleration, and angular velocity. It is small in size, easy to use, and widely used in the field of exoskeletons.
[0004] Linear discriminant analysis (LDA) is a widely used pattern recognition algorithm that reduces the dimensionality of feature vectors to a low-dimensional feature space through a dimensionality reduction matrix. It can aggregate feature vectors with the same label and discretize feature vectors with different labels, thereby achieving classification in the low-dimensional space by calculating the distance between feature vectors and label points of different categories. Summary of the Invention
[0005] To overcome the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method for lower limb gait pattern recognition based on an IMU. Using signal data from an IMU mounted on the waist, this method can effectively identify seven lower limb gait patterns: standing, walking, turning, climbing stairs, descending stairs, going uphill, and going downhill.
[0006] The purpose of the present invention is achieved through the following technical solutions:
[0007] A lower limb gait pattern recognition method based on IMU, comprising:
[0008] The IMU sensor placed at the waist of the human body obtains signal data during the movement of the human lower limbs, wherein the signal data includes nine-axis data, and the nine-axis data includes Euler angles, angular velocity and acceleration of the x, y and z axes;
[0009] Calculate the root mean square of the X-axis angular velocity data to determine whether the current state is standing; if so, output it directly, otherwise proceed to the next step;
[0010] Identify the gait event frame. If the identified data is the trough in the y-axis Euler angle, corresponding to the left foot touching the ground, it is defined as a gait event frame.
[0011] If a gait event frame is identified, window data is intercepted at the gait event frame, and the four eigenvalues of absolute mean, variance, root mean square, and wavelength are calculated using the window data, and then normalized to obtain a eigenvector. The eigenvector is reduced to a low-dimensional feature space using a pre-trained dimensionality reduction matrix, and the Euclidean distance between the eigenvector and the label point of each gait pattern category is calculated. The category with the smallest distance is selected as the gait pattern output for this discrimination, realizing the recognition of walking, climbing stairs, descending stairs, uphill and downhill.
[0012] If the gait event frame is judged as no, turn recognition is performed by calculating the gradient value of the z-axis Euler angle within a fixed-length window.
[0013] Furthermore, the root mean square of the X-axis angular velocity data is calculated to determine whether the current state is standing, specifically:
[0014] At the current execution frame, data of a fixed length of n is intercepted. That is, the current IMU data is the i-th frame. Then, the data in the range [in, i] is intercepted to calculate the root mean square (RMS) and compared with the set threshold. If the RMS value is less than the threshold, it is determined that the current state is standing.
[0015] Furthermore, the specific process of identifying gait event frames is as follows:
[0016] Obtain the Y-axis Euler angle data and use smoothing filtering to filter the signal data;
[0017] Calculate the timestamp t of the current frame i The timestamp t of the last frame that has been identified as a gait event lastSign Is the difference greater than the threshold ΔT? If it is greater than the threshold ΔT, calculate the ratio P of the Euler angle value of the y-axis of the current frame in the left and right windows of fixed length. L and P R , if P L and P R If it is greater than the threshold P, the output data frame j is a gait event frame, and the threshold ΔT is updated:
[0018]
[0019] Where n is the number of recognized gait event frames, ΔT is the threshold before updating, is the timestamp of the nth gait event frame.
[0020] Furthermore, the ratio of the Euler angle value on the y-axis of the current frame within the left and right windows of fixed length is calculated, that is:
[0021]
[0022]
[0023] Among them, x j Is the y-axis Euler angle value of the determination frame j, j = il R , l L and l R is the left and right window length, and the left and right window data ranges are [il L -l R ,il R ] and [il R ,i],N(x>x j ) is the value in the window greater than x j The number of data frames.
[0024] Furthermore, if the gait event frame is judged as negative, turn recognition is performed by calculating the gradient value of the z-axis Euler angle within a fixed-length window, specifically:
[0025] Calculate the z-axis Euler angle data and the gradient value G within a window of length n i ,Right now:
[0026]
[0027] Among them, eulerZ i is the Euler angle value of the z-axis in the i-th frame, n is the window length, and if the gradient value is greater than the threshold, it is determined that the current state is in the turning gait cycle and the result is output.
[0028] Furthermore, the pre-trained dimensionality reduction matrix is obtained by pre-collecting IMU sample data of the lower limb gait pattern category, calculating the eigenvector, and performing dimensionality reduction training using the LDA algorithm.
[0029] Furthermore, after the dimensionality reduction of the sample data of each pattern, the average value of the feature vector is calculated to obtain the label point of the corresponding pattern category.
[0030] Furthermore, the IMU is arranged at the waist position of the human body, with the z-axis of the IMU pointing vertically upward, that is, the vertical axis direction of the human anatomy; and the y-axis pointing forward of the human body movement, that is, the sagittal axis direction of the human anatomy.
[0031] Furthermore, when each single frame of data is received, the method flow will be triggered and executed once. The single frame of data is a vector of length 9 composed of the IMU nine-axis data.
[0032] Compared with the prior art, the present invention has the following advantages and beneficial effects: compared with the prior art which uses multiple sensors, the present method realizes lower limb gait pattern recognition by only arranging one IMU at the waist.
[0033] Compared with the gait pattern types identified by existing technologies, the seven lower limb gait patterns output by this method are more complete and summarize the common gait patterns of people in daily walking.
[0034] Compared with the existing technology, this method has small computational complexity and is simple to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Schematic diagram of the IMU configuration of the present invention;
[0036] Figure 2 It is a workflow diagram of the present invention;
[0037] Figure 3 is a schematic diagram of the process of identifying gait event frames according to the present invention;
[0038] Figure 4 It is a schematic diagram of the process of recognizing turning gait of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below with reference to the examples, but the embodiments of the present invention are not limited thereto.
[0040] A lower limb gait pattern recognition method based on IMU, such as Figure 2 As shown, the following steps are included:
[0041] The S1 uses an IMU sensor placed at the waist to capture signal data during lower limb movement. This data includes nine-axis data, including Euler angles, angular velocity, and acceleration for the x, y, and z axes, with a return frequency of 100Hz. During the experiment, the subject performed actions such as standing, walking, turning, climbing and descending stairs, and going uphill and downhill.
[0042] In this embodiment, there is one IMU sensor, such as Figure 1 As shown, the IMU is set at the waist of the human body, with the z-axis of the IMU pointing vertically upward, that is, the vertical axis direction of the human anatomy; the y-axis points to the front of the human body, that is, the sagittal axis direction of the human anatomy.
[0043] This method is executed once when a frame of data is received from the IMU, that is, the execution frequency is the same as the IMU return frequency.
[0044] S2 first calculates the root mean square of the x-axis angular velocity data by intercepting data of a fixed length of n at the current execution frame. That is, the current IMU data is the i-th frame, then the data in the [in, i] range is intercepted to calculate the root mean square, and compared with the set threshold. If the root mean square value is less than the threshold, the current state is standing.
[0045] Otherwise, proceed to the next step.
[0046] In this embodiment, the RMS threshold is 1.
[0047] S3 identifies gait event frames. According to experimental analysis, the trough of the y-axis Euler angle data corresponds to the gait event of the left heel touching the ground during the movement of the human lower limbs. Figure 3 The frame is identified using the y-axis Euler angle data. First, the signal data is filtered by smoothing filtering. Then the timestamp t of the current frame is calculated. i The timestamp t of the last frame identified as a gait event lastSign Is the difference greater than the threshold ΔT? If so, the next step is executed to reduce false recognition.
[0048] The next step is to calculate the ratio of the fixed-length left and right windows that is greater than the Euler angle value of the current frame's y-axis, that is:
[0049]
[0050]
[0051] Among them, x j Is the y-axis Euler angle value of the determination frame j, j = il R , l L and l R is the left and right window length, and the left and right window data ranges are [il L -l R ,il R ] and [il R ,i],N(x>x j ) is the value in the window greater than x j The number of data frames.
[0052] If P L and P R If it is greater than the threshold P, the output data frame j is a gait event frame, and the threshold ΔT is updated:
[0053]
[0054] Where n is the number of recognized gait event frames, ΔT is the threshold before updating, is the timestamp of the nth gait event frame. It should be noted that the output of the gait frame is not the current data frame i, that is, it has a length of l R delay.
[0055] In this embodiment, when the transmission frequency of the IMU is 100 Hz, the threshold ΔT is 700 ms, the left window length is 500 ms, the right window length is 500 ms, and the threshold P is equal to 0.7.
[0056] S4 according to Figure 2 If the current frame is not a gait event frame, that is, the current data is a data frame within the gait cycle, then turn determination is performed. Figure 4 The flowchart shown in the figure calculates the Euler angle data of the z axis and the gradient value G in the window of length n. i ,Right now:
[0057]
[0058] Among them, n is the window length, eulerZ i is the Euler angle value of the z-axis in the i-th frame. If the gradient value is greater than the threshold, it is determined that the current state is within the turning gait cycle and the result is output.
[0059] In this embodiment, the gradient threshold is 100.
[0060] S5, when a gait event frame is identified, a window data with a fixed length of m is intercepted at gait event frame j, that is, the interval data of [j, j+m] is intercepted, where m is less than l R The eigenvalues of the intercepted data are calculated, and the four features of the nine-axis signal data, namely the absolute mean, variance, root mean square and wavelength, are calculated. The features are normalized to obtain the eigenvector.
[0061] In this embodiment, the length of the capture window m is 300ms, and the IMU feedback frequency is 100Hz.
[0062] Using pre-collected IMU sample data for walking, climbing stairs, descending stairs, and going uphill and downhill, we calculated eigenvalues and used the LDA algorithm for dimensionality reduction training to generate a reduced dimensionality matrix. After dimensionality reduction, we calculated the average eigenvector for each pattern and obtained the label point for that pattern category.
[0063] The principle of using the LDA algorithm for recognition in the present invention is: reducing the dimension of the calculated eigenvector through a dimensionality reduction matrix, calculating the Euclidean distance between the eigenvector and the label points of each category in the reduced eigenspace, taking the category with the smallest Euclidean distance as the classification of the eigenvector, and outputting the gait pattern as the discrimination, thereby realizing the recognition of walking, climbing stairs, descending stairs, going uphill and downhill.
[0064] In practical applications, the 36-dimensional feature vectors are also optimized by selecting features for combination, and using sample data for training dimensionality reduction matrix and recognition. The optimal feature combination is selected by comparing the recognition rates.
[0065] Through the above steps, the IMU-based lower limb gait pattern recognition method can realize the recognition of seven gait patterns: standing, walking, turning, climbing stairs, descending stairs, going uphill, and going downhill.
[0066] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A method for lower limb gait pattern recognition based on IMU, characterized in that: include: The IMU sensor placed at the waist of the human body obtains signal data during the movement of the human lower limbs, wherein the signal data includes nine-axis data, and the nine-axis data includes Euler angles, angular velocity and acceleration of the x, y and z axes; Calculate the root mean square of the X-axis angular velocity data to determine whether the current state is standing; if so, output it directly, otherwise proceed to the next step; Identify the gait event frame. If the identified data is the trough in the y-axis Euler angle, corresponding to the left foot touching the ground, it is defined as a gait event frame. If it is identified as a gait event frame, the window data is intercepted at the gait event frame, and the four eigenvalues of absolute mean, variance, root mean square, and wavelength are calculated using the window data, and normalized to obtain the eigenvector; The pre-trained dimensionality reduction matrix is used to reduce the eigenvector to a low-dimensional feature space. The Euclidean distance between the eigenvector and each gait pattern category label point is calculated. The category with the smallest distance is selected as the gait pattern output for this discrimination, realizing the recognition of walking, climbing stairs, descending stairs, and going uphill and downhill. If the gait event frame is judged as no, turn recognition is performed by calculating the gradient value of the z-axis Euler angle within a fixed-length window.
2. The method for recognizing lower limb gait patterns according to claim 1, wherein: The root mean square of the X-axis angular velocity data is calculated to determine whether the current state is standing, specifically: At the current execution frame, data of a fixed length of n is intercepted. That is, the current IMU data is the i-th frame. Then, the data in the range [in, i] is intercepted to calculate the root mean square (RMS) and compared with the set threshold. If the RMS value is less than the threshold, it is determined that the current state is standing.
3. The method for recognizing lower limb gait patterns according to claim 1, wherein: The specific process of identifying gait event frames is as follows: Obtain the Y-axis Euler angle data and use smoothing filtering to filter the signal data; Calculate the timestamp t of the current frame i The timestamp t of the last frame that has been identified as a gait event lastSign Is the difference greater than the threshold ΔT? If it is greater than the threshold ΔT, calculate the ratio P of the Euler angle value of the y-axis of the current frame in the left and right windows of fixed length. L and P R , if P L and P R If it is greater than the threshold P, the output data frame j is a gait event frame, and the threshold ΔT is updated: Where n is the number of identified gait event frames, ΔT is the threshold before updating, is the timestamp of the nth gait event frame.
4. The method for recognizing lower limb gait patterns according to claim 1, wherein: Calculate the ratio of the Euler angle value on the y-axis of the current frame within the fixed-length left and right windows, that is: Among them, x j Is the y-axis Euler angle value of the determination frame j, j = il R , l L and l R is the left and right window length, and the left and right window data ranges are [il L -l R ,il R ] and [il R ,i],N(x>x j ) is the value in the window greater than x j The number of data frames.
5. The method for recognizing lower limb gait patterns according to claim 1, wherein: If the gait event frame is judged as negative, turn recognition is performed by calculating the gradient value of the z-axis Euler angle within a fixed-length window. Specifically, Calculate the z-axis Euler angle data and the gradient value G within a window of length n i ,Right now: Among them, eulerZ i is the Euler angle value of the z-axis in the i-th frame, n is the window length, and if the gradient value is greater than the threshold, it is determined that the current state is in the turning gait cycle and the result is output.
6. The method for recognizing lower limb gait patterns according to claim 1, wherein: The pre-trained dimensionality reduction matrix is obtained by pre-collecting IMU sample data of the lower limb gait pattern category, calculating the eigenvector, and performing dimensionality reduction training using the LDA algorithm.
7. The method for recognizing lower limb gait patterns according to claim 6, wherein: After the dimensionality reduction of the sample data of each pattern, the average value of the feature vector is calculated to obtain the label point of the corresponding pattern category.
8. The method for recognizing lower limb gait patterns according to any one of claims 1 to 7, characterized in that: The IMU is placed at the waist of the human body, with the z-axis of the IMU pointing vertically upward, that is, the vertical axis direction in human anatomy; the y-axis points toward the front of the human body, that is, the sagittal axis direction in human anatomy.
9. The method for recognizing lower limb gait patterns according to claim 1, wherein: When receiving each single frame of data, the method process will be triggered and executed once. The single frame of data is a vector of length 9 composed of the IMU nine-axis data.
Citation Information
Patent Citations
Hip joint exoskeleton-oriented human body motion mode recognition method
CN110555429A
Gait analysis method and system and device for improving walking obstacles
CN115486837A