A method for improving the recognition accuracy of myoelectric signals

By constructing a hybrid model of linear classifier and kNN classifier, combining linear projection and kd tree search algorithm, the real-time and accuracy problems of the electromyography signal action recognition system are solved, and fast parameter learning and efficient recognition are achieved.

CN115687970BActive Publication Date: 2025-07-25NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211242514.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-07-25
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

In the prior art, action recognition systems based on surface electromyography signals have problems such as frequent retraining of classifier performance declines over time, recognition accuracy needs to be improved, and real-time insufficient, especially deep learning network parameters learning time, and traditional machine learning algorithms have insufficient accuracy.

Method used

A hybrid model containing linear classifier and kNN classifier is constructed, and the acceleration parameter estimation is accelerated through linear projection and Cholesky decomposition is accelerated. The search efficiency is improved by combining the kd tree, and the linear classifier is used for fast pre-decision and the kNN classifier is used for secondary detection, which improves recognition accuracy and real-timeness.

Benefits of technology

The classifier fast parameter learning is realized, the accuracy and real-time nature of electromyography signal recognition is improved, the reliability of the action recognition system is enhanced, and the model preparation and recognition time is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687970B_ABST
    Figure CN115687970B_ABST
Patent Text Reader

Abstract

The present invention provides a method for improving the recognition accuracy of myoelectric signals, belonging to the field of surface myoelectric signal recognition, including classifier model preparation and test sample recognition. In the preparation stage, a classification model is constructed and parameter estimation is performed on the classification model. The classification model includes a linear classifier and a kNN classifier; the model parameters of the classifier are estimated using the collected training samples. In the recognition stage, first, a linear classifier with high recognition efficiency is used for pre-decision. According to the pre-decision result, the decision result is directly given for test samples with high reliability, and for test samples with low reliability, the kNN classifier is used for re-decision. The present invention combines the advantages of the rapid decision-making of the linear classifier and the high accuracy of the kNN classifier. At the same time, the branch and bound search algorithm kd-tree is used to improve the search efficiency of the kNN classifier, so that the action recognition system can improve the recognition rate and enhance the reliability without significantly increasing the time required for classifier model preparation and test sample recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention patent belongs to the field of surface electromyogram signal recognition, and specifically relates to a method for improving the recognition accuracy of electromyogram signals. Background Art

[0002] Surface electromyogram signals are closely related to the generation of movements. Therefore, surface electromyogram signals can be used for movement recognition. Currently, there are already a large number of instances of using surface electromyogram signals for movement recognition, and relatively good recognition results have been achieved. However, there are still some problems in movement recognition based on surface electromyogram signals: Firstly, the non-stationary characteristics of surface electromyogram signals cause the performance of the trained classifier to decline over time. In order to obtain better recognition results, the classifier needs to be retrained from time to time. Secondly, although the current recognition accuracy is already relatively high, there is still room for improvement. Thirdly, the application characteristics of movement recognition require good real-time performance. Considering the above three points, it is required that the movement recognition system has the characteristics of fast classifier parameter learning ability, excellent recognition performance, and real-time recognition. Currently, although deep learning networks such as convolutional neural networks and recurrent neural networks can achieve high recognition accuracy, they require a long time for parameter learning, which is not conducive to practical applications. Although traditional machine learning algorithms require relatively less time for classifier parameter learning, there is still room for improvement in terms of accuracy. Therefore, designing a classifier that can meet the above three requirements simultaneously is of great significance for the practical application of electromyogram movement recognition systems. Summary of the Invention

[0003] The purpose of the present invention is: aiming at the problems in the prior art, a method for improving the recognition accuracy of electromyogram signals, and this algorithm can simultaneously meet the characteristics of fast classifier parameter learning ability, excellent recognition performance, and real-time recognition.

[0004] Technical Content: A method for improving the recognition accuracy of electromyogram signals, comprising the following steps:

[0005] Step 1. Preparation of the classifier model:

[0006] Construct a classification model and perform parameter estimation on the classification model. The classification model includes a linear classifier and a kNN classifier; assume the number of action categories is C, and the training sample set is denoted as where 1 ≤ c ≤ C; X c is the training sample of class ω c with a size of N c × d, N c is the sample size of X c and d is the dimension; perform parameter estimation on the linear classifier and the kNN classifier, specifically:

[0007] 1) For the linear classifier:

[0008] Construct C×(C - 1) / 2 two - class classifiers. For any one of the two - class classifiers, assume that its training samples consist of samples X i of class ω i and samples X j of class ω j , where 1 ≤ i < C, i < j ≤ C, the data points of X i and X j are N i and N j respectively;

[0009] First, calculate the mean vectors μ i of class ω j and μ i of class ω j ; Second, calculate the between - class scatter matrix S i and the within - class scatter matrix S j based on μ b and μ w . Calculate the inverse of the within - class scatter matrix S w and calculate the eigenvector W corresponding to the largest eigenvalue; Then, project X and X i onto W respectively to obtain Y j and Y i , and calculate the means m j of Y i and m j of Y i and m j ;

[0010] 2) For the kNN classifier;

[0011] Use the Cholesky decomposition method to decompose the covariance matrix Σ of the training sample set to obtain the upper - triangular matrix R; Use R to transform the training samples, and use the transformed training samples as the training sample set of the kNN model to construct a kd - tree;

[0012] Step Two: Test sample recognition:

[0013] S1. Identify the test samples using a linear classifier;

[0014] S2. For the test samples that the linear classifier cannot make a decision on, pass them as inputs to the kNN classifier for decision - making.

[0015] Furthermore, the parameter estimation method of the linear classifier is as follows:

[0016] First, calculate the means of class ω i and class ω jThe mean vector μ i and μ j , the calculation formula is as follows:

[0017]

[0018]

[0019] Where, X i (n) and X j (n) are the nth data points of X i and X j respectively;

[0020] Secondly, calculate the between-class scatter matrix S b and the within-class scatter matrix S w , the calculation formula is as follows:

[0021] S b =(μ i -μ j )(μ i -μ j ) T (3)

[0022] S w =(X i -μ i )(X i -μ i ) T +(X j -μ j )(X j -μ j ) T (4)

[0023] Calculate the inverse of the within-class scatter matrix S w and calculate the eigenvector W corresponding to the largest eigenvalue; Then, project X

[0024] and X i and X j respectively using W to obtain Y i and Y j , the calculation formulas of Y i and Y j are as follows:

[0025] Y i =X i *W (5)

[0026] Y j =X j *W (6)

[0027] Calculate Y i and Y j to obtain the mean value m i and m j .

[0028] Furthermore, the parameter estimation method of the kNN classifier is as follows:

[0029] First, estimate the sample mean μ and covariance matrix Σ for all training samples using the following method:

[0030]

[0031]

[0032] Among them,

[0033] Second, use the Cholesky decomposition method to decompose the covariance matrix Σ into an upper triangular matrix R that satisfies the following conditions:

[0034] Σ = R T R (10)

[0035] Then, use R to transform the training samples using the following method:

[0036] Z = X * R T (11)

[0037] Take the transformed Z = [Z (1) Z (2) ...Z (d) , where d is the dimension, as the training sample set of the kNN model, and construct a kd-tree.

[0038] Furthermore, the method for constructing a kd-tree is as follows:

[0039] (a) Construct the root node; select Z (1) as the initial splitting coordinate axis;

[0040] (b) Search the current data according to the splitting coordinate axis, and use the corresponding median data as the current node; on the current splitting coordinate axis, all data points smaller than the median are divided into the left branch, and data points larger than the median are divided into the right branch;

[0041] (c) Generate left and right child nodes with a depth r of 1 from the root node;

[0042] (d) For a node with a depth of r, select Z (j) as the splitting coordinate axis, that is, the j-th dimension of the sample Z is used as the splitting coordinate axis, j = r % d + 1; for all instances in the region of this node, Z (j)Generate the left and right nodes with a depth of r + 1 according to the method described in (b);

[0043] (e) Repeat (d) until there are no undivided data points and then stop.

[0044] Furthermore, the specific operation method of step S1 is as follows:

[0045] 1) Assume that the current test sample is X test , first perform a linear transformation using the eigenvector W, then the transformed test sample X LDA is expressed as

[0046] X LDA = X test W (12)

[0047] 2) For each data point in X LDA , if it is closer to m i , it belongs to the category ω i , otherwise it belongs to the category ω j ;

[0048] After voting and decision-making by C×(C - 1) / 2 two-class classifiers, the probabilities L test that the current test sample X c belongs to each category (c = 1, 2,..., C) can be obtained, and the category with the highest probability is calculated The method is as follows

[0049]

[0050] 3) For a given threshold δ l , the decision I(X) based on the linear classifier is determined in the following way:

[0051]

[0052] where represents that a decision cannot be made currently and further judgment is needed; otherwise, the category attribution of the current test sample is

[0053] Furthermore, the specific operation method of step S2 is as follows:

[0054] 1) Transform the test sample using the upper triangular matrix R calculated by formula (10), and the method is as follows:

[0055] X kNN = X test *R T (15)

[0056] 2) Use the kd-tree to search for the one in Z that is closest to XkNN The class membership of the k samples closest to each data point;

[0057] Determine the class to which each data point belongs according to the majority voting method, and calculate X based on this kNN The probabilities K1,..., K of belonging to each class C , and obtain the class with the highest probability The method is as follows:

[0058]

[0059] 3) For the threshold δ of the given KNN classifier k , if or then the current test sample belongs to the class Otherwise, no decision is made on the class of the current test sample.

[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] This algorithm includes two aspects: classifier model construction and test sample recognition. Its advantages are as follows:

[0062] 1) Aiming at the problem that the classifier of the electromyogram action recognition system needs to be retrained frequently, the designed classifier can quickly complete the parameter estimation of the classifier, which is convenient for real-time application;

[0063] 2) Utilize the advantage of good real-time performance of the linear classifier to quickly make a preliminary decision on the test samples with good features;

[0064] 3) Utilize the advantage of high recognition accuracy of the kNN classifier to perform secondary detection on the test samples with controversial features, and improve the detection accuracy. In particular, aiming at the problem of low running efficiency caused by linear search in the conventional kNN algorithm and the problem that the fast search algorithm does not support Mahalanobis distance, the test samples are transformed by the linear projection algorithm, and then the branch and bound search algorithm kd-tree is used for nearest neighbor search to improve the recognition result and the search efficiency at the same time.

[0065] 4) Refuse to make a decision on the test samples that are still controversial after secondary detection, and improve the reliability of the action recognition system. Description of the Drawings

[0066] Figure 1 Flowchart of the classification model construction of the present invention;

[0067] Figure 2 Is the flowchart of the action recognition algorithm of the invention. Detailed Embodiment

[0068] The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0069] A method for improving the recognition accuracy of myoelectric signals includes the following steps:

[0070] Step 1: Preparation of the classifier model:

[0071] As Figure 1 shown, a classification model is constructed and parameter estimation is performed on the classification model. The classification model includes a linear classifier and a kNN classifier; assuming the number of action categories is C, the training sample set is represented as where 1 ≤ c ≤ C; x c is the training sample of class ω c , with a size of N c ×d, N c is the sample size of X c , and d is the dimension;

[0072] In the preparation stage of the classification model, parameter estimation is mainly carried out, specifically:

[0073] 1) For the linear classifier, C×(C - 1) / 2 two-class classifiers need to be constructed; for any two-class classifier, assume that its training samples are composed of samples X i of class ω i and samples X j of class ω j (1 ≤ i < C, i < j ≤ C), and the data points of X i and X j are N i and N j respectively;

[0074] First, calculate the mean vectors μ i and μ j of class ω i and class ω j , and the formulas are as follows:

[0075]

[0076]

[0077] where X i (n) and X j (n) are the nth data points of X i and X j respectively;

[0078] Secondly, calculate the between-class scatter matrix S b and the within-class scatter matrix S w , and the formulas are as follows::

[0079] S b =(μ i - μ j )(μ i - μ j ) T (3)

[0080] S w =(X i - μ i )(X i - μ i ) T +(X j - μ j )(X j - μ j ) T (4)

[0081] Then, calculate the inverse of the within-class scatter matrix S w , and solve for the eigenvalues and eigenvectors of . Take the eigenvector W corresponding to the largest eigenvalue; project X and X i and X j respectively to obtain Y i and Y j , and calculate the means m i and m j of Y i and m j ;

[0082] The calculation formulas for Y i and Y j are as follows:

[0083] Y i = X i * W (5)

[0084] Y j = X j * W (6)

[0085] 2) For the kNN classifier;

[0086] First, estimate the sample mean μ and covariance matrix Σ for all training samples as follows:

[0087]

[0088]

[0089] Among them,

[0090]

[0091] Secondly, use the Cholesky decomposition method to decompose the covariance matrix Σ into an upper triangular matrix R that satisfies the following conditions:

[0092] Σ = R T R (10)

[0093] Then, use R to transform the training samples as follows:

[0094] Z = X * R T (11)

[0095] Take the transformed Z = [Z (1) Z (2) ...Z (d) , where d is the dimension, as the training sample set of the kNN model, and construct a kd-tree as follows:

[0096] (f) Construct the root node; select Z (1) as the initial splitting coordinate axis.

[0097] (g) Search the current data according to the splitting coordinate axis, and use the corresponding median data as the current node. On the current splitting coordinate axis, all data points smaller than the median are divided into the left branch, and data points larger than the median are divided into the right branch.

[0098] (h) Generate left and right child nodes with a depth r of 1 from the root node.

[0099] (i) For a node with a depth of r, select Z (j) , that is, the j-th dimension of the sample Z as the splitting coordinate axis, where j = r % d + 1; for all instances of Z in the region of this node (j) generate left and right nodes with a depth of r + 1 according to the method described in (b);

[0100] (j) Repeat (d) until there are no unsplit data points.

[0101] Step 2: Test sample recognition: The test sample recognition process is as Figure 2 shown;

[0102] S1. Linear classifier decision:

[0103] Assume that the current test sample is X test , for any two-class classifier, assume that it is composed of samples of class ω i and samples of class ω j , and the means of class ω i and class ω j after projection by the feature vector W are m i and m j. First, perform a linear transformation using the eigenvector W, and then the transformed test sample X LDA is expressed as:

[0104] X LDA = X test W (12)

[0105] For each data point in X LDA , if it is closer to m i , it belongs to the class ω i , otherwise it belongs to the class ω j . After voting and making decisions by C×(C - 1) / 2 two-class classifiers, the probabilities L test that the current test sample X c belongs to each class (c = 1, 2,..., C) can be obtained, and the class with the highest probability is calculated The method is as follows:

[0106]

[0107] For a given threshold δ l , the decision I(X) of the linear classifier is determined as follows:

[0108]

[0109] where represents that no decision can be made currently and further judgment is needed; otherwise, the class attribution of the current test sample is

[0110] S2. Decision of the kNN classifier:

[0111] For the test samples for which no decision can be made currently, they are passed as input to the kNN classifier;

[0112] First, the test samples are transformed using the upper triangular matrix R calculated by formula (10), and the method is as follows:

[0113] X kNN = X test * R T (15)

[0114] Then, use the kd-tree to search for the class attributions of the k samples closest to each data point in X kNN in Z;

[0115] Determine the class to which each data point belongs according to the majority voting method, and calculate the probabilities K1,..., K kNN that X C belongs to each class, and obtain the class with the highest probability The method is as follows:

[0116]

[0117] For the threshold δ of a given KNN classifier k , if or then the current test sample belongs to the class Otherwise, no decision is made on the class of the current test sample.

[0118] The present invention provides a method for improving the recognition accuracy of myoelectric signals, including two parts: classifier model preparation and test sample recognition. In the classifier model preparation stage, the model parameters of the classifier are estimated using the collected training samples. In the recognition stage, first, a linear classifier with high recognition efficiency is used for pre-decision. According to the pre-decision result, the decision result is directly given for test samples with high reliability, and the kNN classifier is used for re-decision for test samples with low reliability. According to the given decision rule, if it is determined that the current decision is reliable, the decision result is given; otherwise, no decision is made. The present invention combines the advantages of the fast decision-making of the linear classifier and the high accuracy of the kNN classifier. At the same time, the branch and bound search algorithm kd-tree is used to improve the search efficiency of the kNN classifier, so that the action recognition system can improve the recognition rate and enhance the reliability without significantly increasing the time required for classifier model preparation and test sample recognition, and has strong applicability and is worthy of promotion.

Claims

1. A method for improving the recognition accuracy of myoelectric signals, characterized in that, It includes the following steps: Step 1. Preparation of the classifier model: Construct a classification model and perform parameter estimation on the classification model. The classification model includes a linear classifier and a kNN classifier. Assume the number of action categories is C, and the training sample set is represented as where 1 ≤ c ≤ C; X c is the training sample of class ω c with a size of N c × d, where N c is the sample size of X c and d is the dimension. Perform parameter estimation on the linear classifier and the kNN classifier, specifically as follows: 1) For the linear classifier: Construct C×(C - 1) / 2 two-class classifiers. For any one of the two-class classifiers, assume that its training samples consist of samples X i of class ω i and samples X j of class ω j , where 1 ≤ i < C, i < j ≤ C, and the data points of X i and X j are N i and N j respectively; First, calculate the mean vector μ of class ω i and class ω j ; Second, calculate the between-class scatter matrix S i and μ j ; Then, calculate the within-class scatter matrix S i and μ j ; Calculate the inverse of the within-class scatter matrix S b and the within-class scatter matrix S w , and calculate the eigenvector W corresponding to the largest eigenvalue of w the inverse of S ; ​ Then, use W to project X i and X j respectively to obtain Y i and Y j , and calculate the means m i of Y j and m i and m j ; 2) For the kNN classifier; Decompose the covariance matrix Σ of the training sample set using the Cholesky decomposition method to obtain an upper triangular matrix R; use R to transform the training samples, and use the transformed training samples as the training sample set of the kNN model to construct a kd-tree; Step 2. Identification of test samples: S1. Identify the test samples using the linear classifier; S2. For the test samples that the linear classifier cannot make a decision on, pass them as inputs to the kNN classifier for decision-making.

