Surface electromyography signal compression and reconstruction method based on improved KSVD algorithm

By improving the KSVD algorithm, including normalizing sparse matrix atoms and using improved KSVD dictionary, the problems of poor real-time performance and low reconstruction accuracy in electromyography signal reconstruction are solved, and efficient and accurate electromyography signal reconstruction is achieved.

CN110974223BActive Publication Date: 2025-03-28HEBEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911289519.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-13
Publication Date
2025-03-28
Estimated Expiration
2039-12-13

AI Technical Summary

Technical Problem

The existing KSVD algorithms have problems such as poor real-time performance and low reconstruction accuracy in electromyography signal reconstruction.

Method used

By normalizing sparse matrix atoms, narrowing the difference between sparse matrix atoms, speeding up the convergence of function, and reconstructing the electromyography signal using the improved KSVD dictionary.

Benefits of technology

The speed and accuracy of electromyography signal reconstruction are improved, and high-precision reconstruction of single-channel and multi-channel electromyography signals is achieved, with a compression ratio of 50%, and robustness under high compression rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110974223B_ABST
    Figure CN110974223B_ABST
Patent Text Reader

Abstract

The present invention is a surface electromyographic signal compression and reconstruction method based on an improved KSVD algorithm. The method normalizes sparse matrix atoms, scales eigenvectors, reduces sparse matrix atomic differences, accelerates function convergence, and performs dictionary training through a large number of samples to obtain an improved KSVD dictionary with better performance and more in line with the characteristics of electromyographic signal samples. The improved KSVD dictionary is applied to the reconstruction of a single-channel electromyographic signal, which has a good reconstruction effect. At the same time, the joint reconstruction of multi-channel electromyographic signals is studied. Based on the correlation between multiple electromyographic signals, a single signal is compressed and sampled, and then multiple compressed data are jointly reconstructed, thereby further reducing the number of observations, improving the reconstruction accuracy, and realizing multi-channel reconstruction of electromyographic signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer information processing, and in particular to a surface electromyography signal compression and reconstruction method and system based on an improved KSVD algorithm. Background Art

[0002] As a member of the large family of bioelectric signals, surface electromyogram (sEMG) is of great significance in clinical diagnosis, rehabilitation medicine, sports medicine, etc. The sampling rate, quantization word length, number of channels, and experimental time of the electromyographic signals collected by small portable wearable surface electromyographic signal sensors may lead to a large amount of potential data. The effective transmission and storage of sEMG is an urgent problem to be solved. Compressed sensing is to effectively compress the data and extract the minimum data of effective information to complete the downsampling of the data, thereby effectively solving the burden of excessive data on the system during the transmission and storage of sEMG data. The original signal is linearly measured through undersampling technology, and then the signal reconstruction algorithm is used to reconstruct the original signal based on a small number of observations.

[0003] Compressed reconstruction of physiological signals based on compressed sensing mainly includes three aspects: (1) sparse basis of physiological signals; (2) measurement matrix; (3) reconstruction algorithm. Selecting a suitable sparse basis to downsample the original signal is an important part of the compressed sensing principle. The sparse basis of physiological signal sparse decomposition commonly used at present is mainly orthogonal basis such as Fourier basis, discrete cosine basis and redundant dictionary such as overcomplete dictionary. Overcomplete dictionary uses supercomplete redundant function dictionary as basis function instead of traditional orthogonal basis function, which can make the signal have better sparse adaptability. In recent years, overcomplete learning dictionary represented by K-Singular Value Decomposition (KSVD) has emerged due to its good adaptability. Peng Xiangdong et al. proposed to use KSVD algorithm to reconstruct ECG signal in "Compressed Sensing ECG Reconstruction of Body Area Network Based on Overcomplete Dictionary". However, the sparse feature matrix of this algorithm has huge atomic differences, and the iteration end condition is greatly affected by the step size fluctuation, which leads to the disadvantages of poor real-time performance and low reconstruction accuracy when the algorithm is applied to signal reconstruction.

[0004] In view of the problems of poor real-time performance and low reconstruction accuracy of KSVD algorithm in EMG signal reconstruction, the present invention proposes a surface EMG signal compression reconstruction method and system based on improved KSVD algorithm. The algorithm adopts orthogonal matching pursuit algorithm (OMP) to obtain the signal sparse feature matrix Z according to the nonlinear and non-steady-state characteristics of EMG signal, and then normalizes the matrix Z, quantizes the feature vector, reduces the atomic difference of sparse matrix, and accelerates the function convergence speed. The overcomplete dictionary D is constructed with the surface EMG signal sample data set, and then the kth column of the dictionary is updated, and d is recorded. k The kth column vector of dictionary D is fixed, and all other columns of dictionary D are fixed to improve the problem of low signal reconstruction accuracy caused by iterative step fluctuation. A high random matrix that is unrelated to the sparse basis of the electromyographic signal is selected as the measurement matrix to construct the signal and reconstruct the signal. The improved KSVD algorithm is compared with algorithms such as DCT and sine basis, which improves the reconstruction accuracy of the algorithm, reduces the running time of the algorithm, and ensures the robustness of the algorithm under high compression rate, which can be well used in electromyographic signal reconstruction. At the same time, the electromyographic signal real-time compression sampling and reconstruction system is designed by combining hardware and software through electromyographic signal sensors, data acquisition cards, and Simulink toolbox in MATLAB, and the effectiveness of the algorithm proposed in the present invention is verified. Summary of the invention

[0005] The present invention provides a surface electromyographic signal compression reconstruction method based on an improved KSVD algorithm to solve the problems of poor real-time performance and low reconstruction accuracy of the existing compressed sensing KSVD algorithm in reconstructing signals. The method normalizes sparse matrix atoms, scales eigenvectors, reduces sparse matrix atomic differences, accelerates function convergence speed, and performs dictionary training through a large number of samples to obtain an improved KSVD dictionary with better performance and more in line with the characteristics of electromyographic signal samples. The improved KSVD dictionary is applied to the reconstruction of a single-channel electromyographic signal with good reconstruction effect. At the same time, the joint reconstruction of multi-channel electromyographic signals is studied. Based on the correlation between multiple electromyographic signals, a single signal is compressed and sampled, and then multiple compressed data are jointly reconstructed, thereby further reducing the number of observations, improving the reconstruction accuracy, and realizing multi-channel reconstruction of electromyographic signals.

[0006] The technical solution of the present invention is:

[0007] A surface electromyography signal compression and reconstruction method based on an improved KSVD algorithm comprises the following steps:

[0008] The first step is to obtain the surface electromyographic signal, set the input port of the data acquisition card, load the simulation model built in Matlab / Simulink into the board card, and the board card sends commands through the data acquisition card to collect electromyographic signal data in real time, set the compression ratio to 50%, and the number of iterations m = 25-40;

[0009] The second step is to select the corresponding channel mode in Simulink and read the electromyographic data transmitted back by the data acquisition card, and use the obtained electromyographic signal data to train and improve the KSVD dictionary until the convergence condition is met;

[0010] The training process of the improved KSVD dictionary is as follows:

[0011] 1) Using the acquired historical information of surface electromyography signals, a sample data set Q is formed; used to construct an over-complete dictionary D0 of surface electromyography signals and a sample set S to be sparsely represented;

[0012] 2) Select K atoms from the data set Q to form the initial dictionary D0∈R N×K , R N×K Indicates that the dictionary belongs to an N×K vector space, where N and K represent the number of rows and columns of the dictionary respectively;

[0013] 3) Sample Dataset is a set of n electromyographic signals to be sparsely represented, N is the signal length, and the sample data set S is sparsely encoded: that is, the orthogonal matching pursuit algorithm is used to calculate each sample s i The representation vector z i , and solve the equation for i=1,2,…,n,||z i ||0≤T0, the equation aims to find a signal with at most T0 non-zero terms and minimize the constraint condition T0, where T0 is a fixed preset number of non-zero terms; is the solution vector set of S;

[0014] 4) The eigenvector z in the sparse coefficient matrix Z i Perform normalization and scale it to the interval [0,1] to obtain the normalized matrix Z;

[0015] 5) Update the kth column of the dictionary, record d k is the k-th column vector of dictionary D, and all other columns of dictionary D are fixed;

[0016] 6) Update the expression coefficient of the column. Each expression coefficient corresponds to a column in the dictionary. As a column in the dictionary changes, its corresponding expression coefficient will also change accordingly to minimize the mean square error. The mean square error is the value in step 3. The value of is increased until the set number of iterations m is reached, then the update is stopped and the trained KSVD dictionary D is obtained;

[0017] The third step is to use the dictionary D in Simulink to downsample the surface electromyographic signal X collected subsequently; generate an M×N-dimensional Gaussian random measurement matrix Φ, and use Y=ΦX to project the N-dimensional electromyographic data X to obtain an M-dimensional observation value Y;

[0018] The fourth step is to input the observation value Y, the observation matrix Φ, and the KSVD dictionary D into the reconstruction algorithm, and obtain the reconstructed sparse coefficient θ according to Y = ΦDθ; using the sparse coefficient θ, Get the reconstructed electromyographic signal

[0019] The fifth step is to compare the reconstructed electromyographic signal with the original signal in real time, and establish a signal-to-noise ratio index to analyze and evaluate the reconstruction accuracy;

[0020] In the sixth step, the reconstructed EMG signal is used to identify the three motion states of going up stairs, going down stairs, and walking on flat ground. The recognition rate of the original EMG signal is compared to verify the effectiveness of the EMG signal compression reconstruction.

[0021] The reconstruction algorithm is a synchronous orthogonal matching pursuit algorithm or a subspace pursuit algorithm.

