A lower limb prosthesis motion recognition method based on LR-ELM
Through the lower limb prosthetic motion recognition method based on LR-ELM, combined with the ideas of Logistic Regression and KNN algorithms, and using PSO and BBO algorithm optimization, the contradiction between the accuracy and parameter quantity of the lower limb prosthetic motion recognition algorithm in the existing technology is solved, and the realization It achieves real-time recognition effects with high accuracy and low parameter volume, and is suitable for portable devices.
Patent Information
- Application Number
- CN202210578651.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There is a contradiction between the accuracy and the number of parameters in the existing lower-limb prosthetic motion recognition algorithms, resulting in poor prediction results in real-time human intention recognition on portable devices and a high error rate, affecting the safety of amputees.
The lower limb prosthetic motion recognition method based on LR-ELM is used. The coefficient vector and intercept generated by training the Logistic Regression classifier are used as the hidden layer input of the ELM algorithm. The classification ideas of the KNN algorithm and the optimization of the PSO and BBO algorithms are combined to reduce the hidden layer. It reduces the number of layer nodes and improves classification accuracy to achieve real-time motion intention recognition.
It significantly improves the accuracy of amputee movement intention recognition, reduces the number of parameters, and is suitable for STM32 microcontroller for real-time prediction, which is better than the original ELM, LR and KNN algorithms.
Smart Images