2. The method for improving the recognition accuracy of myoelectric signals according to claim 1, wherein In the above Step 1, the parameter estimation method of the linear classifier is as follows: First, calculate the class ω i and the class ω j of the mean vector μ i and μ j , and the calculation formula is as follows: Among them, X i (n) and X j (n) are the nth data points of X i and X j respectively; Secondly, calculate the between-class scatter matrix $S$ b and the within-class scatter matrix $S$ w , and the calculation formula is as follows: S b = (μ i - μ j )(μ i - μ j ) T (3) S w = (X i - μ i )(X i - μ i ) T + (X j - μ j )(X j - μ j ) T (4) Calculate the inverse of the within-class scatter matrix S w and calculate the eigenvector W corresponding to the largest eigenvalue; ​ Then, use W to project X i and X j respectively to obtain Y i and Y j , and the calculation formulas for Y i and Y j are as follows: Y i = X i * W(5) Y j = X j * W(6) Calculate Y i and Y j to obtain the mean value m i and m j .

3. The method for improving the recognition accuracy of myoelectric signals according to claim 2, wherein In the above Step 1, the parameter estimation method of the kNN classifier is as follows: First, for all training samples estimate the sample mean μ and covariance matrix Σ as follows: Wherein, Secondly, use the Cholesky decomposition method to decompose the covariance matrix Σ into an upper triangular matrix R that satisfies the following conditions: Σ = R T R (10) Then, use R to transform the training samples, and the method is as follows: Z = X * R T (11) Convert the transformed Z = [Z (1) Z (2) ...Z (d) , where d is the dimension, as the training sample set of the kNN model, and construct a kd-tree.

4. The method for improving the recognition accuracy of myoelectric signals according to claim 3, characterized in that, The method for constructing the kd tree is as follows: (a) Construct the root node; select Z (1) as the initial splitting axis; (b) Search for the current data according to the splitting coordinate axis, and use the corresponding median data as the current node; on the current splitting coordinate axis, all data points smaller than the median are divided into the left branch, and data points larger than the median are divided into the right branch; (c) Generate left and right child nodes with a depth r of 1 from the root node; (d) For a node with depth r, select Z (j) as the splitting coordinate axis, that is, the j-th dimension of the sample Z is used as the splitting coordinate axis, where j = r % d + 1; for all instances in the region of this node (j) generate the left and right nodes with depth r + 1 according to the method described in (b); (e) Repeat (d) until there are no unsplit data points and then stop.

5. The method for improving the recognition accuracy of myoelectric signals according to claim 3, wherein The specific operation method of the above Step S1 is as follows: 1) Assume that the current test sample is X test , first perform a linear transformation using the eigenvector W, then the transformed test sample X LDA is expressed as X LDA = X test W(12) 2) For each data point in X LDA if it is closer to m i then it belongs to class ω i otherwise it belongs to class ω j ; After voting and making decisions by C×(C - 1) / 2 two - class classifiers, the current test sample X can be obtained test The probabilities L of belonging to each category c (c = 1, 2,..., C), and calculate the category with the highest probability The method is as follows 3) For a given threshold δ l , the decision I(X) based on the linear classifier is determined as follows: Among them, represents that a decision cannot be made at present and further judgment is required; otherwise, the class attribution of the current test sample is 6. The method for improving the recognition accuracy of myoelectric signals according to claim 5, wherein The specific operation method of the above Step S2 is as follows: 1) Use the upper triangular matrix R calculated by formula (10) to transform the test samples, and the method is as follows: X kNN = X test * R T (15) 2) Use a kd - tree to search for the class memberships of the k samples in Z that are closest to each data point in X kNN ; Determine the category to which each data point belongs according to the majority voting method, and calculate X based on this kNN The probabilities K1,..., K belonging to each category C , and obtain the category with the highest probability The method is as follows: 3) For the threshold δ of a given KNN classifier k , if or then the current test sample belongs to the class Otherwise, no decision is made on classifying the current test sample.

Citation Information

Patent Citations

  • Virtual reality rehabilitation training method and system based on surface myoelectricity and depth images

    CN110298286A

  • Motion recognition method

    CN113869228A