[0022] A simulation system for real-time compression sampling and reconstruction of electromyographic signals, wherein the system connects Matlab with an electromyographic sensor worn on the lower limbs of a subject to be tested through a data acquisition card, a host computer connects the data acquisition card through an external interface on the board card to control the electromyographic sensor, and a simulation model is built in Matlab / Simulink in the host computer, wherein the built Matlab / Simulink simulation model includes a channel selection module, a compression module, an overcomplete dictionary generation module, a reconstruction module, an evaluation module and a recognition module;

[0023] The channel selection module is used to select single-channel or multi-channel mode for acquisition;

[0024] The compression module is used to compress the collected electromyographic signal X with a length of N into an observation vector Y with a length of M through the measurement matrix Φ by using the formula Y=ΦX, wherein the compression ratio is M / N=50%;

[0025] The overcomplete dictionary generation module is used to generate an electromyographic signal dictionary D through an improved KSVD algorithm; the improved KSVD algorithm normalizes the sparse matrix atoms, scales the eigenvectors, reduces the sparse matrix atomic differences, and performs dictionary training through a large number of samples to obtain an improved KSVD electromyographic signal dictionary that is more in line with the characteristics of the electromyographic signal samples;

[0026] The reconstruction module is used to use the observation vector Y and dictionary D of the reconstruction algorithm and compression module to obtain the sparse coefficient θ of the electromyographic signal through the formula Y=ΦDθ, and then Get the reconstructed electromyographic signal

[0027] The evaluation module is used to The value of is used to evaluate the effect of reconstructing the electromyographic signal. The larger the signal-to-noise ratio of the reconstructed signal, the lower the reconstruction accuracy.

[0028] The recognition module uses the original electromyographic signal and the reconstructed electromyographic signal to recognize the three motion states of going up stairs, going down stairs, and walking on flat ground through a support vector machine, and verifies the effectiveness of the reconstruction algorithm by comparing the recognition rates of the original electromyographic signal and the reconstructed electromyographic signal.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1) The present invention normalizes the sparse matrix atoms, scales the eigenvectors, reduces the sparse matrix atomic differences, accelerates the function convergence speed, improves the KSVD algorithm, thereby improving the shortcomings of poor real-time performance and low reconstruction accuracy during electromyographic signal reconstruction, and improves the speed of electromyographic signal reconstruction on the basis of ensuring the accuracy of signal reconstruction;

[0031] 2) The present invention combines the improved KSVD algorithm with the compressed sensing of electromyographic signals to realize the downsampling processing and high-precision reconstruction of single-channel and multi-channel electromyographic signals. The compression ratio can reach 50%. It is simple and efficient, and provides a new idea for electromyographic signal detection and analysis.

[0032] 3) The present invention uses myoelectric sensors, data acquisition cards and Simulink tools to build a semi-physical simulation system for real-time compression sampling and reconstruction of myoelectric signals, and verifies the effectiveness of the algorithm proposed by the present invention through simulation of the system. The innovation of this system design is that Matlab, which can only be used for simulation, is connected to the actual external myoelectric sensor through the data acquisition card to form a semi-physical system design. Users can directly build a simulation model in Matlab / Simulink, and then control the controlled object through the external interface on the board to conduct algorithm research, which is more intuitive and concise. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 Design block diagram of EMG signal compression acquisition and reconstruction system.

[0034] Figure 2 It is a Simulink simulation model built.

[0035] Figure 3It is a schematic diagram of the improved KSVD dictionary training process.

[0036] Figure 4 It is a schematic diagram of the EMG signal compression and reconstruction process.

[0037] Figure 5(a) is a single-channel original electromyographic signal.

[0038] Figure 5(b) is a single-channel reconstructed electromyographic signal.

[0039] Figure 5(c) is the error diagram between the single-channel original EMG signal and the reconstructed EMG signal.

[0040] FIG6(a) and FIG6(b) are diagrams showing the effect of reconstructing the original electromyographic signal of channel 1. FIG6(a) and FIG6(b) are diagrams showing the effect of reconstructing the electromyographic signal of channel 1.

[0041] FIG6(c) and FIG6(d) are diagrams showing the effect of reconstructing the original EMG signal of channel 2. FIG6(c) and FIG6(d) are diagrams showing the effect of reconstructing the EMG signal of channel 2.

[0042] FIG6(e) and FIG6(f) are diagrams showing the effect of reconstructing the original EMG signal of channel 3. FIG6(e) and FIG6(f) are diagrams showing the effect of reconstructing the EMG signal of channel 3.

