CN110974223A - Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm - Google Patents
Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm Download PDFInfo
- Publication number
- CN110974223A CN110974223A CN201911289519.5A CN201911289519A CN110974223A CN 110974223 A CN110974223 A CN 110974223A CN 201911289519 A CN201911289519 A CN 201911289519A CN 110974223 A CN110974223 A CN 110974223A
- Authority
- CN
- China
- Prior art keywords
- dictionary
- signal
- electromyographic
- reconstruction
- algorithm
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 62
- 238000007906 compression Methods 0.000 title claims abstract description 42
- 230000006835 compression Effects 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000005070 sampling Methods 0.000 claims abstract description 18
- 230000000694 effects Effects 0.000 claims abstract description 11
- 239000013598 vector Substances 0.000 claims description 43
- 239000011159 matrix material Substances 0.000 claims description 42
- 238000004088 simulation Methods 0.000 claims description 22
- 230000003183 myoelectrical effect Effects 0.000 claims description 21
- 238000012545 processing Methods 0.000 claims description 14
- 238000012549 training Methods 0.000 claims description 14
- 238000002567 electromyography Methods 0.000 claims description 11
- 238000011156 evaluation Methods 0.000 claims description 11
- 230000033001 locomotion Effects 0.000 claims description 11
- 238000010606 normalization Methods 0.000 claims description 10
- 238000005259 measurement Methods 0.000 claims description 7
- 210000003141 lower extremity Anatomy 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 claims description 4
- 238000012706 support-vector machine Methods 0.000 claims description 3
- 230000001360 synchronised effect Effects 0.000 claims description 3
- 239000000203 mixture Substances 0.000 claims description 2
- 238000011160 research Methods 0.000 abstract description 4
- 125000004429 atom Chemical group 0.000 description 16
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000003759 clinical diagnosis Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 125000004435 hydrogen atom Chemical group [H]* 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/389—Electromyography [EMG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- Physics & Mathematics (AREA)
- Animal Behavior & Ethology (AREA)
- Pathology (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physiology (AREA)
- Psychiatry (AREA)
- Signal Processing (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
The invention relates to a surface electromyogram signal compression reconstruction method based on an improved KSVD algorithm. The improved KSVD dictionary is applied to reconstruction of single-channel electromyographic signals, the reconstruction effect is good, meanwhile, combined reconstruction research of the multi-channel electromyographic signals is carried out, on the premise of correlation among a plurality of electromyographic signals, compression sampling is carried out on a single signal, then combined reconstruction of a plurality of compressed data is carried out, so that the observation quantity is further reduced, the reconstruction accuracy is improved, and multi-channel reconstruction of the electromyographic signals is realized.
Description
Technical Field
The invention relates to the field of computer information processing, in particular to a surface electromyogram signal compression reconstruction method and system based on an improved KSVD algorithm.
Background
Surface Electromyogram (sEMG) is a member of a large family of bioelectric signals, and has great significance in clinical diagnosis, rehabilitation medicine, sports medicine and the like. The electromyographic signals acquired by the small portable wearable surface electromyographic signal sensor can cause a large amount of potential data due to factors such as sampling rate, quantized word length, channel number, experiment time and the like. Efficient transmission and storage of sEMG is an urgent problem to be solved. The compressed sensing is to effectively compress data and extract the minimum data of effective information to complete data down-sampling, so that the burden on a system caused by overlarge data volume in the transmission and storage processes of the sEMG data is effectively solved. And performing linear measurement on the original signal by an undersampling technology, and reconstructing the original signal according to a small amount of observed values by using a signal reconstruction algorithm.
The compressed reconstruction of the physiological signal based on compressed sensing mainly comprises three aspects of (1) sparse basis of the physiological signal; (2) measuring a matrix; (3) and (4) reconstructing an algorithm. The selection of a proper sparse basis to perform downsampling processing on an original signal is an important part of a compressed sensing principle, and the sparse basis of the sparse decomposition of the commonly used physiological signals at present mainly comprises orthogonal bases such as Fourier bases and discrete cosine bases and redundant dictionaries such as over-complete dictionaries. The overcomplete dictionary adopts an overcomplete redundant function dictionary as a basis function instead of a traditional orthogonal basis function, so that the signal has better sparse adaptivity. In recent years, an overcomplete learning dictionary represented by a K-singular value decomposition algorithm (KSVD) is produced due to good adaptivity, and a KSVD algorithm is proposed in 'overcomplete dictionary-based body area network compressive sensing electrocardio reconstruction' of Pengdong et al for reconstructing electrocardiosignals, but the algorithm has the defects of poor real-time performance and low reconstruction precision due to the fact that sparse feature matrix atoms of the algorithm have huge difference and the iteration ending condition is greatly influenced by step size fluctuation.
The invention provides a surface electromyogram signal compression reconstruction method and system based on an improved KSVD algorithm, aiming at the problems of poor real-time performance and low reconstruction precision of the KSVD algorithm in electromyogram signal reconstruction. The algorithm adopts an orthogonal matching tracking algorithm aiming at the nonlinear unsteady state characteristics of the electromyographic signals(Orthogonal Matching Pursuit, OMP) obtains a signal sparse feature matrix Z, then normalizes the matrix Z, quantizes feature vectors, reduces sparse matrix atomic differences and accelerates function convergence. Constructing an overcomplete dictionary D from the surface myoelectric signal sample data set, and then updating the kth column of the dictionary, denoted DkThe method is characterized in that a kth column vector of a dictionary D is used, other columns of the dictionary D are fixed, the problem of low signal reconstruction accuracy caused by iteration step fluctuation is solved, and a high random matrix irrelevant to the sparse basis of the electromyographic signals is selected as a measurement matrix for constructing the signals and reconstructing the signals. Compared with the algorithms such as DCT, sine base and the like, the improved KSVD algorithm improves the reconstruction accuracy of the algorithm, reduces the operation time of the algorithm, ensures the robustness of the algorithm under high compression rate, and can be better used for reconstructing the electromyographic signals. Meanwhile, an electromyographic signal real-time compression sampling and reconstruction system is designed by combining hardware and software through an electromyographic signal sensor, a data acquisition card and a Simulink toolbox in MATLAB, and the effectiveness of the algorithm provided by the invention is verified.
Disclosure of Invention
The invention provides a surface electromyogram signal compression reconstruction method based on an improved KSVD algorithm, which aims to solve the problems of poor real-time performance and low reconstruction precision of the existing compressed sensing KSVD algorithm in reconstruction signals. According to the method, by normalizing sparse matrix atoms, feature vectors are scaled, sparse matrix atom differences are reduced, the function convergence speed is accelerated, and dictionary training is performed through a large number of samples, so that an improved KSVD dictionary which is good in performance and better in accordance with the characteristics of electromyographic signal samples is obtained. The improved KSVD dictionary is applied to reconstruction of single-channel electromyographic signals, the reconstruction effect is good, meanwhile, combined reconstruction research of the multi-channel electromyographic signals is carried out, on the premise of correlation among a plurality of electromyographic signals, compression sampling is carried out on a single signal, then combined reconstruction of a plurality of compressed data is carried out, so that the observation quantity is further reduced, the reconstruction accuracy is improved, and multi-channel reconstruction of the electromyographic signals is realized.
The technical scheme of the invention is as follows:
a surface electromyogram signal compression reconstruction method based on an improved KSVD algorithm comprises the following steps:
firstly, acquiring a surface electromyogram signal, setting an input port of a data acquisition card, loading a simulation model built in Matlab/Simulink into a board card, transmitting a command by the data acquisition card to acquire electromyogram signal data in real time by the board card, setting a compression ratio to be 50%, and setting an iteration number m to be 25-40;
secondly, reading myoelectric data transmitted back by a data acquisition card after selecting a corresponding channel mode in Simulink, and training and improving a KSVD dictionary by using the obtained myoelectric data until a convergence condition is met;
wherein, the training process of the improved KSVD dictionary is as follows:
1) forming a sample data set Q by using the acquired surface electromyographic signal historical information; overcomplete dictionary D for constructing surface electromyography signals0And a set of samples S to be sparsely represented;
2) selecting K atoms from the data set Q to form an initial dictionary D0∈RN×K,RN×KRepresenting that the dictionary belongs to an NxK vector space, wherein N and K respectively represent the row number and the column number of the dictionary;
3) sample data setCarrying out sparse coding on a sample data set S for N electromyographic signal sets to be sparsely represented, wherein N is a signal length: i.e. calculating each sample s using an orthogonal matching pursuit algorithmiIs a representative vector ziSolving the equation ofi=1,2,…,n,||zi||0≤T0The equation aims to find a maximum of T0A signal of non-zero term, and making the condition T limiting0Minimum where T0Is a fixed preset number of non-zero entries;a solution vector set of S;
4) to be sparseEigenvectors Z in the number matrix ZiNormalization is performed to scale to [0, 1%]Interval, obtaining matrix Z after normalization processing;
5) column k of the updated dictionary, note dkFixing all other columns of the dictionary D for the kth column vector of the dictionary D;
6) updating the expression coefficients of the column, wherein each expression coefficient respectively corresponds to a column in the dictionary, and as the column in the dictionary changes, the corresponding expression coefficient also changes correspondingly, so that the mean square error is reduced to the maximum extent, namely the mean square error is the step 3Until reaching the set iteration number m, stopping updating to obtain a trained KSVD dictionary D;
thirdly, performing down-sampling processing on the subsequently acquired surface electromyographic signals X by using the dictionary D in Simulink; generating an M × N-dimensional Gaussian random observation matrix phi, and projecting N-dimensional electromyographic data X by using Y ═ phi X to obtain an M-dimensional observation value Y;
fourthly, inputting the observed value Y, the observation matrix phi and the KSVD dictionary D into a reconstruction algorithm, and obtaining a reconstructed sparse coefficient theta according to the Y phi D theta; using a sparse coefficient θ, byObtaining a reconstructed electromyographic signal
Fifthly, comparing the reconstructed electromyographic signals with original signals in real time, and establishing signal-to-noise ratio index analysis and evaluation reconstruction precision;
and sixthly, applying the reconstructed electromyographic signals to identify three motion states of going upstairs, going downstairs and walking on the flat ground, and comparing the identification rate of the original electromyographic signals to verify the effectiveness of the electromyographic signal compression reconstruction.
The reconstruction algorithm is a synchronous orthogonal matching tracking algorithm or a subspace tracking algorithm.
A simulation system for real-time compression sampling reconstruction of an electromyographic signal is characterized in that Matlab and an electromyographic sensor worn on the lower limb of a person to be tested are connected through a data acquisition card, an upper computer is connected with the data acquisition card through an external interface on a board card so as to control the electromyographic sensor, and a simulation model is built in the Matlab/Simulink in the upper computer, wherein the built Matlab/Simulink simulation model comprises a channel selection module, a compression module, an over-complete dictionary generation module, a reconstruction module, an evaluation module and an identification module;
the channel selection module is used for selecting a single-channel or multi-channel mode for acquisition;
the compression module is used for compressing the collected electromyographic signals X with the length of N into observation vectors Y with the length of M through a measurement matrix phi through a formula Y phi X, wherein the compression ratio M/N is 50%;
the overcomplete dictionary generating module is used for generating a myoelectric signal dictionary D through an improved KSVD algorithm; the improved KSVD algorithm is characterized in that a feature vector is scaled by normalizing sparse matrix atoms, the difference of the sparse matrix atoms is reduced, dictionary training is carried out through a large number of samples, and an improved KSVD myoelectric signal dictionary which is more consistent with the characteristics of myoelectric signal samples is obtained;
the reconstruction module is used for obtaining an electromyographic signal sparse coefficient theta by using a reconstruction algorithm and an observation vector Y and a dictionary D of the compression module according to a formula Y phi D theta and then passing the electromyographic signal sparse coefficient thetaObtaining a reconstructed electromyographic signal
The evaluation module is used for passing the signal-to-noise ratioThe numerical value of (2) evaluates the effect of reconstructing the electromyographic signal, and the higher the signal-to-noise ratio of the reconstructed signal is, the lower the reconstruction precision is;
the identification module: the three motion states of going upstairs, going downstairs and walking on the flat ground are identified by the original electromyographic signals and the reconstructed electromyographic signals through a support vector machine respectively, and the effectiveness of a reconstruction algorithm is verified through the comparison of the identification rates of the original electromyographic signals and the reconstructed electromyographic signals.
Compared with the prior art, the invention has the following beneficial effects:
1) according to the method, by normalizing sparse matrix atoms, the feature vectors are scaled, the difference of the sparse matrix atoms is reduced, the function convergence speed is accelerated, the KSVD algorithm is improved, the defects of poor instantaneity and low reconstruction precision during electromyographic signal reconstruction are overcome, and the electromyographic signal reconstruction speed is increased on the basis of ensuring the signal reconstruction accuracy;
2) the invention combines the improved KSVD algorithm with the compressive sensing of the electromyographic signals, realizes the down-sampling processing and high-precision reconstruction of single-channel and multi-channel electromyographic signals, has the compression specific energy of 50 percent, has the characteristics of simplicity and high efficiency, and provides a new idea for the detection and analysis of the electromyographic signals.
3) The invention utilizes the electromyographic sensor, the data acquisition card and the Simulink tool to jointly build a semi-physical simulation system for real-time compressive sampling and reconstruction of electromyographic signals, and the effectiveness of the algorithm provided by the invention is verified through simulation of the system. The innovation of the system design is that Matlab which can only be used for simulation is connected with an external actual myoelectric sensor through a data acquisition card to form a semi-physical system design, a user can directly build a simulation model in Matlab/Simulink, and then a controlled object is controlled through an external interface on a board card to research an algorithm, so that the system is more visual and concise.
Drawings
FIG. 1 is a block diagram of a system for compressing, collecting and reconstructing an electromyographic signal.
FIG. 2 is a set up Simulink simulation model.
FIG. 3 is a schematic diagram of an improved KSVD dictionary training process.
Fig. 4 is a schematic diagram of a process of myoelectric signal compression and reconstruction.
Fig. 5(a) is a one-way raw myoelectric signal diagram.
Fig. 5(b) is a one-way reconstructed electromyogram.
Fig. 5(c) is an error diagram of a single-path original electromyogram signal and a reconstructed electromyogram signal.
Fig. 6(a) and 6(b) are respectively the effect graphs of channel 1 original electromyogram signal reconstruction electromyogram signals.
Fig. 6(c) and 6(d) are graphs of the effect of channel 2 raw electromyographic signals on the reconstructed electromyographic signals, respectively.
Fig. 6(e) and 6(f) are graphs of the effect of channel 3 raw electromyographic signals on reconstructing electromyographic signals, respectively.
Fig. 6(g) and 6(h) are the reconstructed electromyographic signal effect graphs of the channel 4 original electromyographic signal respectively.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it should be noted that the sensors, the data amount, the number of channels, and the like shown in the drawings in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, and any changes in the position of the sensor, the number of data amount collected, or the number of channels collected should fall within the scope that the technical contents disclosed in the present invention can cover without affecting the efficacy and the achievable purpose of the present invention.
In the description of the present invention, unless otherwise specified or limited, the terms "disposed," "connected," and "connected" should be construed broadly and not limited to specific embodiments, and the terms "upper," "lower," "left," "right," "inside," and "outside" used in the description of the present invention are for descriptive convenience only and are not intended to limit the scope of the invention, and the relative relationship between the terms and the terms may be changed or adjusted without substantial change in technical content. Wherein, the embodiment 1 describes the process of the system processing single-channel electromyogram signals, and the embodiment 2 describes the process of the system processing multi-channel electromyogram signals.
The invention designs a semi-physical simulation system for real-time compressive sampling and reconstruction of electromyographic signals, the specific design block diagram of the system is shown in figure 1, Matlab which can only be used for simulation is connected with an electromyographic signal acquisition sensor worn on the lower limb of a person to be tested through a data acquisition card to form a semi-physical system design, an upper computer is connected with the data acquisition card through an external interface on a board card to further control the electromyographic sensor,
a simulation model is built in Matlab/Simulink in an upper computer, wherein the built Matlab/Simulink simulation model comprises a channel selection module, a compression module, an overcomplete dictionary generation module, a reconstruction module, an evaluation module and an identification module, and the simulation model comprises the following modules and has the following functions: the channel selection module is used for selecting a single-channel or multi-channel mode for acquisition; the compression module is used for compressing the collected electromyographic signals X with the length of N into observation vectors Y with the length of M through a measurement matrix phi by a formula Y phi X, wherein the compression ratio M/N is 50%; the overcomplete dictionary generating module is used for generating a myoelectric signal dictionary D by using an improved KSVD algorithm; the reconstruction module is used for obtaining the electromyographic signal sparse coefficient theta by using a reconstruction algorithm and an observation vector Y and a dictionary D of the compression module according to a formula Y phi D theta and then passing the electromyographic signal sparse coefficient thetaObtaining a reconstructed electromyographic signalThe evaluation module is based on the signal-to-noise ratioThe value of (a) is used for evaluating the effect of reconstructing the electromyographic signal; the identification module is used for identifying three motion states of going upstairs, going downstairs and walking on the flat ground by using an original electromyographic signal and a reconstructed electromyographic signal through a support vector machine respectively, and verifying the effectiveness of a reconstruction algorithm through comparing the identification rates of the original signal and the reconstructed signal. After the simulation model is built, an external operation mode is selected from Matlab/Simulink, and a code calling board card running in real time is generated through compiling connection, so that the system can run normally after the external hardware connection is ensured to be correct. All modules complete the electromyographic signal compression and reconstruction togetherThe process is that the electromyographic signal compression and reconstruction flow is as shown in fig. 4, channel numbers are selected for pairing, then electromyographic signals are collected in real time through an electromyographic sensor and transmitted to an upper computer for processing by a compression module to obtain an observation vector Y, an over-complete dictionary D is generated by an improved KSVD dictionary generation module, the electromyographic signals are reconstructed by the reconstruction module, then the reconstruction accuracy of the system is evaluated by using a signal-to-noise ratio index, and the higher the signal-to-noise ratio of the reconstruction signals is, the lower the reconstruction accuracy is. And finally, the identification module is designed to verify the effectiveness of data compression and reconstruction through the identification rates of three motion states of going upstairs, going downstairs and going on the flat ground.
The surface electromyogram signal compression reconstruction method based on the improved KSVD algorithm comprises the following steps:
firstly, acquiring a surface electromyogram signal, setting an input port of a data acquisition card, loading a simulation model built in Matlab/Simulink into a board card, transmitting a command by the data acquisition card to acquire electromyogram signal data in real time by the board card, setting a compression ratio to be 50%, and setting an iteration number m to be 25-40;
secondly, reading myoelectric data transmitted back by a data acquisition card after selecting a corresponding channel mode in Simulink, and training and improving a KSVD dictionary by using the obtained myoelectric data until a convergence condition is met;
wherein, the training process of the improved KSVD dictionary is as follows:
1) forming a sample data set Q by using the acquired surface electromyographic signal historical information; overcomplete dictionary D for constructing surface electromyography signals0And a set of samples S to be sparsely represented;
2) selecting K atoms from the data set Q to form an initial dictionary D0∈RN×K,RN×KRepresenting that the dictionary belongs to an NxK vector space, wherein N and K respectively represent the row number and the column number of the dictionary;
3) sample data setCarrying out sparse coding on a sample data set S for N electromyographic signal sets to be sparsely represented, wherein N is a signal length: promptlyComputing each sample s with an orthogonal matching pursuit algorithmiIs a representative vector ziSolving the equation ofi=1,2,…,n,||zi||0≤T0The equation aims to find a maximum of T0A signal of non-zero term, and making the condition T limiting0Minimum where T0Is a fixed preset number of non-zero entries;a solution vector set of S;
4) feature vector Z in sparse coefficient matrix ZiNormalization is performed to scale to [0, 1%]Interval, obtaining matrix Z after normalization processing;
5) column k of the updated dictionary, note dkFixing all other columns of the dictionary D for the kth column vector of the dictionary D;
6) updating the expression coefficients of the column, wherein each expression coefficient respectively corresponds to a column in the dictionary, and as the column in the dictionary changes, the corresponding expression coefficient also changes correspondingly, so that the mean square error is reduced to the maximum extent, namely the mean square error is the step 3) Until reaching the set iteration number m, stopping updating to obtain a trained KSVD dictionary D;
thirdly, performing down-sampling processing on the subsequently acquired surface electromyographic signals X by using the dictionary D in Simulink; generating an M × N-dimensional Gaussian random observation matrix phi, and projecting N-dimensional electromyographic data X by using Y ═ phi X to obtain an M-dimensional observation value Y;
and fourthly, inputting the observed value Y, the observation matrix phi and the KSVD dictionary D into a reconstruction algorithm, wherein the reconstruction algorithm comprises but is not limited to a synchronous orthogonal matching tracking algorithm or a subspace tracking (SP) algorithm.
Obtaining a reconstructed sparse coefficient theta according to the Y phi D theta; using the sparse coefficient θ, fluxFor treatingObtaining a reconstructed electromyographic signal
Fifthly, comparing the reconstructed electromyographic signals with original signals in real time, and establishing signal-to-noise ratio index analysis and evaluation reconstruction precision;
and sixthly, applying the reconstructed electromyographic signals to identify three motion states of going upstairs, going downstairs and walking on the flat ground, and comparing the identification rate of the original electromyographic signals to verify the effectiveness of the electromyographic signal compression reconstruction.
Example 1
The working process of the embodiment 1 of the invention is as follows:
firstly, an electromyographic signal acquisition system adopts a Trigno TM wire EMG electromyographic signal acquisition sensor of Delsys company in America, the electromyographic signal acquisition sensor is worn on the lower limb of a person to be tested, the person respectively ascends stairs and descends stairs through an acquisition channel 1 and walks on the surface electromyographic signals in the three movement processes, the sampling frequency of the signals is 2000Hz, the acquisition time is 3min, the electromyographic signals are wirelessly transmitted to a Trigno TM wire EMG base station, an EMG base station 1-64EMG interface is connected to an Analog 0 input port of a Quanser terminal board through a data line, and therefore the electromyographic signals are transmitted to a computer system provided with a Q-PID board card of a Quanser company. QuaRC software is installed on a computer, and codes generated by a Simulink simulation model are started under the Windows environment through the software to realize real-time acquisition of electromyographic signals. The signal length N is 160, K is 300, the number of atoms in the sample data set N is 600, the number of iterations M is 30, and the number of measurements M is 80.
And secondly, selecting a single channel mode in Simulink, reading myoelectric data transmitted back by a data acquisition card, and training and improving a KSVD dictionary by using the obtained myoelectric data until a convergence condition is met.
The training process of the improved KSVD dictionary is shown in FIG. 3, and the specific process is as follows:
1. using harvested superficial musclesElectric signal historical information to form a sample data set Q; overcomplete dictionary D for constructing surface electromyography signals0And a set of samples S to be sparsely represented;
2. selecting K atoms from the data set Q to form an initial dictionary D0∈RN×K,RN×KRepresenting that the dictionary belongs to an NxK vector space, wherein N and K respectively represent the row number and the column number of the dictionary;
3. sample data setCarrying out sparse coding on a sample data set S for N electromyographic signal sets to be sparsely represented, wherein N is a signal length: i.e. calculating each sample s using the OMP algorithmiIs a representative vector ziSolving the equation ofi=1,2,…,n,||zi||0≤T0The equation aims to find a maximum of T0A signal of non-zero term, and making the condition T limiting0Minimum where T0Is a fixed preset number of non-zero entries;a solution vector set of S;
4. feature vector Z in sparse coefficient matrix ZiNormalization is performed to scale to [0, 1%]Interval, obtaining matrix Z after normalization processing;
5. column k of the updated dictionary, note dkFixing all other columns of the dictionary D for the kth column vector of the dictionary D;
6. updating the expression coefficients of the column, wherein each expression coefficient respectively corresponds to a column in the dictionary, and as the column in the dictionary changes, the corresponding expression coefficient also changes correspondingly, so that the mean square error is reduced to the maximum extent, namely the mean square error is the step 3) The value of (D) until reaching the set iteration number m, stopping updating to obtain the trained KSVD dictionary D.
Thirdly, performing down-sampling processing on the subsequently acquired surface electromyographic signals X by using the dictionary D in Simulink; generating an M × N-dimensional Gaussian random observation matrix phi, and projecting N-dimensional electromyographic data X by using Y ═ phi X to obtain an M-dimensional observation value Y;
fourthly, obtaining a reconstructed sparse coefficient theta based on the Y phi D theta by using an SP reconstruction algorithm, the observed value Y, the observation matrix phi and the KSVD dictionary D; using a sparse coefficient θ, byObtaining a reconstructed electromyographic signal
The SP algorithm comprises the following core steps:
inputting: recovering a matrix A phi D, observing a sample Y, and obtaining sparsity H (taking H phi M/6);
and (3) outputting: sparse coefficient theta of the signal;
initialization: residual r0Y, index set Λ0=[],t=1,AjColumn j of A;
2. Constructing a candidate set, and storing indexes C ═ Lambda of K atoms with highest maximum correlation matching degree in a set Bt-1∪B;
5. Judging whether an iteration stopping condition is met, and if the iteration stopping condition is not met, judging that t is t + 1;
And fifthly, comparing the reconstructed electromyographic signals with original signals in real time, establishing indexes such as signal-to-noise ratio and the like, analyzing and evaluating the quality of the compressed and reconstructed electromyographic signals of a system, wherein a single channel result is shown in figure 5, the reconstructed electromyographic signals of the channel 1 are basically consistent with the original electromyographic signals, the signal-to-noise ratio is 82.093dB, and the reconstruction effect is good.
And sixthly, applying the reconstructed electromyographic signals to identify three motion states of going upstairs, going downstairs and walking on the flat ground, and comparing the identification rate of the original electromyographic signals to verify the effectiveness of the electromyographic signal compression reconstruction.
Example 2
In fig. 2, an electromyographic signal enters a four-channel selection module through a data conversion unit, and after the electromyographic signal enters a composition, functions of a compression module and an overcomplete dictionary generation module are executed, an observation vector Y and an overcomplete dictionary D are output to a reconstruction module, and a digital clock is arranged in the reconstruction module and can transmit and record time in real time; and inputting the reconstructed electromyographic signals into an evaluation module and an identification module for evaluation and verification, and completing the process of compressing and reconstructing the electromyographic signals. The research on the multi-channel electromyographic signal combined reconstruction is carried out on the premise of the correlation among a plurality of electromyographic signals, compression sampling is carried out on a single signal, and then the combined reconstruction of a plurality of compressed data is carried out, so that the observation quantity is further reduced, the reconstruction precision is improved, and the multi-channel reconstruction of the electromyographic signals is realized.
The specific process is as follows:
firstly, an electromyographic signal acquisition system adopts a Trigno TM Wireless EMG electromyographic signal acquisition sensor of Delsys company in America, the electromyographic signal acquisition sensor is worn on the lower limb of a person to be tested, 4 channels of human bodies are respectively used for going upstairs and downstairs and walking on the flat ground in the three motion processes, the sampling frequency of signals is 2000Hz, the acquisition time is 3min, the electromyographic signal is wirelessly transmitted to a Trigno TM Wireless EMG base station, an EMG base station 1-64EMG interface is connected to an Analog 0-3 input port of a Quanser terminal board through a data line, and therefore the electromyographic signal is transmitted to a computer system provided with a Q-PID board card of the Quanser company. QuaRC software is installed on a computer, and codes generated by a Simulink simulation model are started under the Windows environment through the software to realize real-time acquisition of electromyographic signals. The signal length N is 160, K is 300, the number of atoms in the sample data set N is 600, the number of iterations M is 30, and the number of measurements M is 80.
And secondly, reading myoelectric data transmitted back by a data acquisition card after selecting a multi-channel mode in Simulink, and training and improving a KSVD dictionary by using the obtained myoelectric data until a convergence condition is met.
The training process of the improved KSVD dictionary is shown in FIG. 3, and the specific process is as follows:
1. forming a sample data set Q by utilizing the collected surface electromyographic signal historical information; overcomplete dictionary D for constructing surface electromyography signals0And a set of samples S to be sparsely represented;
2. selecting K atoms from the data set Q to form an initial dictionary D0∈RN×K,RN×KRepresenting that the dictionary belongs to an NxK vector space, wherein N and K respectively represent the row number and the column number of the dictionary;
3. sample data setCarrying out sparse coding on a sample data set S for N electromyographic signal sets to be sparsely represented, wherein N is a signal length: i.e. calculating each sample s using the OMP algorithmiIs a representative vector ziSolving the equation ofi=1,2,…,n,||zi||0≤T0The equation aims to find a maximum of T0A signal of non-zero term, and making the condition T limiting0Minimum where T0Is a fixed preset number of non-zero entries;a solution vector set of S;
4. feature vector Z in sparse coefficient matrix ZiNormalization is performed to scale to [0, 1%]Interval, obtaining matrix Z after normalization processing;
5. column k of the updated dictionary, note dkFixing all other columns of the dictionary D for the kth column vector of the dictionary D;
6. updating the expression coefficients of the column, wherein each expression coefficient respectively corresponds to a column in the dictionary, and as the column in the dictionary changes, the corresponding expression coefficient also changes correspondingly, so that the mean square error is reduced to the maximum extent, namely the mean square error is the step 3) The value of (D) until reaching the set iteration number m, stopping updating to obtain the trained KSVD dictionary D.
Thirdly, utilizing the dictionary D to carry out surface electromyographic signals X ═ X { X } collected subsequently in Simulink1,X2,X3,X4Performing down-sampling treatment; generating an M × N-dimensional Gaussian random observation matrix phi, and projecting N-dimensional electromyographic data X by using Y ═ phi X to obtain an M-dimensional observation value Y;
fourthly, utilizing a Simultaneous Orthogonal Matching Pursuit (SOMP) reconstruction algorithm to obtain a reconstructed sparse coefficient theta based on Y phi D theta, wherein the observation value Y, the observation matrix phi and the KSVD dictionary D are obtained; using a sparse coefficient θ, byObtaining a reconstructed electromyographic signal
The SOMP algorithm comprises the following core steps:
1. parameter initialization initial iteration number t is 1, for each signal y in the signal setjIs provided withInitializing orthogonal sparse vectors βj=0,βj∈RMInitializing index setrj,iDenotes yjThe residual after the t iteration of (1), the initial residual rj,0=yjMatrix phij,ΩIs represented at phijTo select a sub-matrix composed of columns corresponding to Ω. Initialization
2. And searching a dictionary vector which enables the residual error and the maximum dictionary vector to be maximum, and adding the dictionary vector into an index set to update indexes:
Ω=|Ω,nt|
3. orthogonalizing the selected dictionary vector:
4. and updating the orthogonal coefficient and the residual error corresponding to the selected signal, and updating the orthogonal coefficient by calculating the residual error and the orthogonal atoms:
rj,t=rj,t-1-βj(t)γj,t
5. and 6, judging the convergence, executing the step 6, and returning to the step if the convergence is not judged. If t is less than or equal to M, t is t +1, returning to 2, otherwise, executing 6, and noting that the maximum number of times of algorithm iteration is the number of rows of the observation matrix;
6. de-orthogonalizing:
Φj,Ω=ΓjRj
7. recovery of the original signal:
yj=Γjβj=Φj,Ωxj,Ω=ΓjRjxj,Ω
wherein, thetaj,ΩIn order to be an estimate of the sparse signal,is the reconstructed value of the original signal.
And fifthly, comparing the reconstructed electromyographic signals with the original signals in real time, wherein the channels 1, 2, 3 and 4 show that the reconstructed electromyographic signals are basically consistent with the original electromyographic signals through the graph 6, and the reconstruction effect is good.
And sixthly, applying the reconstructed electromyographic signals to identify three motion states of going upstairs, going downstairs and walking on the flat ground, and comparing the identification rate of the original electromyographic signals to verify the effectiveness of the electromyographic signal compression reconstruction.
Finally, it should be noted that: while the preferred embodiments of the present invention have been described in detail with reference to the accompanying drawings, it is to be understood that the invention is not limited to the embodiments described above, and that various changes, which relate to the related art known to those skilled in the art and fall within the scope of the invention, may be made within the knowledge of those skilled in the art without departing from the spirit of the present invention.
The invention is not the best known technology.
Claims (3)
1. A surface electromyogram signal compression reconstruction method based on an improved KSVD algorithm comprises the following steps:
firstly, acquiring a surface electromyogram signal, setting an input port of a data acquisition card, loading a simulation model built in Matlab/Simulink into a board card, transmitting a command by the data acquisition card to acquire electromyogram signal data in real time by the board card, setting a compression ratio to be 50%, and setting an iteration number m to be 25-40;
secondly, reading myoelectric data transmitted back by a data acquisition card after selecting a corresponding channel mode in Simulink, and training and improving a KSVD dictionary by using the obtained myoelectric data until a convergence condition is met;
wherein, the training process of the improved KSVD dictionary is as follows:
1) forming a sample data set Q by using the acquired surface electromyographic signal historical information; overcomplete dictionary D for constructing surface electromyography signals0And a set of samples S to be sparsely represented;
2) selecting K atoms from the data set Q to form an initial dictionary D0∈RN×K,RN×KRepresenting that the dictionary belongs to an NxK vector space, wherein N and K respectively represent the row number and the column number of the dictionary;
3) sample data setCarrying out sparse coding on a sample data set S for N electromyographic signal sets to be sparsely represented, wherein N is a signal length: i.e. calculating each sample s using an orthogonal matching pursuit algorithmiIs a representative vector ziSolving the equation of||zi||0≤T0The equation aims to find a maximum of T0A signal of non-zero term, and making the condition T limiting0At the minimum, the temperature of the mixture is controlled,wherein T is0Is a fixed preset number of non-zero entries;a solution vector set of S;
4) feature vector Z in sparse coefficient matrix ZiNormalization is performed to scale to [0, 1%]Interval, obtaining matrix Z after normalization processing;
5) column k of the updated dictionary, note dkFixing all other columns of the dictionary D for the kth column vector of the dictionary D;
6) updating the expression coefficients of the column, wherein each expression coefficient respectively corresponds to a column in the dictionary, and as the column in the dictionary changes, the corresponding expression coefficient also changes correspondingly, so that the mean square error is reduced to the maximum extent, namely the mean square error is the step 3Until reaching the set iteration number m, stopping updating to obtain a trained KSVD dictionary D;
thirdly, performing down-sampling processing on the subsequently acquired surface electromyographic signals X by using the dictionary D in Simulink; generating an M × N-dimensional Gaussian random observation matrix phi, and projecting N-dimensional electromyographic data X by using Y ═ phi X to obtain an M-dimensional observation value Y;
fourthly, inputting the observed value Y, the observation matrix phi and the KSVD dictionary D into a reconstruction algorithm, and obtaining a reconstructed sparse coefficient theta according to the Y phi D theta; using a sparse coefficient θ, byObtaining a reconstructed electromyographic signal
Fifthly, comparing the reconstructed electromyographic signals with original signals in real time, and establishing signal-to-noise ratio index analysis and evaluation reconstruction precision;
and sixthly, applying the reconstructed electromyographic signals to identify three motion states of going upstairs, going downstairs and walking on the flat ground, and comparing the identification rate of the original electromyographic signals to verify the effectiveness of the electromyographic signal compression reconstruction.
2. The method of claim 1, wherein the reconstruction algorithm is a synchronous orthogonal matching pursuit algorithm or a subspace pursuit algorithm.
3. A simulation system for real-time compression sampling reconstruction of an electromyographic signal is characterized in that Matlab and an electromyographic sensor worn on the lower limb of a person to be tested are connected through a data acquisition card, an upper computer is connected with the data acquisition card through an external interface on a board card so as to control the electromyographic sensor, and a simulation model is built in the Matlab/Simulink in the upper computer, wherein the built Matlab/Simulink simulation model comprises a channel selection module, a compression module, an over-complete dictionary generation module, a reconstruction module, an evaluation module and an identification module;
the channel selection module is used for selecting a single-channel or multi-channel mode for acquisition;
the compression module is used for compressing the collected electromyographic signals X with the length of N into observation vectors Y with the length of M through a measurement matrix phi through a formula Y phi X, wherein the compression ratio M/N is 50%;
the overcomplete dictionary generating module is used for generating a myoelectric signal dictionary D through an improved KSVD algorithm; the improved KSVD algorithm is characterized in that a feature vector is scaled by normalizing sparse matrix atoms, the difference of the sparse matrix atoms is reduced, dictionary training is carried out through a large number of samples, and an improved KSVD myoelectric signal dictionary which is more consistent with the characteristics of myoelectric signal samples is obtained;
the reconstruction module is used for obtaining an electromyographic signal sparse coefficient theta by using a reconstruction algorithm and an observation vector Y and a dictionary D of the compression module according to a formula Y phi D theta and then passing the electromyographic signal sparse coefficient thetaObtaining a reconstructed electromyographic signal
The evaluation module is used for passing the signal-to-noise ratioThe numerical value of (2) evaluates the effect of reconstructing the electromyographic signal, and the higher the signal-to-noise ratio of the reconstructed signal is, the lower the reconstruction precision is;
the identification module: the three motion states of going upstairs, going downstairs and walking on the flat ground are identified by the original electromyographic signals and the reconstructed electromyographic signals through a support vector machine respectively, and the effectiveness of a reconstruction algorithm is verified through the comparison of the identification rates of the original electromyographic signals and the reconstructed electromyographic signals.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911289519.5A CN110974223A (en) | 2019-12-13 | 2019-12-13 | Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911289519.5A CN110974223A (en) | 2019-12-13 | 2019-12-13 | Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110974223A true CN110974223A (en) | 2020-04-10 |
Family
ID=70093996
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911289519.5A Pending CN110974223A (en) | 2019-12-13 | 2019-12-13 | Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110974223A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112054803A (en) * | 2020-08-31 | 2020-12-08 | 昆明理工大学 | Communication signal sorting method based on compressed sensing |
CN112818315A (en) * | 2021-02-26 | 2021-05-18 | 山东大学 | Electrocardiosignal identity recognition method and system fusing multi-feature information |
CN113456065A (en) * | 2021-08-10 | 2021-10-01 | 长春理工大学 | Limb action recognition method, device and system and readable storage medium |
CN114424930A (en) * | 2022-01-07 | 2022-05-03 | 煤炭科学研究总院有限公司 | Ultra-wideband UWB (ultra-wideband) vital signal data processing method and device based on singular value decomposition |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140005988A1 (en) * | 2009-11-03 | 2014-01-02 | Marina Brockway | Physiological signal denoising |
CN104574456A (en) * | 2014-12-01 | 2015-04-29 | 南昌大学 | Graph regularization sparse coding-based magnetic resonance super-undersampled K data imaging method |
CN106559744A (en) * | 2016-11-24 | 2017-04-05 | 湖北文理学院 | It is a kind of based on sparse identification and the body area network power-economizing method of compressed sensing |
CN106599903A (en) * | 2016-11-22 | 2017-04-26 | 电子科技大学成都研究院 | Correlation weighed least squares-dictionary learning signal reconstruction method |
-
2019
- 2019-12-13 CN CN201911289519.5A patent/CN110974223A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140005988A1 (en) * | 2009-11-03 | 2014-01-02 | Marina Brockway | Physiological signal denoising |
CN104574456A (en) * | 2014-12-01 | 2015-04-29 | 南昌大学 | Graph regularization sparse coding-based magnetic resonance super-undersampled K data imaging method |
CN106599903A (en) * | 2016-11-22 | 2017-04-26 | 电子科技大学成都研究院 | Correlation weighed least squares-dictionary learning signal reconstruction method |
CN106559744A (en) * | 2016-11-24 | 2017-04-05 | 湖北文理学院 | It is a kind of based on sparse identification and the body area network power-economizing method of compressed sensing |
Non-Patent Citations (1)
Title |
---|
彭向东: "护理服务机器人及其体域网心电信号压缩感知研究", 《中国优秀博士学位论文全文数据库》, no. 6, 15 June 2018 (2018-06-15), pages 96 - 110 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112054803A (en) * | 2020-08-31 | 2020-12-08 | 昆明理工大学 | Communication signal sorting method based on compressed sensing |
CN112054803B (en) * | 2020-08-31 | 2023-11-21 | 昆明理工大学 | Communication signal sorting method based on compressed sensing |
CN112818315A (en) * | 2021-02-26 | 2021-05-18 | 山东大学 | Electrocardiosignal identity recognition method and system fusing multi-feature information |
CN112818315B (en) * | 2021-02-26 | 2022-03-15 | 山东大学 | Electrocardiosignal identity recognition method and system fusing multi-feature information |
CN113456065A (en) * | 2021-08-10 | 2021-10-01 | 长春理工大学 | Limb action recognition method, device and system and readable storage medium |
CN113456065B (en) * | 2021-08-10 | 2022-08-26 | 长春理工大学 | Limb action recognition method, device and system and readable storage medium |
CN114424930A (en) * | 2022-01-07 | 2022-05-03 | 煤炭科学研究总院有限公司 | Ultra-wideband UWB (ultra-wideband) vital signal data processing method and device based on singular value decomposition |
CN114424930B (en) * | 2022-01-07 | 2024-02-27 | 煤炭科学研究总院有限公司 | Ultra-wideband UWB life signal data processing method and device based on singular value decomposition |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110974223A (en) | Surface electromyogram signal compression reconstruction method based on improved KSVD algorithm | |
CN105769173B (en) | A kind of cardioelectric monitor system with electrocardiosignal noise removal function | |
CN110598676B (en) | Deep learning gesture electromyographic signal identification method based on confidence score model | |
Wu et al. | Neural decoding of hand motion using a linear state-space model with hidden states | |
CN106599903B (en) | Signal reconstruction method for weighted least square dictionary learning based on correlation | |
CN105534517A (en) | Method for removing vehicle motion noise in three-lead electrocardiosignal | |
CN111461201A (en) | Sensor data classification method based on phase space reconstruction | |
CN114052693B (en) | Heart rate analysis method, device and equipment | |
CN111476158A (en) | Multi-channel physiological signal somatosensory gesture recognition method based on PSO-PCA-SVM | |
Zanghieri et al. | sEMG-based regression of hand kinematics with temporal convolutional networks on a low-power edge microcontroller | |
CN105796091B (en) | A kind of intelligent terminal for removing electrocardiosignal vehicle movement noise | |
CN116089851A (en) | Self-adaptive updated online motion unit identification method | |
CN112307996B (en) | Fingertip electrocardio identity recognition device and method | |
CN113413135B (en) | Pulse acquisition analysis-based method, system, device and storage medium | |
CN114550907A (en) | Epilepsy detection system | |
Carrara et al. | Geometric neural network based on phase space for BCI decoding | |
CN212186496U (en) | Simulation system for real-time compression sampling reconstruction of electromyographic signals | |
CN116712099A (en) | Fetal heart state detection method based on multi-mode data, electronic equipment and storage medium | |
CN116798635A (en) | Movement dysfunction degree evaluation model, evaluation device and evaluation system | |
Zohirov | Classification Of Some Sensitive Motion Of Fingers To Create Modern Biointerface | |
Samann et al. | Multiple parallel hidden layers autoencoder for denoising ECG signal | |
CN114428555A (en) | Electroencephalogram intention identification method and system based on cortical source signals | |
CN108920423B (en) | High-fidelity spectrum reconstruction method | |
Xue et al. | SEMG based intention identification of complex hand motion using nonlinear time series analysis | |
Martinez et al. | Strategic attention learning for modality translation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |