A method for estimating knee joint angle based on surface electromyography signals
By using the MK-LSSVM model optimized by the ICOOT algorithm in the joint angle estimation method, the surface electromyography signal is fitted using a multi-scale kernel function, and the poor fitting problem caused by low signal-to-noise ratio in the prior art is solved, and a higher precision knee joint angle estimation is achieved.
Patent Information
- Application Number
- CN202211603497.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-12-13
AI Technical Summary
The existing joint angle estimation method based on surface electromyography signals has poor fitting ability due to defects such as low signal-to-noise ratio and weak amplitude, and cannot effectively predict joint angle.
Using the MK-LSSVM model optimized based on the ICOOT algorithm, fitting the surface electromyography signal through a multi-scale kernel function solves the problem that the LSSVM algorithm cannot break out of the local optimality and improves the fitting accuracy.
Through the optimized MK-LSSVM model, the surface electromyography signal can be fit more accurately, the estimation accuracy of knee joint angle is improved, and the flexibility of human-computer interaction is improved.
Smart Images

Figure CN115778372B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of human active movement intention recognition, and particularly relates to a knee joint angle estimation method based on surface electromyography signals. Background Technique
[0002] With the development of human-computer interaction and robot technology, exoskeleton robots are a research hotspot in the field of robotics. And the active movement intention recognition based on surface electromyography signals is an important development line for exoskeleton robots. Compared with the traditional method of estimating joint angles based on force, it solves the obvious time lag phenomenon caused by the acquisition of human movement and mechanical information, which is not conducive to the realization of the compliance of human-computer interaction. Because surface electromyography signals can well balance the relationship between the initial joint angle and signal interpretability and have the characteristic of rapid response, the current research mainly has two methods to realize joint angle estimation based on surface electromyography signals: (1) Establish a joint dynamics model with surface electromyography signals as input by combining muscle models to calculate motion parameters. (2) Directly establish a regression model that correlates surface electromyography signals and joint angle estimation. However, due to defects such as low frequency, weak amplitude, and low signal-to-noise ratio of surface electromyography signals, their application will show poor fitting. Therefore, the present invention proposes a knee joint angle estimation method based on surface electromyography signals to predict joint angles using surface electromyography signals. Summary of the Invention
[0003] In order to solve the deficiencies of the prior art, a knee joint angle estimation method based on surface electromyography signals is provided. Using surface electromyography signals and an MK-LSSVM model optimized based on the ICOOT algorithm, the problem that the LSSVM algorithm cannot jump out of the local optimum is solved, and the surface electromyography signals can be better fitted through multi-scale kernel functions.
[0004] In a first aspect, the present invention provides a knee joint angle estimation method based on surface electromyography signals for estimating knee joint angles based on the collected surface electromyography signals of the lower limbs, including the following steps:
[0005] S1: Connect the surface electromyography acquisition device to the muscle groups of the user's lower limbs, and at the same time bind an angle sensor to the knee joint.
[0006] S2: The surface electromyography acquisition device and the angle sensor respectively collect surface electromyography signals and knee angle data, and then preprocess the surface electromyography signals and knee angle data;
[0007] S3: Slice and divide the preprocessed surface electromyography signal data to obtain m surface electromyography signal segments; then sequentially extract features from the above surface electromyography signal segments;
[0008] At the same time, the average joint angle is adopted for the knee angle output corresponding to each surface electromyogram signal segment;
[0009] S4: Construct a data set from the eigenvalue of each surface electromyogram signal segment after the processing in step S3 and the corresponding knee angle output u i is the eigenvalue of the i-th surface electromyogram signal segment; the data set is divided, with a part as the training set and the other part as the validation set.
[0010] S5: Construct an ICOOT-MK-LSSVM model, and train and validate it using the training set and the validation set;
[0011] 5-1: Create an MK-LSSVM model;
[0012] 5-2: Optimize the parameter p in the above MK-LSSVM model through an improved COOT optimization algorithm to obtain an ICOOT-MS-LSSVM model;
[0013] S6: Use the ICOOT-MS-LSSVM model trained and validated in S5 to predict the collected surface electromyogram signal to obtain the estimated knee joint angle y.
[0014] In a second aspect, the present invention provides a knee joint angle estimation system, including:
[0015] A surface electromyogram acquisition device for acquiring surface electromyogram signals;
[0016] A data preprocessing module for preprocessing the surface electromyogram signals and obtaining the eigenvalues of each surface electromyogram signal segment;
[0017] A knee joint angle calculation module for predicting the knee joint angle y using the ICOOT-MS-LSSVM model trained and validated.
[0018] In a third aspect, the present invention provides a lower limb movement intention control device, which adopts the estimated knee joint angle y output by the above system or the above method and converts it into an instruction, and transmits it to the lower limb exoskeleton robot.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed in a computer, the computer is made to execute the method.
[0020] In a fifth aspect, the present invention provides a computing device, including a memory and a processor. An executable code is stored in the memory, and when the processor executes the executable code, the method is implemented.
[0021] The beneficial effects of the present invention are:
[0022] The present invention uses an MK-LSSVM model optimized based on the ICOOT algorithm, which solves the problem that the LSSVM algorithm cannot jump out of the local optimum, and can better fit the surface electromyogram signals through multi-scale kernel functions. Description of the Drawings
[0023] Figure 1 is the flowchart of data preprocessing;
[0024] Figure 2 is the model training process. Detailed Implementation Manner
[0025] To make the technical means, creative features, achieved purposes and effects of the present invention easy to understand, the present invention will be further described below in conjunction with the specific implementation manners and the drawings in the embodiments of the present invention.
[0026] A method for estimating knee joint angles based on surface electromyogram signals provided by the present invention includes:
[0027] S1: Connect the surface electromyogram acquisition device to the muscle groups of the user's lower limbs, and at the same time bind an angle sensor to the knee joint.
[0028] S2: Preprocess the surface electromyogram signals and angle data, and the process is as shown in Figure (1);
[0029] S3: Slice the electromyogram data into m parts and then perform feature extraction in sequence;
[0030] S4: Obtain a data set after preprocessing u i is the feature value of the i-th slice. Divide the data set, with 80% as the training set and 20% as the validation set;
[0031] S5: Construct the ICOOT-MS-LSSVM algorithm, train the training set, and the process is as shown in Figure (2), and verify the validation set to obtain an optimal model for predicting joint angles;
[0032] S6: Use the ICOOT-MS-LSSVM model trained and verified in S5 to predict the collected surface electromyogram signals to obtain the estimated value y of the knee joint angle;
[0033] In this implementation, first preprocess, slice and extract features from the obtained surface electromyogram signals and angle data to form a data set. After dividing the data set, use the ICOOT-MK-LSSVM algorithm to train to obtain an optimal model. Use the optimal model to predict the joint angle through the surface electromyogram signals, and the specific process is as follows:
[0034] S1: Connect the surface electromyogram signal acquisition device to the muscle groups of the user's lower limbs, and at the same time bind an angle sensor to the knee joint;
[0035] S2: The surface electromyogram signal acquisition device and the angle sensor respectively collect the surface electromyogram signal and the joint angle data, and then preprocess the surface electromyogram signal and the knee angle data; specifically:
[0036] 2-1: Denoise the surface electromyogram signal x(t) based on wavelet transform; select sym8 as the wavelet basis.
[0037] 2-2: Perform time displacement on the collected angle data in the time dimension. Because there is a delay in the angle data acquisition process and the electromyogram has the characteristic of time lead, the displacement time T of the angle data is calculated by the formula (1):
[0038]
[0039] In the above formula, T b is the electromyogram lead time difference, T a is the time delay brought by filtering, τ is the sliding window size, and Δt is the time period corresponding to the sliding window;
[0040] 2-3: Shift the joint angle data to the left by T time to align with the electromyogram, and the formula is as follows:
[0041] h(t) = h(t + T) (23)
[0042] h(t) is the joint angle at time t.
[0043] S3: Slice and divide the preprocessed surface electromyogram signal data to obtain m surface electromyogram signal segments;
[0044] Then, feature extraction is performed on the above surface electromyogram signal segments in turn;
[0045] At the same time, use the average value of the knee joint angle as the angle of this segment for the knee joint angle data corresponding to each surface electromyogram signal segment, and the formula is as follows:
[0046]
[0047] where h(t) is the joint angle at time t; l i represents the knee joint angle output corresponding to the i-th surface electromyogram signal segment;
[0048] The feature extraction uses the root mean square difference, wavelength, and number of zero crossings to form a feature vector u i .
[0049] The calculation formula of the root mean square difference is as follows:
[0050]
[0051] where n is the number of sampling points for each slice; n is taken as 250.
[0052] The calculation formula for the wavelength is as follows:
[0053]
[0054] The calculation formula for the number of zero-crossings is as follows:
[0055]
[0056]
[0057] S4: Output the eigenvalues of each surface electromyogram signal segment processed in step S3 and the corresponding knee angles to construct a data set u i is the eigenvector composed of the eigenvalues of the i-th surface electromyogram signal segment; the data set is divided, with 80% as the training set and 20% as the validation set;
[0058] S5: Construct an ICOOT-MK-LSSVM model and train and validate it using the training set and the validation set;
[0059] 5-1: Create an MK-LSSVM model:
[0060] For the data set The objective function f(u) is decomposed into components f r in d different scale kernel spaces, d = 2, see formula (2);
[0061] f(u) = f l (u) + f 2 (u) (2)
[0062]
[0063]
[0064] where w r is the weight vector, b r is the bias, φ r (u) is the kernel space mapping function, a ri is the Lagrange multiplier, and the superscript T represents the transpose; u i is the eigenvector composed of the eigenvalues of the i-th surface electromyogram signal segment, and u represents any eigenvector, that is
[0065] From formulas (2)-(4), the MK-LSSVM model can be obtained as follows:
[0066]
[0067] where k r is the basic kernel function, and the Gaussian radial kernel function is as follows:
[0068]
[0069] where σ r is the r-th scale value. The kernel functions of different scales can fit different processes of the EMG signal. The large scale can fit the smoothly changing process, and the small scale can fit the violently changing process;
[0070] The loss function of the MS-LSSVM model is shown in Equation (7), and the constraint condition is shown in Equation (8);
[0071]
[0072]
[0073] where f 1 (u i ) is the component of f(u i ), γ j is the loss factor of the j-th component space, e is the error vector, e ij is the allowable error between the actual value and the predicted value of the j-th component of the i-th eigenvector, w is the weight space of the support vector machine, b is the intercept term coefficient, and is obtained by Equation (9);
[0074]
[0075] The formula is transformed by the Lagrange multiplier method as follows:
[0076]
[0077]
[0078] where α and β represent the vectors composed of Lagrange operators in different scale spaces, α = (a 11 , a 21 , …, a m1 ) T , β = (a 12 , a 22 , …, a m2 ) T ,
[0079] Take the partial derivatives of the parameters of L and set them to 0, and solve the linear equations (18) according to the Lagrange function, where E m is (1, 1, …, 1)T , V r (i, j) = K r (u i , u j ), i, j = 1, 2, …, m, r = 1, 2, α = (a 11 , a 21 , …, a m1 ) T , β = (a 12 , a 22 , …, a m2 ) T , solve the system of equations to obtain α, β, and b;
[0080] The regression model is formula (19), where y is the estimated value of the knee joint angle;
[0081]
[0082] 5 - 2: Optimize the parameter p in the above MK - LSSVM model through the improved COOT optimization algorithm to obtain the ICOOT - MK - LSSVM model; where P is the D - dimensional search space; γ 1 , γ 2 represents the loss factor of the loss function in formula (7); specifically:
[0083] ① The upper and lower limits of the particle search space are um = [um 1 , um 2 , …, um D and lm = [lm 1 , lm 2 , …, lm D , there are N particles, each particle represents a solution, p i is the i - th particle, whose position is CP(i) = [CP 1 (i), CP 2 (i), …, CP D (i)], and the velocity is CV(i) = [CV 1 (i), CV 2 (i), …, CV D (i)]. Its individual best solution is pbest i = (pbest i1 , pbest i2 , …, pbest iD ), the global best solution is gbest = (gbest 1 , gbest 2 , …, gbest D ), and the global historical best fitness value at the iteration number t is JG(t);
[0084] ② Initialize the population parameters, including the population size PN, where PN ≤ N, the maximum number of iterations TM, the number of leaders NL, where NL < PN, and the initial position CP of the i-th particle in the j-th dimension j (j) is determined by formula (13); set the iteration termination target value JG a , the iteration number interval TD, and the change threshold JT;
[0085] CP j (i) = r j *(um j - lm j ) + lm j , j = 1, 2, …, D (13)
[0086] where r j ∈ [0, 1], is a random value;
[0087] ③ Randomly select NL individuals from the population as leaders, calculate the fitness of all individuals, and the fitness JP(i) is determined by the optimization function formula (7); find the best individual position pbest i as the population best position gbest;
[0088] ④ Calculate the current velocity of the particle using formula (14); where TT is the current iteration number;
[0089]
[0090] ⑤ The leader index Z and the leader position LP(i) of the i-th particle:
[0091] Z = 1 + (i mod WL) (15)
[0092] LP(i) = CP(Z) (16)
[0093] ⑥ Update the individual position CP(i), select the movement mode according to the random value rand, where rand ∈ [0, 1].
[0094]
[0095] where R1 ∈ [0, 1], R2 ∈ [0, 1], R3 ∈ [-1, 1], if rand > 0.5, then both R1 and R3 are D-dimensional random vectors, otherwise they are random numbers;
[0096] ⑦ Calculate the fitness of the new individual position and update the individual position; if the fitness of the individual after updating the individual position is less than the fitness of its leader, then swap the positions of the individual and the leader, otherwise only update the individual fitness;
[0097] ⑧ Update the position of the leader using formula (18);
[0098]
[0099] ⑨ If the fitness of the leader is less than the best fitness of the population, update the best position of the population gbest and JG(TT), otherwise make no changes; at the same time, update the iteration number to TT = TT + 1;
[0100] ⑩ Repeat steps ④ to ⑨ until one of the following three conditions is met and then stop the iteration:
[0101] (Ⅰ) The iteration number reaches the maximum iteration number;
[0102] (II) The best fitness of the population JG reaches the preset target value;
[0103] (III) The change value of JG within the set iteration number interval is less than the set threshold as shown in formula (19);
[0104] JG(TT) - JG(TT - TD) ≤ JT (19)
[0105] S6: During the movement, use the ICOOT-MS-LSSVM model trained and verified in S5 to predict the collected surface electromyography signals to obtain the estimated knee joint angle y.
Claims
1. A method for estimating knee joint angle based on surface electromyogram signals, characterized in that the method comprises the following steps: S1: Connect the surface electromyogram signal acquisition device to the muscle groups of the user's lower limbs, and at the same time bind an angle sensor to the knee joint; S2: The surface electromyogram signal acquisition device and the angle sensor respectively collect surface electromyogram signals and joint angle data, and then preprocess the surface electromyogram signals and knee angle data; S3: Obtain the characteristic values of each surface electromyogram signal segment and the corresponding knee joint angle 3-1 Slice and divide the preprocessed surface electromyogram signal data to obtain m surface electromyogram signal segments; 3-2 Sequentially extract features from the above-mentioned surface electromyogram signal segments; at the same time, use the average joint angle of the knee angle data corresponding to each surface electromyogram signal segment as the angle of this segment, and the formula is as follows: where h(t) is the knee joint angle at time t; l i represents the knee joint angle output corresponding to the i-th surface electromyogram signal segment; S4: Output the eigenvalues of each surface electromyogram signal segment processed in step S3 and the corresponding knee joint angles to construct a data set u i is the eigenvector composed of the eigenvalues of the i-th surface electromyogram signal segment; divide the data set, with a part as the training set and the other part as the validation set; S5: Construct an ICOOT-MK-LSSVM model, and train and validate it using the training set and the validation set; 5-1: Create an MK-LSSVM model: For the dataset The objective function f(u) is decomposed into components f in d different scale kernel spaces r The sum, d = 2, see formula (2); f(u) = f 1 (u) + f 2 (u) (2) r = 1 or 2(3) where w r is the weight vector, b r is the bias, φ r (u) is the kernel space mapping function, a ri is the Lagrange multiplier, and the superscript T represents the transpose; u i is the eigenvector composed of the eigenvalues of the i-th surface electromyogram signal segment, and u represents any eigenvector, that is From formulas (2)-(4), the MK-LSSVM model can be obtained as follows: where k r is the basic kernel function, and the Gaussian radial basis kernel function is as follows: where σ r is the r-th scale value, and the kernel functions of different scales fit different processes of the surface electromyogram signal. The large scale fits the smooth change process, and the small scale fits the drastic change process; The loss function of the MK-LSSVM model is shown in formula (7), and the constraint conditions are shown in formula (8); where f 1 (u i ) is a component of f(u i ), γ j is the loss factor of the j-th component space, e is the error vector, e ij is the allowable error between the actual value and the predicted value of the j-th component of the i-th eigenvector, w is the support vector machine weight space, b is the intercept term coefficient, obtained by formula (9); Use the Lagrange multiplier method to transform the formula as follows: where α and β represent vectors composed of Lagrangian operators in different scale spaces, α = (a 11 , a 21 , …, a m1 ), T , β = (a 12 , a 22 , …, a m2 ), T , Take the partial derivative of the parameters of \(L\) and set it to 0, and solve the linear equations (11) according to the Lagrangian function, where \(E\) m is \((1, 1, \ldots, 1)\) T , \(V\) r (i, j) = \(K\) r (u i , \(u\) j ), \(i, j = 1, 2, \ldots, m\), \(r = 1, 2\), \(\alpha=(a 11 , \(a\) 21 , \ldots, a m1 ) T , \(\beta=(a 12 , \(a\) 22 , \ldots, a m2 ) T . Solve the system of equations to obtain \(\alpha\), \(\beta\), and \(b\); The regression model is formula (12), and y is the estimated value of the knee joint angle; 5-2: Optimize the parameter p in the above MK-LSSVM model through an improved COOT optimization algorithm to obtain the ICOOT-MK-LSSVM model; where p ∈ P, and P is a D-dimensional search space; γ 1 , γ 2 represents the loss factor of the loss function in formula (7); specifically: ①The upper and lower limits of the particle search space um = [um 1 , um 2 , …, um D and lm = [lm 1 , lm 2 , …, lm D , there are N particles, each particle represents a solution, pi is the i-th particle, its position is CP(i) = [CP 1 (i), CP 2 (i), …, CP D (i)], the velocity is CV(i) = [CV 1 (i), CV 2 (i), …, CV D (i)], its personal best solution is pbest i = (pbest i1 , pbest i2 , …, pbest iD ), the global best solution is gbest = (gbest 1 , gbest 2 , …, gbest D ), and the global historical best fitness value of the population at the iteration number t is JG(t); ② Initialize the population parameters, including the population size PN, where PN ≤ N, the maximum number of iterations TM, the number of leaders NL, where NL < PN, and the initial position CP of the i-th particle in the j-th dimension. j (i) Determined by formula (13); set the iteration termination target value JG. a , the iteration number interval TD and the change threshold JT. CP j (i) = r j *(um j -lm j ) + lm j , j = 1, 2, …, D (13) where r j ∈ [0, 1] and is a random value; ③ Randomly select NL individuals from the population as leaders, calculate the fitness of all individuals, and the fitness JP(i) is determined by the optimization function formula (7); find the position pbest of the best individual i as the global best position gbest of the population; ④ Calculate the current velocity of the particle using formula (14); where TT is the current iteration number; ⑤ The leader index Z and the leader position LP(i) of the i-th particle: Z = 1+(i mod NL) (15) LP(i) = CP(Z) (16) ⑥ Update the individual position CP(i), and select the movement mode according to the random value rand, where rand ∈ [0,1]; where R1 ∈ [0,1], R2 ∈ [0,1], R3 ∈ [-1,1], if rand>0.5, then both R1 and R3 are D-dimensional random vectors, otherwise they are random numbers; ⑦ Calculate the fitness of the new individual position and update the individual position; if the individual fitness after updating the individual position is less than the fitness of its leader, then exchange the positions of the individual and the leader, otherwise only update the individual fitness; ⑧ Update the position of the leader using formula (18); ⑨ If the leader fitness is less than the population best fitness, then update the population best position gbest and JG(TT), otherwise do not change; at the same time, the iteration number is updated to TT = TT + 1; ⑩ Repeat steps ④ to ⑨ until one of the following three conditions is met and the iteration stops: (Ⅰ) The iteration number reaches the maximum iteration number; (Ⅱ) The population best fitness JG reaches the preset target value; (Ⅲ) The change value of JG within the set iteration number interval is less than the set threshold as shown in formula (19); JG(TT)-JG(TT-TD) ≤ JT (19) S6: During the movement, use the ICOOT-MS-LSSVM model trained and validated in S5 to predict the collected surface electromyogram signals to obtain the estimated value y of the knee joint angle.
2. The method according to claim 1, characterized in that the surface electromyogram sampling rate in step S1 is 1000Hz.
3. The method according to claim 1, characterized in that step S2 is specifically: 2-1: Denoise the surface electromyogram signal x(t) based on wavelet transform; 2-2: Perform a time shift on the collected angle data in the time dimension. Since there is a delay in the process of collecting angle data and electromyogram has the characteristic of being advanced in time, the calculation formula for the displacement time T of the angle data is as shown in Equation (22): In the above formula, T b is the electromyogram lead time difference, T a is the time delay caused by filtering, τ is the sliding window size, and Δt is the time period corresponding to the sliding window; 2-3: Shift the joint angle data to the left by time T to align it with the surface electromyogram signal, and the formula is as follows: h(t) = h(t + T) (23) h(t) is the joint angle at time t.
4. The method according to claim 3, characterized in that the wavelet basis sym8 is selected in step 2-1.
5. The method according to claim 1, characterized in that In step S3, the feature extraction uses the root mean square difference, wavelength, and number of zero crossings to form the feature vector u i .
6. The method according to claim 5, characterized in that the calculation formula for the root mean square difference is as follows: where n is the number of sampling points in each slice.
7. The method according to claim 5, characterized in that the calculation formula for the wavelength is as follows:
8. The method according to claim 5, characterized in that the calculation formula for the number of zero crossings is as follows:
9. A knee joint angle estimation system for implementing the method according to any one of claims 1-8, characterized in that it includes: a surface electromyogram acquisition device for acquiring surface electromyogram signals; a data preprocessing module for preprocessing the surface electromyogram signals and obtaining the characteristic values of each surface electromyogram signal segment; a knee joint angle calculation module for predicting the lower limb angle y using the trained and verified ICOOT-MS-LSSVM model.
10. A lower limb movement intention control device that uses the knee joint angle estimation value y output by the system according to claim 9 and converts it into an instruction and transmits it to a lower limb exoskeleton robot.
Citation Information
Patent Citations
Lower limb gait recognition method based on multi-source biological signals
CN107622260A
Method for predicting lower limb joint angles on basis of electromyography wavelet correlation dimensions
CN109498370A