[0043] Figure 6(g) and Figure 6(h) are the effects of reconstructing the EMG signal from the original EMG signal of channel 4 respectively. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. It should be noted that the sensors, data volume, number of channels, etc. illustrated in the drawings in this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which the present invention can be implemented. Any changes in the position of the sensor, the amount of data collected, or the number of collection channels should fall within the scope of the technical content disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0045] In the description of the present invention, unless otherwise clearly specified and limited, the terms "placed", "connected" and "connected" should be understood in a broad sense and are not limited to specific methods. The terms such as "upper", "lower", "left", "right", "inner", "outer" and the like cited in the description of the present invention are only for the convenience of description, and are not used to limit the scope of the present invention. The change or adjustment of their relative relationship should also be regarded as the scope of the present invention without substantial change in the technical content. Example 1 describes the process of the system processing a single-channel electromyographic signal, and Example 2 describes the process of the system processing a multi-channel electromyographic signal.

[0046] The present invention designs a semi-physical simulation system for real-time compression sampling and reconstruction of electromyographic signals. The specific design block diagram of the system is as follows: Figure 1As shown in the figure, the Matlab, which can only be used for simulation, is connected to the electromyographic signal acquisition sensor worn on the lower limbs of the test subject through a data acquisition card, forming a semi-physical system design. The host computer connects the data acquisition card through the external interface on the board to control the electromyographic sensor.

[0047] A simulation model is built in Matlab / Simulink in the host computer, wherein the built Matlab / Simulink simulation model includes a channel selection module, a compression module, an overcomplete dictionary generation module, a reconstruction module, an evaluation module and a recognition module. The modules included in the simulation model and their functions are as follows: the channel selection module is used to select single-channel or multi-channel mode for acquisition; the compression module is used to compress the acquired electromyographic signal X with a length of N into an observation vector Y with a length of M through the measurement matrix Φ through the formula Y=ΦX, wherein the compression ratio is M / N=50%; the function of the overcomplete dictionary generation module is to generate an electromyographic signal dictionary D using the improved KSVD algorithm; the function of the reconstruction module is to use the reconstruction algorithm and the observation vector Y and the dictionary D of the compression module through the formula Y=ΦDθ to obtain the electromyographic signal sparse coefficient θ, and then Get the reconstructed electromyographic signal The evaluation module is based on the signal-to-noise ratio The numerical value is used to evaluate the effect of reconstructing the EMG signal; the recognition module uses the original EMG signal and the reconstructed EMG signal through the support vector machine to identify the three motion states of going up stairs, going down stairs, and walking on flat ground. The effectiveness of the reconstruction algorithm is verified by comparing the recognition rates of the original signal and the reconstructed signal. After the simulation model is built, select the external operation mode in Matlab / Simulink to compile and connect to generate the real-time running code to call the board. After ensuring that the external hardware connection is correct, the system can run normally. Each module jointly completes the EMG signal compression and reconstruction process. The EMG signal compression and reconstruction process is as follows: Figure 4 As shown in the figure, first select the channel number for pairing, then use the electromyographic sensor to collect the electromyographic signal in real time and transmit it to the host computer for compression module processing to obtain the observation vector Y, and then use the improved KSVD dictionary generation module to generate the overcomplete dictionary D, use the reconstruction module to reconstruct the electromyographic signal, and then use the signal-to-noise ratio indicator to evaluate the reconstruction accuracy of the system. The larger the signal-to-noise ratio of the reconstructed signal, the lower the reconstruction accuracy. Finally, the recognition module is designed to verify the effectiveness of data compression reconstruction through the recognition rate of the three motion states of going up stairs, going down stairs, and walking on flat ground.

[0048] The surface electromyography signal compression reconstruction method based on the improved KSVD algorithm includes the following steps:

[0049] The first step is to obtain the surface electromyographic signal, set the input port of the data acquisition card, load the simulation model built in Matlab / Simulink into the board card, and the board card sends commands through the data acquisition card to collect electromyographic signal data in real time, set the compression ratio to 50%, and the number of iterations m = 25-40;

[0050] The second step is to select the corresponding channel mode in Simulink and read the electromyographic data transmitted back by the data acquisition card, and use the obtained electromyographic signal data to train and improve the KSVD dictionary until the convergence condition is met;

[0051] The training process of the improved KSVD dictionary is as follows:

[0052] 1) Using the acquired historical information of surface electromyography signals, a sample data set Q is formed; used to construct an over-complete dictionary D0 of surface electromyography signals and a sample set S to be sparsely represented;

[0053] 2) Select K atoms from the data set Q to form the initial dictionary D0∈R N×K , R N × K Indicates that the dictionary belongs to an N×K vector space, where N and K represent the number of rows and columns of the dictionary respectively;

[0054] 3) Sample Dataset is a set of n electromyographic signals to be sparsely represented, N is the signal length, and the sample data set S is sparsely encoded: that is, the orthogonal matching pursuit algorithm is used to calculate each sample s i The representation vector z i , and solve the equation for i=1,2,…,n,||z i ||0≤T0, the equation aims to find a signal with at most T0 non-zero terms and minimize the constraint condition T0, where T0 is a fixed preset number of non-zero terms; is the solution vector set of S;