Figure CN114997295B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of online pattern recognition, and in particular relates to a lower limb prosthesis motion recognition method based on LR-ELM. Background Art
[0002] There are millions of lower limb amputees around the world who face problems such as mobility difficulties. The existence of lower limb prostheses can help them resume daily activities. Over the years, the research focus of lower limb prostheses has gradually shifted from the initial passive prostheses to active prostheses that can save effort and intelligently adjust gait for disabled people. The development of active prostheses requires more advanced and intuitive control strategies, and it is particularly important to accurately judge the movement intentions of patients with lower limb amputations. The extreme learning machine algorithm is faster while ensuring accurate results, and is suitable for human intention recognition. However, in order to achieve a high-precision classification effect, a large number of hidden layer nodes need to be set, and there is a huge problem of parameter volume, which is not conducive to real-time human intention recognition prediction on portable devices. The Logistic regression (LR) algorithm and the KNN algorithm have been applied to the human intention recognition of amputees because of their simple structure and ability to effectively handle multi-classification problems. The classification accuracy can reach about 95%, but the error rate of about 5% will still lead to falls and cause harm to amputees.
[0003] Due to various defects of the existing algorithms, the effects in practical applications are not ideal. The present invention proposes to use a lower limb prosthesis motion recognition method based on LR-ELM to predict the motion state of the subject in real time. Summary of the invention
[0004] The purpose of the present invention is to provide a method for lower limb prosthesis motion recognition based on LR-ELM, by training the coefficient vector ω generated by the LR classifier LR and intercept b LR As part of the hidden layer input weights ω and bias b of the ELM algorithm, the number of hidden layer nodes in the ELM algorithm is greatly reduced. Drawing on the classification idea of the KNN algorithm, the Euclidean distance between the unclassified point and the cluster center of each class is calculated, and the mean deviation vector of the class with the smallest distance value is selected as the deviation used by the point in the improved ELM algorithm, which improves the classification accuracy of the model and realizes the real-time recognition and prediction of the movement intention of amputees.
[0005] A lower limb prosthesis motion recognition method based on LR-ELM of the present invention comprises the following steps:
[0006] 1.1 Obtaining motion data collected by sensors on the prosthesis when the disabled subjects wear the knee-ankle linkage prosthesis and perform nine daily motion states, including the following steps:
[0007] 1.1.1 Using load cells, knee angle sensors, knee IMU sensors, ankle angle sensors, and ankle IMU sensors placed on knee-ankle linkage prostheses, data were collected from seven male disabled subjects and one female disabled subject during slow horizontal walking, normal horizontal walking, fast horizontal walking, uphill, downhill, sitting, standing, going upstairs, and going downstairs;
[0008] 1.1.2 The sensor data collected by the sensors placed on the knee-ankle linkage prosthesis include: ground reaction force, knee joint angle, IMU sensor X-axis acceleration at the knee joint, IMU sensor Y-axis acceleration at the knee joint, IMU sensor Z-axis acceleration at the knee joint, IMU sensor X-axis angular velocity at the knee joint, IMU sensor Y-axis angular velocity at the knee joint, IMU sensor Z-axis angular velocity at the knee joint, ankle joint angle, IMU sensor X-axis acceleration at the ankle joint, IMU sensor Y-axis acceleration at the ankle joint, IMU sensor Z-axis acceleration at the ankle joint, IMU sensor X-axis angular velocity at the ankle joint, IMU sensor Y-axis angular velocity at the ankle joint and IMU sensor Z-axis angular velocity at the ankle joint, a total of 15 channels of sensor data;
[0009] 1.1.3 Preprocessing: De-noise the data collected in step 1.1.2, remove the abnormal data with missing items, and add classification labels to the normal data, including the nine daily stable state movement mode labels described in step 1.1.1;
[0010] 1.1.4 Use a fixed 200ms time window to intercept the sensor data after the heel touches down in each gait cycle, and extract two time domain feature values of each dimension of data, including: mean and standard deviation, the formula is:
[0011] Mean:
[0012] Standard Deviation:
[0013] Where: X i is the sampling sample; n is the number of sampling samples in the 200ms time window;
[0014] 1.2 The improved ELM algorithm based on the Logistic regression classifier, referred to as the LR-ELM algorithm, can greatly reduce the number of parameters that need to be saved. It imitates the KNN algorithm structure and uses different deviation vectors for different samples to be tested to achieve real-time human intention recognition and judgment, including the following steps:
[0015] 1.2.1 Input the experimental data of all 8 subjects after feature extraction into the Logistic Regression classifier to obtain the coefficient vector ω LR and intercept bLR , the training method is as follows:
[0016] 1.2.1.1Logistic Regression classifier uses the LogisticRegression model in the sklearn.linear_model library;
[0017] 1.2.1.2 Use the feature values extracted from the subject data to train the Logistic Regression classifier, and save LogisticRegression.coef_ and LogisticRegression.intercept_ as the coefficient vector ω LR and intercept b LR ;
[0018] in: The coefficient vector representing the boundary fitting curve that divides classification 1 and other classifications The transpose of , D is the data dimension, m is the number of categories;
[0019] 1.2.2 Improve the structure of the ELM algorithm and use the number of classifications as the number of hidden layer nodes. The input weight ω and the hidden layer bias b are not completely randomly generated. The composition formula is as follows:
[0020] ω=ω LR +rnd ω
[0021] b=b LR +b pso
[0022] in: b=[b1,…,b m ];ω LR and b LR is the coefficient vector and intercept output by the LR classifier; random number The particles generated by the particle swarm algorithm are 50 iterations and 150 particles in size. The input weights are saved to achieve the optimal accuracy of the ELM classifier. and hidden layer bias m is the number of categories;
[0023] 1.2.3 Train the improved ELM classifier again, where the input weights of the hidden layer nodes use the ω obtained by training in 1.2.2 best , and each sample uses a different hidden layer bias b rnd , b rnd The composition is as follows:
[0024] brnd =b best +rnd b
[0025] Where: b best is the optimal hidden layer bias obtained by training in 1.2.2, random number Random hidden layer bias If a sample point is correctly classified, save the deviation matrix of the point, and take the mean of all deviation matrices in each class as the classification mean deviation matrix B.
[0026]
[0027] in: represents the transpose of the mean deviation vector of category 1, where m is the number of categories;
[0028] 1.2.4 In each class, use the K-Means clustering algorithm to get the cluster center point. Enter an unclassified point in the improved ELM classifier. First, calculate the Euclidean distance between the point and the cluster center of each class. Select the mean deviation vector of the class with the smallest distance value as the deviation used by the point in the improved ELM algorithm:
[0029] 1.2.5 Use the BBO algorithm to optimize the weight of the data and optimize the weight value of each dimension of training data. The fitness function in the BBO algorithm is the number of error samples of the improved ELM classifier. The group of species solutions with the smallest fitness function value in 500 iterations is selected as the weight value of each dimension of the improved ELM classifier;
[0030] 1.2.6 Use the input weight ω obtained in step 1.2.2 best , the classification mean deviation matrix B obtained in step 1.2.3 and the output weight matrix β obtained by generalized inverse calculation, and the classification cluster center matrix K obtained in step 1.2.4 are used to write the prediction function code, transplant it to the STM32 microcontroller, and perform real-time prediction;
[0031] in: D is the data dimension and m is the number of categories.
[0032] The 7 male disabled subjects and 1 female disabled subject described in step 1.1.1 are all left above-knee amputees.
[0033] As described in step 1.1.1, before data collection, each subject needs to wear the prosthesis for ten hours of adaptation training and learn to go up and down the stairs alternately with the healthy limb and the prosthesis.
[0034] The sampling frequencies of the weighing sensor, knee joint angle sensor, IMU sensor at the knee joint, ankle joint angle sensor and IMU sensor at the ankle joint on the knee-ankle linkage prosthesis described in step 1.1.1 are all 100 Hz.
[0035] After feature processing, the collected experimental data of the subjects described in step 1.2 need to be linearly transformed by Min-Max standardization to map the values between [0, 1].
[0036] The classification accuracy of the ELM algorithm based on the improved Logistic regression classifier described in step 1.2 is obtained through ten-fold cross validation. The data set is divided into ten parts, nine of which are used as training data and one as test data in turn. The average accuracy of the ten test results is used as an estimate of the accuracy of the algorithm.
[0037] The beneficial effects of the present invention are:
[0038] The lower limb prosthesis motion recognition method based on LR-ELM of the present invention can greatly improve the accuracy of amputee motion intention recognition; the ELM algorithm is improved by using the LR algorithm and KNN algorithm structure, which can greatly reduce the number of hidden layer nodes; the PSO algorithm and the BBO algorithm are used to respectively search for the optimal solution for the hidden layer deviation and optimize the weight value of each dimension of data, and the accuracy of the improved ELM algorithm is significantly improved, which is better than the original ELM algorithm, LR algorithm and KNN algorithm; the parameters of the improved algorithm are greatly reduced, which can meet the requirements of being transplanted to the STM32 single-chip microcomputer for real-time prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of the lower limb prosthesis motion recognition method based on LR-ELM;
[0040] Figure 2 Schematic diagram of the structure of the improved ELM algorithm. DETAILED DESCRIPTION
[0041] The present invention is further described below in conjunction with the accompanying drawings.
[0042] The implementation process of the lower limb prosthesis motion recognition method based on LR-ELM of the present invention is as follows: Figure 1 As shown, the method comprises the following steps:
[0043] 1.1 Obtaining motion data collected by sensors on the prosthesis when the disabled subjects wear the knee-ankle linkage prosthesis and perform nine daily motion states, including the following steps:
[0044] 1.1.1 Using load cells, knee angle sensors, knee IMU sensors, ankle angle sensors, and ankle IMU sensors placed on knee-ankle linkage prostheses, data were collected from seven male disabled subjects and one female disabled subject during slow horizontal walking, normal horizontal walking, fast horizontal walking, uphill, downhill, sitting, standing, going upstairs, and going downstairs;
[0045] 1.1.2 The sensor data collected by the sensors placed on the knee-ankle linkage prosthesis include: ground reaction force, knee joint angle, IMU sensor X-axis acceleration at the knee joint, IMU sensor Y-axis acceleration at the knee joint, IMU sensor Z-axis acceleration at the knee joint, IMU sensor X-axis angular velocity at the knee joint, IMU sensor Y-axis angular velocity at the knee joint, IMU sensor Z-axis angular velocity at the knee joint, ankle joint angle, IMU sensor X-axis acceleration at the ankle joint, IMU sensor Y-axis acceleration at the ankle joint, IMU sensor Z-axis acceleration at the ankle joint, IMU sensor X-axis angular velocity at the ankle joint, IMU sensor Y-axis angular velocity at the ankle joint and IMU sensor Z-axis angular velocity at the ankle joint, a total of 15 channels of sensor data;
[0046] 1.1.3 Preprocessing: De-noise the data collected in step 1.1.2, remove the abnormal data with missing items, and add classification labels to the normal data, including the nine daily stable state movement mode labels described in step 1.1.1;
[0047] 1.1.4 Use a fixed 200ms time window to intercept the sensor data after the heel touches down in each gait cycle, and extract two time domain feature values of each dimension of data, including: mean and standard deviation, the formula is:
[0048] Mean:
[0049] Standard Deviation:
[0050] Where: X i is the sampling sample; n is the number of sampling samples in the 200ms time window;
[0051] 1.2 The improved ELM algorithm based on the Logistic regression classifier, referred to as the LR-ELM algorithm, can greatly reduce the number of parameters that need to be saved. It imitates the KNN algorithm structure and uses different deviation vectors for different samples to be tested to achieve real-time human intention recognition and judgment, including the following steps:
[0052] 1.2.1 Input the experimental data of the 8 subjects after feature extraction into the Logistic Regression classifier to obtain the coefficient vector ω LR and intercept bLR , the training method is as follows:
[0053] 1.2.1.1 Logistic Regression classifier uses the Logistic Regression model in the sklearn.linear_model library;
[0054] 1.2.1.2 Use the feature values extracted from the subject data to train the Logistic Regression classifier, and save LogisticRegression.coef_ and LogisticRegression.intercept_ as the coefficient vector ω LR and intercept b LR ;
[0055] in: The coefficient vector representing the boundary fitting curve that divides classification 1 and other classifications The transpose of; D is the data dimension; m is the number of categories;
[0056] 1.2.2 Improve the structure of the ELM algorithm and use the number of classifications as the number of hidden layer nodes. The input weight ω and the hidden layer bias b are not completely randomly generated. The composition formula is as follows:
[0057] ω=ω LR +rnd ω
[0058] b=b LR +b pso
[0059] in: b=[b1,…,b m ];ω LR and b LR is the coefficient vector and intercept output by the LR classifier; random number The particles generated by the particle swarm algorithm are 50 iterations and 150 particles in size. The input weights are saved to achieve the optimal accuracy of the ELM classifier. and hidden layer bias m is the number of categories;
[0060] 1.2.3 Train the improved ELM classifier again, where the input weights of the hidden layer nodes use the ω obtained by training in step 1.2.2 best , and each sample uses a different hidden layer bias b rnd , b rnd The composition is as follows:
[0061] brnd =b best +rnd b
[0062] Where: b best is the optimal hidden layer bias obtained by training in step 1.2.2; random number Random hidden layer bias If a sample point is correctly classified, save the deviation matrix of the point, and form the classification mean deviation matrix B with the mean of all deviation matrices in each category;
[0063]
[0064] in: Represents the transpose of the mean deviation vector of category 1; m is the number of categories;
[0065] 1.2.4 In each class, use the K-Means clustering algorithm to get the cluster center point. Enter an unclassified point in the improved ELM classifier. First, calculate the Euclidean distance between the point and the cluster center of each class. Select the mean deviation vector of the class with the smallest distance value as the deviation used by the point in the improved ELM algorithm:
[0066] 1.2.5 Use the BBO algorithm to optimize the weight of the data and optimize the weight value of each dimension of training data. The fitness function in the BBO algorithm is the number of error samples of the improved ELM classifier. The group of species solutions with the smallest fitness function value in 500 iterations is selected as the weight value of each dimension of the improved ELM classifier;
[0067] 1.2.6 Use the input weight ω obtained in step 1.2.2 best , the classification mean deviation matrix B obtained in step 1.2.3 and the output weight matrix β obtained by generalized inverse calculation, and the classification cluster center matrix K obtained in step 1.2.4 are used to write the prediction function code, transplant it to the STM32 microcontroller, and perform real-time prediction;
[0068] in: D is the data dimension and m is the number of categories.
[0069] The 7 male disabled subjects and 1 female disabled subject described in step 1.1.1 are all left above-knee amputees.
[0070] As described in step 1.1.1, before data collection, each subject needs to wear the prosthesis for ten hours of adaptation training and learn to go up and down the stairs alternately with the healthy limb and the prosthesis.
[0071] The sampling frequencies of the weighing sensor, knee joint angle sensor, IMU sensor at the knee joint, ankle joint angle sensor and IMU sensor at the ankle joint on the knee-ankle linkage prosthesis described in step 1.1.1 are all 100 Hz.
[0072] After feature processing, the collected experimental data of the subjects described in step 1.2 need to be linearly transformed by Min-Max standardization to map the values between [0, 1].
[0073] The classification accuracy of the ELM algorithm based on the improved Logistic regression classifier described in step 1.2 is obtained through ten-fold cross validation. The data set is divided into ten parts, nine of which are used as training data and one as test data in turn. The average accuracy of the ten test results is used as an estimate of the accuracy of the algorithm.
Claims
1. A method for lower limb prosthesis motion recognition based on LR-ELM, characterized in that it comprises the following steps: 1.1 Obtaining motion data collected by sensors on the prosthesis when the disabled subjects wear the knee-ankle linkage prosthesis and perform nine daily motion states, including the following steps: 1.1.1 Using load cells, knee angle sensors, knee IMU sensors, ankle angle sensors, and ankle IMU sensors placed on knee-ankle linkage prostheses, data were collected from seven male disabled subjects and one female disabled subject during slow horizontal walking, normal horizontal walking, fast horizontal walking, uphill, downhill, sitting, standing, going upstairs, and going downstairs; 1.1.2 The sensor data collected by the sensors placed on the knee-ankle linkage prosthesis include: ground reaction force, knee joint angle, IMU sensor X-axis acceleration at the knee joint, IMU sensor Y-axis acceleration at the knee joint, IMU sensor Z-axis acceleration at the knee joint, IMU sensor X-axis angular velocity at the knee joint, IMU sensor Y-axis angular velocity at the knee joint, IMU sensor Z-axis angular velocity at the knee joint, ankle joint angle, IMU sensor X-axis acceleration at the ankle joint, IMU sensor Y-axis acceleration at the ankle joint, IMU sensor Z-axis acceleration at the ankle joint, IMU sensor X-axis angular velocity at the ankle joint, IMU sensor Y-axis angular velocity at the ankle joint and IMU sensor Z-axis angular velocity at the ankle joint, a total of 15 channels of sensor data; 1.1.3 Preprocessing: De-noise the data collected in step 1.1.2, remove the abnormal data with missing items, and add classification labels to the normal data, including the labels of nine daily stable state movement patterns; 1.1.4 Use a fixed 200ms time window to intercept the sensor data after the heel touches down in each gait cycle, and extract two time domain feature values of each dimension of data, including: mean and standard deviation, the formula is: Mean: Standard Deviation: Where: X i is the sampling sample; n is the number of sampling samples in the 200ms time window; 1.2 The improved ELM algorithm based on the Logistic regression classifier, referred to as the LR-ELM algorithm, can greatly reduce the number of parameters that need to be saved. It imitates the KNN algorithm structure and uses different deviation vectors for different samples to be tested to achieve real-time human intention recognition and judgment, including the following steps: 1.2.1 Input the experimental data of the 8 subjects after feature extraction into the Logistic Regression classifier to obtain the coefficient vector ω LRand intercept b LR , the training method is as follows: 1.2.1.1Logistic Regression classifier uses the LogisticRegression model in the sklearn.linear_model library; 1.2.1.2 Use the feature values extracted from the subject data to train the Logistic Regression classifier, and save LogisticRegression.coef_ and LogisticRegression.intercept_ as the coefficient vector ω LR and intercept b LR ; in: The coefficient vector representing the boundary fitting curve that divides classification 1 and other classifications The transpose of; D is the data dimension; m is the number of categories; 1.2.2 Improve the structure of the ELM algorithm and use the number of classifications as the number of hidden layer nodes. The input weight ω and the hidden layer bias b are not completely randomly generated. The composition formula is as follows: ω=ω LR +rnd ω b=b LR +b pso in: b=[b1,…,b m ];ω LR and b LR is the coefficient vector and intercept output by the LR classifier; random number rnd ω ∈[-0.2,0.2]; The particles generated by the particle swarm algorithm are 50 iterations and 150 particles in size. The input weights are saved to achieve the optimal accuracy of the ELM classifier. and hidden layer bias m is the number of categories; 1.2.3 Train the improved ELM classifier again, where the input weights of the hidden layer nodes use the ω obtained by training in step 1.2.2 best , and each sample uses a different hidden layer bias b rnd , b rnd The composition is as follows: b rnd =b best +rnd b Where: b bestis the optimal hidden layer bias obtained by training in step 1.2.2; random number Random hidden layer bias If a sample point is correctly classified, save the deviation matrix of the point, and form the classification mean deviation matrix B with the mean of all deviation matrices in each class; in: represents the transpose of the mean deviation vector of category 1; m is the number of categories; 1.2.4 In each class, use the K-Means clustering algorithm to get the cluster center point. Enter an unclassified point in the improved ELM classifier. First, calculate the Euclidean distance between the point and the cluster center of each class. Select the mean deviation vector of the class with the smallest distance value as the deviation used by the point in the improved ELM algorithm: 1.2.5 Use the BBO algorithm to optimize the weight of the data and optimize the weight value of each dimension of training data. The fitness function in the BBO algorithm is the number of error samples of the improved ELM classifier. The group of species solutions with the smallest fitness function value in 500 iterations is selected as the weight value of each dimension of the improved ELM classifier; 1.2.6 Use the input weight ω obtained in step 1.2.2 best , the classification mean deviation matrix B obtained in step 1.2.3 and the output weight matrix β obtained by generalized inverse calculation, and the classification cluster center matrix K obtained in step 1.2.4 are used to write the prediction function code, transplant it to the STM32 microcontroller, and perform real-time prediction; in: D is the data dimension and m is the number of categories.
2. The lower limb prosthesis motion recognition method based on LR-ELM according to claim 1, characterized in that: The 7 male disabled subjects and 1 female disabled subject described in step 1.1.1 were all left above-knee amputees.
3. The lower limb prosthesis motion recognition method based on LR-ELM according to claim 1, characterized in that: Before data collection, the seven male disabled subjects and one female disabled subject described in step 1.1.1 were required to wear prostheses for ten hours of adaptive training and learn to go up and down the stairs alternately with their healthy limbs and prostheses.
4. The lower limb prosthesis motion recognition method based on LR-ELM according to claim 1, characterized in that: The sampling frequencies of the weighing sensor, knee joint angle sensor, IMU sensor at the knee joint, ankle joint angle sensor and IMU sensor at the ankle joint on the knee-ankle linkage prosthesis described in step 1.1.1 are all 100 Hz.
5. The lower limb prosthesis motion recognition method based on LR-ELM according to claim 1, characterized in that: After feature processing, the 15-channel sensor data collected in step 1.2 needs to be linearly transformed by Min-Max normalization to map the values between [0, 1].
6. The lower limb prosthesis motion recognition method based on LR-ELM according to claim 1, characterized in that: The classification accuracy of the ELM algorithm based on the improved Logistic regression classifier described in step 1.2 is obtained through ten-fold cross validation. The data set is divided into ten parts, nine of which are used as training data and one as test data in turn. The average accuracy of the ten test results is used as an estimate of the accuracy of the algorithm.
