CN112336357A - RNN-CNN-based EMG signal classification system and method - Google Patents
RNN-CNN-based EMG signal classification system and method Download PDFInfo
- Publication number
- CN112336357A CN112336357A CN202011229234.5A CN202011229234A CN112336357A CN 112336357 A CN112336357 A CN 112336357A CN 202011229234 A CN202011229234 A CN 202011229234A CN 112336357 A CN112336357 A CN 112336357A
- Authority
- CN
- China
- Prior art keywords
- data
- module
- rnn
- cnn
- layer
- 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
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/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
Landscapes
- Health & Medical Sciences (AREA)
- Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Physics & Mathematics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physiology (AREA)
- Psychiatry (AREA)
- Signal Processing (AREA)
- Fuzzy Systems (AREA)
- Evolutionary Computation (AREA)
- Pathology (AREA)
- Mathematical Physics (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Image Analysis (AREA)
Abstract
The invention belongs to the technical field of EMG signals, and particularly relates to an EMG signal classification system and method based on RNN-CNN. The method greatly improves the generalization performance of EMG signal identification by means of data amplification and the like, and classifies the EMG signals at high speed and high precision by a deep learning method, and the identification process is completely intelligent without manual participation. After the model training is finished, the EMG recognition can be directly carried out by calling without training the model again. The invention is used for classification of EMG signals.
Description
Technical Field
The invention belongs to the technical field of EMG signals, and particularly relates to an EMG signal classification system and method based on RNN-CNN.
Background
The electromyographic signal is the electrical signal source for generating muscle force, is the superposition of action potentials of a plurality of movement units in muscles on time and space, reflects the functional states of nerves and muscles, and has wide application in basic medical research, clinical diagnosis and rehabilitation engineering.
However, in the process of actually collecting the EMG signals, the EMG signals are very easily affected by external factors, such as the magnitude of the motion amplitude, the wearing position of the detection equipment, the motion habits of different people, etc., can cause great interference to the EMG signals, resulting in poor recognition effect. The existing EMG signal classification method is weak in generalization performance and cannot be widely applied to various crowds.
Disclosure of Invention
Aiming at the technical problem that the existing EMG signal classification method is poor in generalization performance, the invention provides the RNN-CNN-based EMG signal classification system and method which are high in precision, good in identification effect and strong in anti-interference capability.
In order to solve the technical problems, the invention adopts the technical scheme that:
an EMG signal classification system based on RNN-CNN comprises a data acquisition module, a data preprocessing module, an identification model module and a model storage module, wherein the data acquisition module is connected with the data preprocessing module, the data preprocessing module is connected with the identification model module, and the identification model module is connected with the model storage module.
The data preprocessing module comprises a noise adding module, a normalizing module, a data cutting module and a unified data scale module, wherein the noise adding module is connected with the normalizing module, the normalizing module is connected with the data cutting module, and the data cutting module is connected with the unified data scale module.
The identification model module is of a three-layer structure which comprises an RNN layer, a CNN layer and a full-connection layer, wherein the RNN layer is constructed by LSTM units, the RNN layer is connected with a data preprocessing module, the CNN layer is connected with the RNN layer, and the full-connection layer is connected with the CNN layer.
An EMG signal classification method based on RNN-CNN comprises the following steps:
s100, collecting EMG signal data, and performing classification and marking according to different collected actions to complete construction of a data set required by model training;
s200, preprocessing the constructed data set to meet the requirement of model training data;
s300, building an identification model by adopting a deep learning method, and completing building of a parameter model by inputting training data;
s400, when the loss function of the model is not reduced any more, the data model is saved.
The method for completing construction of the data set required by model training in the S100 comprises the following steps: comprises the following steps:
s101, copying the data set into three parts, adding 5% of noise of the maximum value S of the data to the data of the second data set without processing the first data set, adding 10% of noise of the maximum value S of the data to the data of the third data set, and then scrambling the three data sets;
s102, carrying out Min-Max normalization on the three data sets in the S101;
s103, segmenting the data set subjected to Min-Max normalization in the S102, and segmenting the whole data set into small segments of data according to time;
and S104, assimilating the format of the divided data.
The method for preprocessing the constructed data set in S200 is as follows: comprises the following steps:
s201, constructing an RNN layer by using an LSTM unit,
S(t)=σ(WS·[ht-1,xt]+bS)
E(t)=σ(WE·[ht-1,xt]+bE)
R(t)=σ(WR·[ht-1,xt]+bR)
s (t) is a forgetting gate, E (t) is a memory gate, R (t) is an output gate, and WS、WE、WRThe weights of RNN layers of the forgetting gate, the memory gate and the output gate respectively, bS、bE、bRBias parameters of a forgetting gate, a memory gate and an output gate respectively, wherein h ist-1For the output value of the last iteration, xtThe LSTM unit calculates the self state through S (t), E (t) and R (t) and then performs tanh calculation with R (t) to obtain unit output;
s202, extracting the features of the data output by the RRN layers, and obtaining a feature map with the size of 20 x 1 x 16 after extraction is finished;
s203, carrying out full connection operation on the obtained feature graph, wherein the full connection operation uses a sigmoid functionAnd obtaining a classification result, wherein x is input data.
Compared with the prior art, the invention has the following beneficial effects:
the method greatly improves the generalization performance of EMG signal identification by means of data amplification and the like, and classifies the EMG signals at high speed and high precision by a deep learning method, and the identification process is completely intelligent without manual participation. After the model training is finished, the EMG recognition can be directly carried out by calling without training the model again.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a flow chart of the operation of the present invention;
FIG. 3 is a schematic diagram of the operational logic framework of the present invention.
Wherein: the system comprises a data acquisition module 1, a data preprocessing module 2, an identification model module 3, a model storage module 4, a noise adding module 101, a normalization module 102, a data cutting module 103, a unified data scale module 104, an RNN layer 301, a CNN layer 302 and a full connection layer 303.
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 is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An EMG signal classification system based on RNN-CNN is shown in figure 1 and comprises a data acquisition module 1, a data preprocessing module 2, an identification model module 3 and a model storage module 4, wherein the data acquisition module 1 is used for acquiring EMG signal data, and performing classification and labeling according to different acquisition actions to complete construction of a data set required by model training. The data acquisition module 1 is connected with a data preprocessing module 2, and the data preprocessing module 2 is used for preprocessing the constructed data set so as to meet the requirements of model training data. The data preprocessing module 2 is connected with an identification model module 3, the identification model module adopts a deep learning method to build an identification model, and the building of a parameter model is completed by inputting training data. The recognition model module 3 is connected with a model storage module 4, and the model storage module is used for storing the data model after the loss function of the model is not reduced any more.
Further, the data preprocessing module 2 includes a noise adding module 201, a normalizing module 202, a data cutting module 203, and a unified data scale module 204, the noise adding module 201 is connected with the normalizing module 202, the normalizing module 202 is connected with the data cutting module 203, and the data cutting module 203 is connected with the unified data scale module 204.
Further, the identification model module 3 adopts a three-layer structure, which is respectively an RNN layer 301, a CNN layer 302, and a fully-connected layer 303, wherein the RNN layer 301 is constructed by using LSTM units, the RNN layer 301 is connected with the data preprocessing module 2, the CNN layer 302 is connected with the RNN layer 301, and the fully-connected layer 303 is connected with the CNN layer 302.
An EMG signal classification method based on RNN-CNN, as shown in fig. 2, includes the following steps:
s100, collecting EMG signal data, and performing classification and marking according to different collected actions to complete construction of a data set required by model training;
s200, preprocessing the constructed data set to meet the requirement of model training data;
s300, building an identification model by adopting a deep learning method, and completing building of a parameter model by inputting training data;
s400, when the loss function of the model is not reduced any more, the data model is saved.
Further, the method for completing the construction of the data set required by the model training in S100 is as follows: comprises the following steps:
s101, copying the data set into three parts, adding 5% of noise of the maximum value S of the data to the data of the second data set without processing the first data set, adding 10% of noise of the maximum value S of the data to the data of the third data set, and then scrambling the three data sets;
s102, carrying out Min-Max normalization on the three data sets in the S101;
s103, segmenting the data set subjected to Min-Max normalization in the S102, and segmenting the whole data set into small segments of data according to time;
and S104, assimilating the format of the divided data.
Further, the method for preprocessing the constructed data set in S200 is as follows: comprises the following steps:
s201, constructing an RNN layer by using an LSTM unit,
S(t)=σ(WS·[ht-1,xt]+bS)
E(t)=σ(WE·[ht-1,xt]+bE)
R(t)=σ(WR·[ht-1,xt]+bR)
wherein: s (t) is a forgetting gate, E (t) is a memory gate, R (t) is an output gate, WS、WE、WRThe weights of RNN layers of the forgetting gate, the memory gate and the output gate, bS、bE、bRThe bias parameters h of the forgetting gate, the memory gate and the output gate are respectivelyt-1For the output value of the last iteration, xtFor the input data at the moment, the LSTM unit performs self-state calculation through S (t) and E (t), and then performs tanh calculation with R (t) to obtain unit output;
s202, extracting features of the data output by the RRN layers, and obtaining a feature diagram with the size of 20 x 1 x 16 after extraction is finished;
s203, performing full-connection operation on the obtained feature graph, wherein the full-connection operation uses a sigmoid functionAnd obtaining a classification result, wherein x is input data.
Examples
Firstly, wearing a MYO arm ring for 100 testers, enabling the arms of the testers to do specified actions, recording 8-channel EMG signals detected by the MYO arm ring when the arms do the specified actions, and marking the EMG signals. And after data collection is finished, preprocessing the data, wherein the preprocessing comprises segmentation and noise addition. Inputting the preprocessed data into the constructed LSTM network to train the network model, and storing the model until the model loss function is not reduced any more, thereby completing the model construction. The method comprises the following specific steps:
the MYO arm ring is used for collecting data, the MYO arm ring can collect EMG signal data with 8 channels of sampling rates being 100Hz, higher dimensionality description can be provided for the signals, and the model is helped to classify and identify the signals more accurately. After wearing the MYO armlet, n testers perform designated m actions, and each action is performed once every 3 seconds and 10 times in total. A total of n x m pieces of EMG signal data of 30 seconds length are available.
Data noise addition: the data set was replicated in 3 copies, the first copy was left unprocessed, the second copy was made with a maximum noise of 5% for each piece of data x, and the third copy was made with a maximum noise of 10% for each piece of data x. The 3 data sets were then shuffled. x'j=xj+max(Si)
Data processing: the acquired data is segmented, and the data of 30 seconds is segmented into small segments of data of 3 seconds, so that the network can be rapidly identified conveniently, the data set is amplified, and the network identification capability is enhanced.
Constructing a model: the network model comprises a 3-layer structure, namely an RNN layer, a CNN layer and a full connection layer. The RNN layer is constructed using LSTM units,
S(t)=σ(WS·[ht-1,xt]+bS)
E(t)=σ(WE·[ht-1,xt]+bE)
R(t)=σ(WR·[ht-1,xt]+bR)
wherein: s (t) is a forgetting gate, E (t) is a memory gate, R (t) is an output gate, WS、WE、WRThe weights of RNN layers of the forgetting gate, the memory gate and the output gate, bS、bE、bRThe bias parameters h of the forgetting gate, the memory gate and the output gate are respectivelyt-1For the output value of the last iteration, xtThe input data at this time. The LSTM calculates the self state through S (t) and E (t), and then calculates the best tanh with R (t) to obtain the unit output.
Firstly, carrying out time domain analysis on an EMG signal through a Bi-LSTM layer, converting input data with the size of 30 x 1 x 8 into 30 x 1 x 32 in a dimensionality mode, then carrying out feature extraction on data output by the Bi-LSTM by using a CNN network, obtaining a feature map with the size of 20 x 1 x 16 after the feature map is extracted, carrying out full-connection operation on the obtained feature map, and then obtaining a classification result by using a sigmoid function. sigmoid function:when the loss function of the model is no longer decreasing, the model is saved.
The division of modules, units or components herein is merely a logical division, and other divisions may be possible in an actual implementation, for example, a plurality of modules and/or units may be combined or integrated in another system. Modules, units, or components described as separate parts may or may not be physically separate. The components displayed as cells may or may not be physical cells, and may be located in a specific place or distributed in grid cells. Therefore, some or all of the units can be selected according to actual needs to implement the scheme of the embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium, including but not limited to disk storage, CD-ROM, optical storage, and the like.
Although only the preferred embodiments of the present invention have been described in detail, the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art, and all changes are encompassed in the scope of the present invention.
Claims (6)
1. An EMG signal classification system based on RNN-CNN, characterized by: the device comprises a data acquisition module (1), a data preprocessing module (2), an identification model module (3) and a model storage module (4), wherein the data acquisition module (1) is connected with the data preprocessing module (2), the data preprocessing module (2) is connected with the identification model module (3), and the identification model module (3) is connected with the model storage module (4).
2. The RNN-CNN based EMG signal classification system of claim 1, wherein: the data preprocessing module (2) comprises a noise adding module (201), a normalizing module (202), a data cutting module (203) and a unified data scale module (204), wherein the noise adding module (201) is connected with the normalizing module (202), the normalizing module (202) is connected with the data cutting module (203), and the data cutting module (203) is connected with the unified data scale module (204).
3. The RNN-CNN based EMG signal classification system of claim 1, wherein: the identification model module (3) adopts a three-layer structure, the three-layer structure comprises an RNN layer (301), a CNN layer (302) and a full connection layer (303), the RNN layer (301) is constructed by LSTM units, the RNN layer (301) is connected with a data preprocessing module (2), the CNN layer (302) is connected with the RNN layer (301), and the full connection layer (303) is connected with the CNN layer (302).
4. An EMG signal classification method based on RNN-CNN is characterized in that: comprises the following steps:
s100, collecting EMG signal data, and performing classification and marking according to different collected actions to complete construction of a data set required by model training;
s200, preprocessing the constructed data set to meet the requirement of model training data;
s300, building an identification model by adopting a deep learning method, and completing building of a parameter model by inputting training data;
s400, when the loss function of the model is not reduced any more, the data model is saved.
5. The RNN-CNN-based EMG signal classification method of claim 4, wherein: the method for completing construction of the data set required by model training in the S100 comprises the following steps: comprises the following steps:
s101, copying the data set into three parts, adding 5% of noise of the maximum value S of the data to the data of the second data set without processing the first data set, adding 10% of noise of the maximum value S of the data to the data of the third data set, and then scrambling the three data sets;
s102, carrying out Min-Max normalization on the three data sets in the S101;
s103, segmenting the data set subjected to Min-Max normalization in the S102, and segmenting the whole data set into small segments of data according to time;
and S104, assimilating the format of the divided data.
6. The RNN-CNN-based EMG signal classification method of claim 4, wherein: the method for preprocessing the constructed data set in S200 is as follows: comprises the following steps:
s201, constructing an RNN layer by using an LSTM unit,
S(t)=σ(WS·[ht-1,xt]+bS)
E(t)=σ(WE·[ht-1,xt]+bE)
R(t)=σ(WR·[ht-1,xt]+bR)
s (t) is a forgetting gate, E (t) is a memory gate, R (t) is an output gate, and WS、WE、WRThe weights of RNN layers of the forgetting gate, the memory gate and the output gate respectively, bS、bE、bRBias parameters of a forgetting gate, a memory gate and an output gate respectively, wherein h ist-1For the output value of the last iteration, xtThe LSTM unit calculates the self state through S (t) and E (t), and then calculates tanh with R (t) to obtain unit output;
s202, extracting the features of the data output by the RRN layers, and obtaining a feature map with the size of 20 x 1 x 16 after extraction is finished;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011229234.5A CN112336357A (en) | 2020-11-06 | 2020-11-06 | RNN-CNN-based EMG signal classification system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011229234.5A CN112336357A (en) | 2020-11-06 | 2020-11-06 | RNN-CNN-based EMG signal classification system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112336357A true CN112336357A (en) | 2021-02-09 |
Family
ID=74429629
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011229234.5A Pending CN112336357A (en) | 2020-11-06 | 2020-11-06 | RNN-CNN-based EMG signal classification system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112336357A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304917A (en) * | 2018-01-17 | 2018-07-20 | 华南理工大学 | A kind of P300 signal detecting methods based on LSTM networks |
CN110610172A (en) * | 2019-09-25 | 2019-12-24 | 南京邮电大学 | Myoelectric gesture recognition method based on RNN-CNN architecture |
CN110610168A (en) * | 2019-09-20 | 2019-12-24 | 合肥工业大学 | Electroencephalogram emotion recognition method based on attention mechanism |
CN110619322A (en) * | 2019-10-18 | 2019-12-27 | 武汉大学 | Multi-lead electrocardio abnormal signal identification method and system based on multi-flow convolution cyclic neural network |
CN111325236A (en) * | 2020-01-21 | 2020-06-23 | 南京大学 | Ultrasonic image classification method based on convolutional neural network |
CN111461204A (en) * | 2020-03-30 | 2020-07-28 | 华南理工大学 | Emotion identification method based on electroencephalogram signals and used for game evaluation |
-
2020
- 2020-11-06 CN CN202011229234.5A patent/CN112336357A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304917A (en) * | 2018-01-17 | 2018-07-20 | 华南理工大学 | A kind of P300 signal detecting methods based on LSTM networks |
CN110610168A (en) * | 2019-09-20 | 2019-12-24 | 合肥工业大学 | Electroencephalogram emotion recognition method based on attention mechanism |
CN110610172A (en) * | 2019-09-25 | 2019-12-24 | 南京邮电大学 | Myoelectric gesture recognition method based on RNN-CNN architecture |
CN110619322A (en) * | 2019-10-18 | 2019-12-27 | 武汉大学 | Multi-lead electrocardio abnormal signal identification method and system based on multi-flow convolution cyclic neural network |
CN111325236A (en) * | 2020-01-21 | 2020-06-23 | 南京大学 | Ultrasonic image classification method based on convolutional neural network |
CN111461204A (en) * | 2020-03-30 | 2020-07-28 | 华南理工大学 | Emotion identification method based on electroencephalogram signals and used for game evaluation |
Non-Patent Citations (2)
Title |
---|
XIANG LI等人: "Emotion Recognition from Multi-Channel EEG Data through Convolutional Recurrent Neural Network", 2016 IEEE INTERNATIONAL CONFERENCE ON BIOINFORMATICS AND BIOMEDICINE (BIBM), pages 352 - 359 * |
YU HU等人: "A novel attention-based hybrid CNN-RNN architecture for sEMG-based gesture recognition", PLOS ONE, pages 1 - 18 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111160139B (en) | Electrocardiosignal processing method and device and terminal equipment | |
Zhao et al. | Noise rejection for wearable ECGs using modified frequency slice wavelet transform and convolutional neural networks | |
CN108491077B (en) | Surface electromyographic signal gesture recognition method based on multi-stream divide-and-conquer convolutional neural network | |
CN105841961A (en) | Bearing fault diagnosis method based on Morlet wavelet transformation and convolutional neural network | |
CN101859377A (en) | Electromyographic signal classification method based on multi-kernel support vector machine | |
CN110288028B (en) | Electrocardio detection method, system, equipment and computer readable storage medium | |
CN112799128B (en) | Method for seismic signal detection and seismic phase extraction | |
Odeh | Using an Adaptive Neuro-Fuzzy Inference System(AnFis) Algorithm for Automatic Diagnosis of Skin Cancer | |
CN112396001B (en) | Rope skipping number statistical method based on human body posture estimation and TPA (tissue placement model) attention mechanism | |
CN114863937B (en) | Mixed bird song recognition method based on deep migration learning and XGBoost | |
CN111759345A (en) | Heart valve abnormality analysis method, system and device based on convolutional neural network | |
CN111160438A (en) | Acoustic garbage classification method adopting one-dimensional convolutional neural network | |
CN110929558A (en) | Pedestrian re-identification method based on deep learning | |
CN113010013A (en) | Wasserstein distance-based motor imagery electroencephalogram migration learning method | |
Xu et al. | Convolution neural network with coordinate attention for the automatic detection of pulmonary tuberculosis images on chest x-rays | |
CN111783719A (en) | Myoelectric control method and device | |
Bilang et al. | Cactaceae detection using MobileNet architecture | |
CN114295967A (en) | Analog circuit fault diagnosis method based on migration neural network | |
CN113627391A (en) | Cross-mode electroencephalogram signal identification method considering individual difference | |
Zhang et al. | IA-CNN: A generalised interpretable convolutional neural network with attention mechanism | |
CN104850735A (en) | Activity recognition method based on stack own coding | |
CN112336357A (en) | RNN-CNN-based EMG signal classification system and method | |
Mendes et al. | Subvocal speech recognition based on EMG signal using independent component analysis and neural network MLP | |
CN116206728A (en) | Rehabilitation training method and system based on sensor fusion and transfer learning | |
Hu et al. | Automatic heart sound classification using one dimension deep neural network |
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 |