[0055] 4) The eigenvector z in the sparse coefficient matrix Z i Perform normalization and scale it to the interval [0,1] to obtain the normalized matrix Z;

[0056] 5) Update the kth column of the dictionary, record d k is the k-th column vector of dictionary D, and all other columns of dictionary D are fixed;

[0057] 6) Update the expression coefficient of the column. Each expression coefficient corresponds to a column in the dictionary. As a column in the dictionary changes, its corresponding expression coefficient will also change accordingly to minimize the mean square error. The mean square error is the value in step 3. ) until the set number of iterations m is reached, then the update is stopped and the trained KSVD dictionary D is obtained;

[0058] The third step is to use the dictionary D in Simulink to downsample the surface electromyographic signal X collected subsequently; generate an M×N-dimensional Gaussian random measurement matrix Φ, and use Y=ΦX to project the N-dimensional electromyographic data X to obtain an M-dimensional observation value Y;

[0059] In the fourth step, the observation value Y, the observation matrix Φ, and the KSVD dictionary D are input into a reconstruction algorithm. The reconstruction algorithm includes but is not limited to a synchronous orthogonal matching pursuit algorithm or a subspace pursuit (SP) algorithm.

[0060] According to Y = ΦDθ, the reconstructed sparse coefficient θ is obtained; using the sparse coefficient θ, Get the reconstructed electromyographic signal

[0061] The fifth step is to compare the reconstructed electromyographic signal with the original signal in real time, and establish a signal-to-noise ratio index to analyze and evaluate the reconstruction accuracy;

[0062] In the sixth step, the reconstructed EMG signal is used to identify the three motion states of going up stairs, going down stairs, and walking on flat ground. The recognition rate of the original EMG signal is compared to verify the effectiveness of the EMG signal compression reconstruction.

[0063] Example 1

[0064] The working process of Example 1 of the present invention is as follows:

[0065] In the first step, the electromyographic acquisition system uses the TrignoTM Wireless EMG electromyographic acquisition sensor from Delsys, USA. The electromyographic sensor is worn on the lower limbs of the test subject. The surface electromyographic signals of the three movements of the human body, namely, walking up stairs, walking down stairs, and walking on the ground, are collected using channel 1. The sampling frequency of the signal is 2000Hz, and the acquisition time is 3min. The electromyographic signals are wirelessly transmitted to the TrignoTM Wireless EMG base station. The "1-64EMG interface" of the EMG base station is connected to the "Analog 0" input port of the Quanser terminal board through a data cable, so that the electromyographic signals are transmitted to the computer system equipped with the Q-PID board of Quanser. The QuaRC software is installed on the computer, and the code generated by the Simulink simulation model is started in the Windows environment through the software to realize the real-time acquisition of electromyographic signals. The signal length N = 160, K = 300, the number of atoms in the sample data set n = 600, the number of iterations m = 30, and the number of measurements M = 80.

[0066] In the second step, after selecting the single-channel mode in Simulink, the electromyographic data transmitted back by the data acquisition card is read, and the obtained electromyographic signal data is used to train the improved KSVD dictionary until the convergence conditions are met.

[0067] The training process of the improved KSVD dictionary is as follows: Figure 3 As shown, the specific process is as follows:

[0068] 1. Use the collected historical information of surface electromyography signals to form a sample data set Q; used to construct an over-complete dictionary D0 of surface electromyography signals and a sample set S to be sparsely represented;

[0069] 2. Select K atoms from the data set Q to form the initial dictionary D0∈R N×K , R N×K Indicates that the dictionary belongs to an N×K vector space, where N and K represent the number of rows and columns of the dictionary respectively;

[0070] 3. Sample Dataset is a set of n electromyographic signals to be sparsely represented, N is the signal length, and the sample data set S is sparsely encoded: that is, the OMP algorithm is used to calculate each sample s i The representation vector z i , and solve the equation for i=1,2,…,n,||z i ||0≤T0, the equation aims to find a signal with at most T0 non-zero terms and minimize the constraint condition T0, where T0 is a fixed preset number of non-zero terms; is the solution vector set of S;

[0071] 4. Substitute the eigenvector z in the sparse coefficient matrix Z i Perform normalization and scale it to the interval [0,1] to obtain the normalized matrix Z;

[0072] 5. Update the kth column of the dictionary, record d k is the k-th column vector of dictionary D, and all other columns of dictionary D are fixed;

[0073] 6. Update the expression coefficient of the column. Each expression coefficient corresponds to a column in the dictionary. As a column in the dictionary changes, its corresponding expression coefficient will also change accordingly to minimize the mean square error. The mean square error is the value in step 3. ) value), until the set number of iterations m is reached, the update is stopped, and the trained KSVD dictionary D is obtained.

[0074] The third step is to use the dictionary D in Simulink to downsample the surface electromyographic signal X collected subsequently; generate an M×N-dimensional Gaussian random measurement matrix Φ, and use Y=ΦX to project the N-dimensional electromyographic data X to obtain an M-dimensional observation value Y;

[0075] The fourth step is to use the SP reconstruction algorithm, the observation value Y, the observation matrix Φ, and the KSVD dictionary D to obtain the reconstructed sparse coefficient θ based on Y = ΦDθ; using the sparse coefficient θ, Get the reconstructed electromyographic signal

[0076] The core steps of the SP algorithm are as follows:

[0077] Input: recovery matrix A = Φ*D, observation sample Y, sparsity H (H = M / 6);

[0078] Output: sparse coefficient θ of the signal;

[0079] Initialization: residual r0=y=Y, index set Λ0=[], t=1, A j is the jth column of A;

[0080] 1. Find the index of the H atom with the highest matching degree

[0081] 2. Construct a candidate set, where the index C=Λ of the K atoms with the highest correlation matching degree is stored in set B t-1 ∪B;

[0082] 3. Solve the least squares problem and find the indices of the K best atoms from C

[0083] 4. Update residual

[0084] 5. Determine whether the conditions for stopping iteration are met. If not, t = t + 1;

[0085] If the condition is satisfied, the iteration calculation will be stopped.

[0086] In the fifth step, the reconstructed EMG signal is compared with the original signal in real time, and the signal-to-noise ratio and other indicators are established to analyze and evaluate the quality of the system's compressed and reconstructed EMG signal. The single-channel result is shown in Figure 5. It can be seen from the figure that the reconstructed EMG signal of channel 1 is basically consistent with the original EMG signal, the signal-to-noise ratio is as high as 82.093dB, and the reconstruction effect is good.

[0087] In the sixth step, the reconstructed EMG signal is used to identify the three motion states of going up stairs, going down stairs, and walking on flat ground. The recognition rate of the original EMG signal is compared to verify the effectiveness of the EMG signal compression reconstruction.

[0088] Example 2

[0089] Figure 2 The EMG signal enters the four-channel selection module through the data conversion unit, and executes the compression module and the over-complete dictionary generation module after entering the compession, outputting the observation vector Y and the over-complete dictionary D to the reconstruction module. At the same time, a digital clock is set in the reconstruction module, which can transmit the recording time in real time; the reconstructed EMG signal is input into the evaluation module and the recognition module for evaluation and verification, completing the compression and reconstruction process of the EMG signal. The joint reconstruction of multi-channel EMG signals is studied, based on the correlation between multiple EMG signals, and a single signal is compressed and sampled, and then multiple compressed data are jointly reconstructed, thereby further reducing the number of observations, improving the reconstruction accuracy, and realizing the multi-channel reconstruction of EMG signals.

[0090] The specific process is as follows:

[0091] In the first step, the electromyographic acquisition system uses the TrignoTM Wireless EMG electromyographic acquisition sensor from Delsys, USA. The electromyographic sensor is worn on the lower limbs of the test subject. The surface electromyographic signals of the human body during the three movements of climbing stairs, going down stairs, and walking on the ground are collected using channels 1, 2, 3, and 4, respectively. The sampling frequency of the signal is 2000Hz, and the acquisition time is 3min. The electromyographic signals are wirelessly transmitted to the TrignoTM Wireless EMG base station. The EMG base station "1-64EMG interface" is connected to the "Analog 0-3" input port of the Quanser terminal board through a data cable, so that the electromyographic signals are transmitted to the computer system equipped with the Quanser Q-PID board. The QuaRC software is installed on the computer, and the code generated by the Simulink simulation model is started in the Windows environment through the software to realize the real-time acquisition of electromyographic signals. The signal length N = 160, K = 300, the number of atoms in the sample data set n = 600, the number of iterations m = 30, and the number of measurements M = 80.

[0092] In the second step, after selecting the multi-channel mode in Simulink, the electromyographic data transmitted back by the data acquisition card is read, and the obtained electromyographic signal data is used to train the improved KSVD dictionary until the convergence conditions are met.

[0093] The training process of the improved KSVD dictionary is as follows: Figure 3 As shown, the specific process is as follows:

[0094] 1. Use the collected historical information of surface electromyography signals to form a sample data set Q; used to construct an over-complete dictionary D0 of surface electromyography signals and a sample set S to be sparsely represented;

[0095] 2. Select K atoms from the data set Q to form the initial dictionary D0∈R N×K , R N×K Indicates that the dictionary belongs to an N×K vector space, where N and K represent the number of rows and columns of the dictionary respectively;

[0096] 3. Sample Dataset is a set of n electromyographic signals to be sparsely represented, N is the signal length, and the sample data set S is sparsely encoded: that is, the OMP algorithm is used to calculate each sample s i The representation vector z i , and solve the equation for i=1,2,…,n,||z i ||0≤T0, the equation aims to find a signal with at most T0 non-zero terms and minimize the constraint condition T0, where T0 is a fixed preset number of non-zero terms; is the solution vector set of S;

[0097] 4. Substitute the eigenvector z in the sparse coefficient matrix Z i Perform normalization and scale it to the interval [0,1] to obtain the normalized matrix Z;

[0098] 5. Update the kth column of the dictionary, record d k is the k-th column vector of dictionary D, and all other columns of dictionary D are fixed;

[0099] 6. Update the expression coefficient of the column. Each expression coefficient corresponds to a column in the dictionary. As a column in the dictionary changes, its corresponding expression coefficient will also change accordingly to minimize the mean square error. The mean square error is the value in step 3. ) value), until the set number of iterations m is reached, the update is stopped, and the trained KSVD dictionary D is obtained.

[0100] The third step is to use the dictionary D in Simulink to downsample the surface electromyographic signals X = {X1, X2, X3, X4} collected subsequently; generate an M×N-dimensional Gaussian random measurement matrix Φ, and use Y = ΦX to project the N-dimensional electromyographic data X to obtain an M-dimensional observation value Y;

[0101] The fourth step is to use the Simultaneously Orthogonal Matching Pursuit (SOMP) reconstruction algorithm, the observation value Y, the observation matrix Φ, the KSVD dictionary D, and obtain the reconstructed sparse coefficient θ based on Y = ΦDθ; using the sparse coefficient θ, through Get the reconstructed electromyographic signal

[0102] Among them, the core steps of the SOMP algorithm are as follows:

[0103] 1. Parameter initialization initial iteration number t = 1, for each signal y in the signal set j have Initialize the orthogonal sparse vector β j =0,β j ∈R M , initialize the indicator set r j,i Represents y j The residual after the tth iteration, the initial residual r j,0 =y j , the matrix Φ j,Ω Indicated in Φ j Select the submatrix consisting of columns corresponding to Ω. Initialize

[0104] 2. Find the dictionary vector that maximizes the residual sum and adds it to the index set to update the index:

[0105]

[0106] Ω=|Ω,n t |

[0107] 3. Orthogonalize the selected dictionary vector:

[0108]

[0109] 4. Update the orthogonal coefficients and residuals corresponding to the selected signal, and update the orthogonal coefficients by calculating the residuals and the orthogonal atoms:

[0110]

[0111] r j,t =r j,t-1 -β j (t)γ j,t

[0112] 5. Convergence judgment, execute step 6, otherwise return to step 2. If t≤M, then t=t+1, return to step 2, otherwise execute 6, and note that the maximum number of algorithm iterations is the number of rows in the observation matrix;

[0113] 6. Orthogonalization:

[0114]

[0115] Φ j , Ω =Γ j R j

[0116]

[0117] 7. Restoration of original signal:

[0118] y j =Γ j β j =Φ j , Ω x j , Ω =Γ j R j x j , Ω

[0119]

[0120]

[0121] Among them, θ j,Ω is the estimated value of the sparse signal, is the reconstructed value of the original signal.

[0122] The fifth step is to compare the reconstructed EMG signals with the original signals in real time. As shown in Figure 6, the reconstructed EMG signals of channels 1, 2, 3, and 4 are basically consistent with the original EMG signals, and the reconstruction effect is good.

[0123] In the sixth step, the reconstructed EMG signal is used to identify the three motion states of going up stairs, going down stairs, and walking on flat ground. The recognition rate of the original EMG signal is compared to verify the effectiveness of the EMG signal compression reconstruction.

[0124] Finally, it should be noted that: the above is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention. These changes involve related technologies well known to those skilled in the art, which all fall within the scope of protection of the patent of the present invention.

[0125] Matters not covered by the present invention are known technologies.

Claims

1. A simulation system for real-time compression sampling and reconstruction of electromyographic signals, wherein the system connects Matlab with an electromyographic sensor worn on the lower limbs of a subject to be tested through a data acquisition card, a host computer connects the data acquisition card through an external interface on the board card to control the electromyographic sensor, a simulation model is built in Matlab / Simulink in the host computer, and Matlab, which can only be used for simulation, is connected to an external actual electromyographic sensor through the data acquisition card to form a semi-physical system, wherein the user can directly build a simulation model in Matlab / Simulink and then control the controlled object through the external interface on the board card; wherein the built Matlab / Simulink simulation model includes a channel selection module, a compression module, an over-complete dictionary generation module, a reconstruction module, an evaluation module and a recognition module; The electromyography acquisition system uses the TrignoTM Wireless EMG electromyography acquisition sensor from Delsys, USA. The electromyography sensor is worn on the lower limbs of the test subject. The signal sampling frequency is 2000Hz and the acquisition time is 3min. The electromyography signal is wirelessly transmitted to the TrignoTM Wireless EMG base station. The "1-64EMG interface" of the EMG base station is connected to the "Analog 0" input port of the Quanser terminal board through a data cable, so that the electromyography signal is transmitted to the computer system equipped with the Quanser Q-PID board. The QuaRC software is installed on the computer. The code generated by the Simulink simulation model is started in the Windows environment through the software to realize the real-time acquisition of the electromyography signal. The signal length N = 160, K = 300, The channel selection module is used to select single-channel or multi-channel mode for acquisition; The compression module is used to compress the collected electromyographic signal X with a length of N into an observation vector Y with a length of M through the measurement matrix Φ by using the formula Y=ΦX, wherein the compression ratio is M / N=50%; The overcomplete dictionary generation module is used to generate an electromyographic signal dictionary D through an improved KSVD algorithm; the improved KSVD algorithm normalizes the sparse matrix atoms, scales the eigenvectors, reduces the sparse matrix atomic differences, and performs dictionary training through a large number of samples to obtain an improved KSVD electromyographic signal dictionary that is more in line with the characteristics of the electromyographic signal samples; The reconstruction module is used to use the observation vector Y and dictionary D of the reconstruction algorithm and compression module to obtain the sparse coefficient θ of the electromyographic signal through the formula Y=ΦDθ, and then Get the reconstructed electromyographic signal The evaluation module is used to The value of is used to evaluate the effect of reconstructing the electromyographic signal. The larger the signal-to-noise ratio of the reconstructed signal, the lower the reconstruction accuracy. The recognition module: uses the original electromyographic signal and the reconstructed electromyographic signal to respectively recognize the three motion states of going up stairs, going down stairs, and walking on flat ground through a support vector machine, and verifies the effectiveness of the reconstruction algorithm by comparing the recognition rates of the original electromyographic signal and the reconstructed electromyographic signal; The process of surface electromyography signal compression and reconstruction based on the improved KSVD algorithm performed by the above system is: The first step is to obtain the surface electromyographic signal, set the input port of the data acquisition card, load the simulation model built in Matlab / Simulink into the board card, and the board card sends commands through the data acquisition card to collect electromyographic signal data in real time, set the compression ratio to 50%, and the number of iterations m = 25-40; The second step is to select the corresponding channel mode in Simulink and read the electromyographic data transmitted back by the data acquisition card, and use the obtained electromyographic signal data to train and improve the KSVD dictionary until the convergence condition is met; The training process of the improved KSVD dictionary is as follows: 1) Using the acquired historical information of surface electromyography signals, a sample data set Q is formed; used to construct an over-complete dictionary D0 of surface electromyography signals and a sample set S to be sparsely represented; 2) Select K atoms from the data set Q to form the initial dictionary D0∈R N×K , R N×K Indicates that the dictionary belongs to an N×K vector space, where N and K represent the number of rows and columns of the dictionary respectively; 3) Sample Dataset is a set of n electromyographic signals to be sparsely represented, N is the signal length, and the sample data set S is sparsely encoded: that is, the orthogonal matching pursuit algorithm is used to calculate each sample s i The representation vector z i , and solve the equation for i=1,2,…,n,||z i ||0≤T0, the equation aims to find a signal with at most T0 non-zero terms and minimize the constraint condition T0, where T0 is a fixed preset number of non-zero terms; is the solution vector set of S; 4) The eigenvector z in the sparse coefficient matrix Z i Perform normalization and scale it to the interval [0,1] to obtain the normalized matrix Z; 5) Update the kth column of the dictionary, record d k is the k-th column vector of dictionary D, and all other columns of dictionary D are fixed; 6) Update the expression coefficient of the column. Each expression coefficient corresponds to a column in the dictionary. As a column in the dictionary changes, its corresponding expression coefficient will also change accordingly to minimize the mean square error. The mean square error is the value in step 3. The value of is increased until the set number of iterations m is reached, then the update is stopped and the trained KSVD dictionary D is obtained; The third step is to use the dictionary D in Simulink to downsample the surface electromyographic signal X collected subsequently; generate an M×N-dimensional Gaussian random measurement matrix Φ, and use Y=ΦX to project the N-dimensional electromyographic data X to obtain an M-dimensional observation value Y; The fourth step is to input the observation value Y, the observation matrix Φ, and the KSVD dictionary D into the reconstruction algorithm, and obtain the reconstructed sparse coefficient θ according to Y = ΦDθ; using the sparse coefficient θ, Get the reconstructed electromyographic signal The fifth step is to compare the reconstructed electromyographic signal with the original signal in real time, and establish a signal-to-noise ratio index to analyze and evaluate the reconstruction accuracy; In the sixth step, the reconstructed EMG signals were used to identify three motion states: going up stairs, going down stairs, and walking on flat ground. The recognition rate of the original EMG signals was compared to verify the effectiveness of EMG signal compression reconstruction. The signal-to-noise ratio was as high as 82.093 dB. The improved KSVD algorithm is combined with compressed sensing of electromyographic signals to achieve downsampling processing and high-precision reconstruction of single-channel and multi-channel electromyographic signals, with a compression ratio of up to 50%.