CN116720056A - Enhancement decoding-based AE-GAN ECG signal reconstruction method - Google Patents

Enhancement decoding-based AE-GAN ECG signal reconstruction method Download PDF

Info

Publication number
CN116720056A
CN116720056A CN202310633288.5A CN202310633288A CN116720056A CN 116720056 A CN116720056 A CN 116720056A CN 202310633288 A CN202310633288 A CN 202310633288A CN 116720056 A CN116720056 A CN 116720056A
Authority
CN
China
Prior art keywords
noise
gan
ecg
layer
data
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
Application number
CN202310633288.5A
Other languages
Chinese (zh)
Inventor
马玉润
张爱华
王惠东
漆宇晟
李佳琪
陈诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lanzhou University of Technology
Original Assignee
Lanzhou University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Lanzhou University of Technology filed Critical Lanzhou University of Technology
Priority to CN202310633288.5A priority Critical patent/CN116720056A/en
Publication of CN116720056A publication Critical patent/CN116720056A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0475Generative networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Surgery (AREA)
  • Pathology (AREA)
  • Medical Informatics (AREA)
  • Signal Processing (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Physiology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Psychiatry (AREA)
  • Cardiology (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention relates to the technical field of physiological signal processing and analysis, and discloses an AE-GAN (analog to digital) signal reconstruction method based on enhancement decoding, which comprises the steps of constructing an AE-GAN hybrid neural network model, wherein the AE-GAN hybrid neural network model comprises a generator and a discriminator, the generator comprises an encoder and a decoder, the discriminator comprises a first full convolution layer, a full connection layer and a Sigmoid activation function layer, ECG signals containing different signal-to-noise ratio noises are input into the AE-GAN hybrid neural network model, and the reconstructed noise-free ECG signals are output after the processing; capturing ECG global features by using a GAN network, capturing ECG local time sequence features by adopting AE network convolution operation, adding an attention mechanism to avoid channel information loss of the network in the coding process, and designing a generator loss function integrated with a least square function, a distance function and a local maximum difference function which follow the Pierce chi-square divergence to overcome the gradient dispersion problem in the GAN network training process; with greater accuracy and stability in reconstructing the ECG signal.

Description

Enhancement decoding-based AE-GAN ECG signal reconstruction method
Technical Field
The invention relates to the technical field of physiological signal processing and analysis, in particular to an enhanced decoding-based AE-GAN (analog to digital) signal reconstruction method.
Background
Electrocardiogram (ECG) is a reflection of heart electrical activity on the surface of the human body and is a gold standard for clinical assessment of heart and cardiovascular health. With the increasing popularity of portable monitoring devices, the acquisition and analysis in the daily behavioral environment of ECG is becoming a research hotspot. However, the recording of long-term ECG is often affected by factors such as the acquisition device, body activity, electrode contact, etc., which results in the ECG acquired by the device containing various noise and interference (mainly including baseline wander noise, myoelectric interference, electrode interference, etc.). Even noise can overwhelm the ECG signal such that the monitoring device cannot properly acquire the physiological state. Therefore, developing related algorithms to remove ECG noise, reconstruct a clean ECG is a pre-important task for intelligent diagnosis of cardiovascular disease. The present invention addresses the above-described problems by providing a method for enhancing the reconstruction of decoded AE-GAN ECG signals.
The noise usually present in ECG is mainly Baseline Wander (BW) due to respiration (distribution band: 0.05-2 Hz), power frequency interference (50 Hz or 60 Hz), myoelectric interference (MA) due to Muscle movement (distribution band: 5-2000 Hz), electrode interference (EM) due to Electrode contact variation during movement. For removing the noise, the reconstruction of the clean ECG is carried out by researchers, and certain achievements are also obtained, and the existing electrocardiosignal noise reduction algorithm is mainly divided into: traditional noise reduction methods and noise reduction algorithms based on deep learning. The traditional electrocardiosignal filtering comprises an analog filtering and a digital filtering design, the analog filtering has poor filtering effect, the amplifying circuit is generally used as a hardware periphery, and the high-precision filtering of the main control end is realized by the digital filter. Common digital filtering includes: FIR/IIR filters, wavelet transform (Wavelet Transform, WT) filtering, empirical mode decomposition (Empirical Mode Decomposition, EMD) filtering, adaptive filters, and improved algorithms based on the above theory. Since the main energy of the ECG is concentrated at 0-100Hz and has overlapping frequency bands with the noise, the FIR/IIR filter has poor effect and is easy to generate group delay. The WT may decompose the ECG into different frequency bands, with the noise generally being distributed over the high frequency portions of the wavelet decomposition and the ECG signal being distributed primarily over the low frequency portions of the wavelet decomposition. Thus, reconstructing the ECG after processing the wavelet decomposed high frequency coefficients with either soft or hard thresholds may remove noise. The effect comparison of this approach relies on the selection of the wavelet mother function and the threshold. The EMD method decomposes the ECG into a plurality of eigenmode functions (Intrinsic Mode Functions, IMFs), then removes the noisiest mode function, and the remaining IMFs reconstruct the ECG. However, high frequency noise often mixes with QRS complex in multiple IMFs, which is prone to modal aliasing, and even distortion of QRS complex. To reduce the effects of modal aliasing, improved algorithms integrating empirical mode decomposition, variational mode decomposition, and others are largely introduced into the field of ECG denoising. Because ECG noise is complex in kind, and the signals themselves have large individual variability, pathological variability and serious influence on the signals by human body motion, accurate reconstruction of pure ECG often needs to be performed cooperatively by means of the above-mentioned various methods.
With the rapid development of machine learning and neural network technology, an ECG denoising and reconstruction algorithm based on data training is gradually proposed. The method can be divided into two types, one is to improve, optimize and update important parameters in the traditional noise reduction model based on machine learning training so as to achieve better noise reduction effect; the other is based on data training, and the neural network is utilized to decompose and reconstruct the ECG, so as to find a data reconstruction model corresponding to the point to point. For example, error back propagation neural networks are used in combination with variational modal decomposition for BW noise removal; constructing a supervised depth factor model, and removing linear superposition noise of the ECG; the compression coding and characterization learning capability of a self encoder (AE) is utilized to apply the self encoder to the ECG denoising, and the nonlinear relation between the noisy ECG and the feature vector is found by designing a proper coding process; because the generation of the antagonistic neural network (Generative Adversarial Net, GAN) can enable the generated signal to approximate to a pure signal from the global and local characteristics under the combined action of the generator and the discriminator, a learner introduces the signal into the field of ECG denoising, and a certain result is obtained. But single neural networks have certain limitations in facing complex and diverse noise of ECG. Among them, AE easily lose the detailed features of ECG during compression encoding, which may lead to loss of heart-transient pathological information, resulting in irreparable situations. In GAN applications, the structure of the generator and discriminator greatly affects the final noise reduction performance, so researchers often improve the performance of the network by introducing residual neural networks, deep convolutional neural networks, conditional convolutions, etc. into the generator, discriminator. However, noise reduction algorithms based on deep learning have the following problems: (1) Part of methods need to segment the ECG, the signal processing process is complex, and the stability is not high; (2) The ECG detail is rich, the pathological information is rich, the detail information is seriously lost while the noise is removed by the partial noise removal method, and the accuracy is to be improved.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention aims to provide an ECG signal reconstruction method based on enhanced decoding AE-GAN.
In order to achieve the above object, the present invention provides the following technical solutions:
an AE-GAN hybrid neural network model is constructed based on an enhanced decoded AE-GAN ECG signal reconstruction method, the AE-GAN hybrid neural network model comprises a generator and a discriminator, wherein the generator comprises an encoder and a decoder, the discriminator comprises a first full convolution layer, a full connection layer and a Sigmoid activation function layer, ECG signals containing myoelectric interference, baseline drift noise, electrode interference and mixed noise with different signal to noise ratios are input into the AE-GAN hybrid neural network model, and the reconstructed noiseless ECG signals are output after processing.
In the present invention, preferably, the generator is constructed of an AE network, and an attention mechanism is added to make the AE network model strengthen channel change information in a convolution operation.
In the present invention, it is preferable to add one SE layer after each deconvolution layer of the decoder to capture the channel relationship.
In the present invention, preferably, the loss function adopted by the generator is:
wherein the first term is a least squares loss function, L dist As a distance function, for characterizing global variability of the data; l (L) max For maximum variance, for characterizing the local variance of the data,representing noise signal->N represents the sample length, +.>Noise reduction signal, x, representing sample point i i A clean signal (i.e. tag data) representing sample point i, lambda 1 And lambda (lambda) 2 Is L dist And L max The weighting coefficients of (2) were set to 0.7 and 0.2, respectively, in the experiment.
In the present invention, preferably, the loss function employed by the discriminator is:
wherein the first term, x-p data (x) For the distribution of the real data x, D (x) is the result of the discriminator discriminating the clean signal, 1 is the label of the real sample (i.e. clean signal); in a second aspect of the present invention,representing noise signal->Is provided for the distribution of (a),for the discriminator to discriminate the result of the generated samples, -1 for the label data of the dummy samples (i.e. the generated samples), the formula is optimized with the aim of distinguishing the G generated samples by improving the resolving power.
In the present invention, preferably, the AE-GAN hybrid neural network model is trained using pre-processed ECG data, the pre-processing of the ECG data including:
s1, training data are prepared, and noise-containing ECG signal samples are obtained by adding myoelectric interference, baseline drift noise, electrode noise and mixed noise of the three types of noise to a clean ECG signal;
s2, carrying out data segmentation on 1024 points of each sample of the noisy ECG signal, and normalizing the data amplitude;
s3, dividing all data into training sets according to 95% and testing sets according to 5%.
In the present invention, preferably, the encoder includes 6 second full convolution layers, and the decoder includes 6 deconvolution layers and 6 SE layers, the deconvolution layers and the SE layers are alternately arranged, and the second full convolution layers are in jump connection with the deconvolution layers.
In the present invention, it is preferable to add a layer of PReLU activation function after each of the second full convolution layer and the deconvolution layer.
In the present invention, preferably, the discriminator includes 5 first full-convolution layers, 1 full-connection layers, and 1 Sigmoid activation function layers, the convolution kernel sizes of the first full-convolution layers are 16, 16,8 (step sizes are 2,4,4,4,1 respectively), and a layer of LeakyReLU activation function is connected after each first full-convolution layer.
In the present invention, it is preferable that both the generator and the discriminator use Adam optimizer with an initial learning rate of 0.0001,Batch size of 64.
Compared with the prior art, the invention has the beneficial effects that:
the method of the invention captures ECG global features by utilizing a GAN network, captures ECG local time sequence features by adopting AE network convolution operation, avoids channel information loss possibly occurring in the encoding process by adding an attention mechanism, and designs a generator loss function integrated with a least square function, a distance function and a local maximum difference function which follow the square divergence of the Pearson card to overcome the gradient dispersion problem existing in the GAN network training process; with greater accuracy and stability in reconstructing the ECG signal.
Drawings
Fig. 1 is a schematic structural diagram of an AE-GAN hybrid neural network model constructed by an ECG signal reconstruction method based on enhancement decoding of AE-GAN according to the present invention.
Fig. 2 is a schematic diagram of a generator according to the present invention.
Fig. 3 is a schematic diagram of a discriminator according to the invention.
Fig. 4 is a schematic diagram of the SE layer structure according to the present invention.
Fig. 5 is a diagram of a result of MA noise removal by an ECG signal reconstruction method based on enhancement decoding AE-GAN according to the present invention.
Fig. 6 is a diagram of a result of removing BW noise by an ECG signal reconstruction method based on enhanced decoding AE-GAN according to the present invention.
Fig. 7 is a graph of the result of EM noise removal by the enhancement decoding-based AE-GAN ECG signal reconstruction method according to the present invention.
Fig. 8 is a diagram of a result of removing ma+bw+em mixed noise by an ECG signal reconstruction method based on enhancement decoding AE-GAN according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1 to 3, an embodiment of the present invention provides an ECG signal reconstruction method based on enhancement decoding AE-GAN, based on a GAN model, combining a generator of the GAN model with an improved AE structure, which captures channel variation information by adding an S-E structure during decoding, thereby reducing loss of ECG detail information during AE, a discriminator of GAN is designed based on a full convolution structure, and is easy to generate gradient dispersion problem for training of conventional GAN based on a cross entropy loss function, the method designs a loss function integrated with a least square function, a distance function and a local maximum difference function following pearson chi-square divergence, according to a large number of experiments, the method has higher precision and stability in the aspect of reconstructing an ECG signal, and particularly comprises the steps of constructing an AE-GAN hybrid neural network model, wherein the AE-GAN hybrid neural network model comprises a generator and a discriminator, the generator comprises an encoder and a decoder, the discriminator comprises a first full convolution layer, a full connection layer and a Sigmoid activation function layer, inputting the ECG signals containing myoelectric interference, baseline drift noise, electrode interference and hybrid noise with different signal to the AE-GAN hybrid neural network model, and outputting the reconstructed noiseless ECG signals after processing.
Specifically, the generator is constructed by an AE network, and an attention mechanism is added to enable an AE network model to strengthen channel change information in convolution operation, so that accuracy of ECG signal reconstruction is improved.
Specifically, a SE layer is added after each deconvolution layer of the decoder, the SE layer is in an S-E (SE) structure to capture the channel relationship, so as to overcome the information loss caused by channel compression in the decoding process, as shown in fig. 4, the S-E structure inputs x, has a length L, and the number of channels is C, F tr Is a Transformation structure, which is realized by adopting a full convolution network and is implemented by F tr Operating with an output length L 2 The number of channels is C 2 The implementation steps of the u, S-E structure mainly comprise two operations of Squeeze and specification, the Squeeze uses global average pooling operation to compress space information into channels, the output length is 1, and the number of the channels is C 2 The following formula is shown:
the specification is used to capture the relationship between channels, first using a fully connected layer to compress the channels to C 2 Rate, after which the channel is restored to C by means of a fully connected layer 2 The activation functions of the two full connection layers respectively select a ReLU function:
and Sigmoid function:
output s is C after the specification operation 2 The vector of the dimensions is used to determine,
s=F ex (z,W)=σ(g(z,W))=σ(W 2 δ(W 1 z))
the weight of each value corresponding to the channel is multiplied by the corresponding weight of the input feature u, the importance screening of the features is carried out, the important features are given a high weight, and the useless features are given a low weight, so as to obtain
In this embodiment, the network loss function design: aiming at the gradient dispersion problem caused by the cross entropy loss function of the traditional GAN network, a new loss function integrated with a least square loss function, a distance function and a maximum local difference function is designed by combining with the ECG characteristics, so that the stability of ECG reconstruction is improved, wherein the loss function adopted by a generator is as follows:
wherein the first term is a least squares loss function, L dist As a distance function, for characterizing global variability of the data; l (L) max For maximum variance, for characterizing the local variance of the data,representing noise signal->N represents the sample length, +.>Noise reduction signal, x, representing sample point i i A clean signal (i.e. tag data) representing sample point i, lambda 1 And lambda (lambda) 2 Is L dist And L max The weighting coefficients of (2) are respectively set to 0.7 and 0.2 in the experiment;
the loss function employed by the discriminator is:
wherein the first term, x-p data () For the distribution of the real data x, D (x) is the result of the discriminator discriminating the clean signal, 1 is the label of the real sample (i.e. clean signal); in a second aspect of the present invention,representing noise signal->Is provided for the distribution of (a),for the discriminator to discriminate the result of the generated samples, -1 for the label data of the dummy samples (i.e. the generated samples), the formula is optimized with the aim of distinguishing the G generated samples by improving the resolving power.
Specifically, the AE-GAN hybrid neural network model is trained using pre-processed ECG data, including:
s1, preparing training data, and obtaining noisy ECG signal samples by adding myoelectric interference (MA), baseline drift noise (BW), electrode noise (EM) and mixed noise of the three types of noise with different signal-to-noise ratios (-1 dB,3dB,7 dB) to a clean ECG signal, wherein the clean ECG signal is derived from a public data set MIT-BIH Arrhythmia Database;
s2, carrying out data segmentation on 1024 points of each sample of the noisy ECG signal, and normalizing the data amplitude;
s3, dividing all data into training sets according to 95% and testing sets according to 5%.
Specifically, training the constructed AE-GAN hybrid neural network model by using preprocessed ECG data, wherein the noisy ECG signal of a training set is input into the AE-GAN hybrid neural network model for training, the learning rate is dynamically adjusted by Adam, so that iterative updating is realized along the negative gradient direction of gradient descent, and then all weights of the network are updated until a loss function is minimum, the iteration is ended, model training is ended, the noisy ECG signal of a testing set is input into the trained AE-GAN hybrid neural network model, a denoised ECG signal is obtained at an output end, the output is compared with a pure ECG signal in the corresponding testing set, namely, the signal-to-noise ratio (SNrimp) of performance indexes, the root mean square error (Root Mean Square Error, RMSE) and the percentage root mean square error (Percentage Root mean square Difference, PRD) are calculated to evaluate the effectiveness of a noise reduction algorithm;
where SNRimp represents the signal-to-noise ratio difference between the noise reduction signal and the original clean signal,
SNR imp =SNR out -SNR in
SNR imp the higher the value of (2), the better the noise reduction performance of the corresponding algorithm;
where RMSE is used to measure the error between the noise reduction signal and the original clean signal,
the smaller the value of RMSE, the smaller the error between the noise reduction signal and the original clean signal;
wherein PRD is used to measure the similarity between the reconstructed signal and the target signal,
the smaller the value of PRD, the higher the reconstruction similarity corresponding to the noise reduction method; in the above, x i Representing a clean ECG signal,representing a noisy ECG signal, < >>Representing the denoised ECG signal, N is the signal length over one calculation period.
In this embodiment, the encoder includes 6 second full-convolution layers, the decoder includes 6 deconvolution layers and 6 SE layers, the deconvolution layers are alternately arranged with the SE layers, the second full-convolution layers are in jump connection with the deconvolution layers, the convolution kernels of the full-convolution layers and the deconvolution layers are 32, and a layer of PReLU activation function is added after each layer of the second full-convolution layers and the deconvolution layers:
the discriminator comprises 5 layers of first full-convolution layers, 1 layer of full-connection layers and 1 layer of Sigmoid activation function layers, the convolution kernel sizes of the first full-convolution layers are 16, 16, 16, 16 and 8 in sequence, the step sizes are 2,4,4,4,1 respectively, and a layer of LeakyReLU activation function is connected after each first full-convolution layer:
wherein a is a very small slope;
the input of the discriminator is a noise-reduced ECG signal or a clean ECG signal, and the size of the discriminator is 1024 x 1; both the generator and the discriminator used Adam optimizer with an initial learning rate of 0.0001,Batch size of 64.
Working principle:
the method comprises the following overall steps:
1. preparing training data, outputting label data by a model, obtaining noise-containing ECG signals input by the model by adding myoelectric interference (MA), baseline drift noise (BW), electrode noise (EM) and mixed noise of the three types of noise with different signal-to-noise ratios (-1 dB,3dB,7 dB) to pure ECG signals, and carrying out data segmentation on 1024 points of each sample of the noise-containing ECG signals, wherein the normalized data amplitude is as follows:
wherein x is an input signal, x min Is the minimum value of 1024 sample point data, x max Maximum value of 1024 sample point data, x norm Normalized data; dividing all data into training sets of 95% and testing sets of 5%;
2. building a model structure, wherein the AE-GAN hybrid neural network model comprises a generator and a discriminator, wherein the generator comprises a connected encoder and a decoder, the encoder is composed of 6 second full convolution layers, each convolution kernel is 32 in size, and an activation function of each convolution output is a PReLU function:
wherein b is a learned slope, x is a neuron input, and the activation function can ensure that the neuron output still exists when the input is negative, so that a great deal of neuron death in the training process is avoided;
the decoder comprises 6 deconvolution layers and 6 SE layers, wherein the deconvolution layers and the SE layers are alternately arranged, and the SE layers in the decoder realize channel information compensation in the decoding process so as to reduce information loss generated by the reduction of the number of channels in the decoding process, and the PReLU function is selected by the activation function output by each deconvolution layer;
the discriminator 5 layer full convolution, one layer full concatenation and Sigmoid activation function layer is constructed as shown in fig. 3. The convolution kernel size of each layer of convolution is 16, 16,8, the step size is 2,4,4,4,1, and one layer of LeakyReLU activation function is connected after each layer of convolution layer, and the input of the discriminator is a noise-reduced ECG signal or a pure ECG signal, and the size is 1024 x 1.
3. Model training, estimating the corresponding generated data of the sample by the countermeasure process, namely the noise-removed ECG signalThe generator (denoted G) and discriminator (denoted D) of the overall hybrid neural network model are trained simultaneously: g based on the input data, i.e. noisy ECG signal (denoted +.>) Random noise z is assigned by the encoder output data, and observation data is generated via a decoder based on integrated channel enhancement>While the discriminator estimates +.>Probability from clean sample x. The optimization objective of G is to maximize the error probability of the discriminator so that it cannot distinguish between the generated data +.>And a clean sample x; d is optimized to distinguish G-generated samples by improving resolution. G and D enhance their respective abilities by way of resistance training. The overall objective function of this challenge process is a max-min equation solving the following equation:
wherein Pdata is the distribution of the clean ECG signal x and Pz is defined as the distribution of the generated data G (z). However, the above equation uses a cross entropy loss function, which tends to make the generated data distributed at the decision boundary be judged as true samples, so that the gradient dispersion problem of generator update occurs. Therefore, the method integrates a least square loss function, a distance function and a new loss function of a maximum local difference function, so as to improve the stability of ECG reconstruction;
4. the method comprises the steps of applying a model, firstly, enabling a noisy ECG signal with 1024 x 1 dimensionality to enter an encoder, and sequentially enabling the dimension change of an ECG characteristic vector output by convolution of each layer to be 1024 x 32, 512 x 64, 256 x 128, 128 x 256, 64 x 512 and 32 x 1024 through the encoder; next, the 32 x 1024 ECG feature data enters the decoder, and the dimension change of each layer of output signal is 64 x 512, 128 x 256, 256 x 128, 512 x 64, 1024 x 32, 1024 x 1; the decoder outputs a noise reduction signalThe reconstructed ECG signal can be input into a discriminator for discrimination, and the noise reduction signal is gradually converged and stabilized in the iterative training process.
As shown in fig. 5-8, the method of the present invention has effects of removing MA noise, BW noise, EM noise, and ma+bw+em mixed noise at-1 dB level. In the figure, the first row represents the noisy electrocardiogram signal, the second row represents the clean signal, and the third row represents the noise reduction signal, and it can be seen from the figure that the method of the invention can well filter noise while preserving the complete global and detailed characteristics of the ECG.
The foregoing description is directed to the preferred embodiments of the present invention, but the embodiments are not intended to limit the scope of the invention, and all equivalent changes or modifications made under the technical spirit of the present invention should be construed to fall within the scope of the present invention.

Claims (10)

1. An AE-GAN mixed neural network model is constructed, the AE-GAN mixed neural network model comprises a generator and a discriminator, the generator comprises an encoder and a decoder, the discriminator comprises a first full convolution layer, a full connection layer and a Sigmoid activation function layer, ECG signals containing myoelectric interference, baseline drift noise, electrode interference and mixed noise with different signal to noise ratios are input into the AE-GAN mixed neural network model, and the processed ECG signals without noise are output.
2. The enhancement decoding AE-GAN based ECG signal reconstruction method of claim 1, wherein the generator is constructed from an AE network and adds an attention mechanism to make the AE network model enhance channel change information in a convolution operation.
3. The enhancement decoded AE-GAN based ECG signal reconstruction method of claim 1, wherein a SE layer is added after each deconvolution layer of the decoder to capture channel relationships.
4. The enhancement decoded AE-GAN based ECG signal reconstruction method of claim 1, wherein the generator employs a loss function of:
wherein the first term is a least squares loss function, L dist As a distance function, for characterizing global variability of the data; l (L) max For maximum variance, for characterizing the local variance of the data,representing noise signal->N represents the sample length, +.>Noise reduction signal, x, representing sample point i i A clean signal (i.e. tag data) representing sample point i, lambda 1 And lambda (lambda) 2 Is L dist And L max The weighting coefficients of (2) were set to 0.7 and 0.2, respectively, in the experiment.
5. The enhancement decoded AE-GAN based ECG signal reconstruction method of claim 4, wherein the discriminator employs a loss function of:
wherein x to p data (x) For the distribution of the real data x, D (x) is the result of the discriminator discriminating the clean signal; in a second aspect of the present invention,representing noise signal->Distribution of->The result of generating the sample is identified for the identifier.
6. The enhancement decoding AE-GAN based ECG signal reconstruction method of claim 1, wherein the AE-GAN hybrid neural network model is trained with pre-processed ECG data, the pre-processing of the ECG data comprising:
s1, training data are prepared, and noise-containing ECG signal samples are obtained by adding myoelectric interference, baseline drift noise, electrode noise and mixed noise of the three types of noise to a clean ECG signal;
s2, carrying out data segmentation on 1024 points of each sample of the noisy ECG signal, and normalizing the data amplitude;
s3, dividing all data into training sets according to 95% and testing sets according to 5%.
7. The enhancement decoding AE-GAN based ECG signal reconstruction method of claim 1, wherein the encoder includes 6 second full-convolution layers, the decoder includes 6 deconvolution layers and 6 SE layers, the deconvolution layers alternate with the SE layers, and the second full-convolution layers are skip-connected with the deconvolution layers.
8. The enhancement decoded AE-GAN based ECG signal reconstruction method of claim 7, wherein a layer of the pralu activation function is added after each of the second full-convolution and deconvolution layers.
9. The enhancement decoding AE-GAN based ECG signal reconstruction method of claim 1, wherein the discriminator comprises 5 layers of a first full convolution layer, 1 layer of a full connection layer, and 1 layer of a Sigmoid activation function layer, the convolution kernels of the first full convolution layers are 16, 16, 16,8 in sequence, (step sizes are 2,4,4,4,1, respectively), and a layer of LeakyReLU activation function is connected after each of the first full convolution layers.
10. The enhancement decoded AE-GAN based ECG signal reconstruction method of claim 1, wherein both the generator and the discriminator use Adam optimizers with an initial learning rate of 0.0001,Batch size of 64.
CN202310633288.5A 2023-05-31 2023-05-31 Enhancement decoding-based AE-GAN ECG signal reconstruction method Pending CN116720056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310633288.5A CN116720056A (en) 2023-05-31 2023-05-31 Enhancement decoding-based AE-GAN ECG signal reconstruction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310633288.5A CN116720056A (en) 2023-05-31 2023-05-31 Enhancement decoding-based AE-GAN ECG signal reconstruction method

Publications (1)

Publication Number Publication Date
CN116720056A true CN116720056A (en) 2023-09-08

Family

ID=87870749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310633288.5A Pending CN116720056A (en) 2023-05-31 2023-05-31 Enhancement decoding-based AE-GAN ECG signal reconstruction method

Country Status (1)

Country Link
CN (1) CN116720056A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117972439A (en) * 2024-04-01 2024-05-03 长春理工大学 Heart rate prediction method and system based on enhanced spatial construction and generation countermeasure network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117972439A (en) * 2024-04-01 2024-05-03 长春理工大学 Heart rate prediction method and system based on enhanced spatial construction and generation countermeasure network

Similar Documents

Publication Publication Date Title
CN109784242B (en) Electroencephalogram signal denoising method based on one-dimensional residual convolution neural network
Singh et al. A new ECG denoising framework using generative adversarial network
CN108714026B (en) Fine-grained electrocardiosignal classification method based on deep convolutional neural network and online decision fusion
Smital et al. Adaptive wavelet wiener filtering of ECG signals
CN111814656B (en) Electrocardiosignal noise reduction method based on countermeasure generation network
CN110353672B (en) System and method for removing eye artifacts in electroencephalogram signals
WO2020228420A1 (en) Denoising autoencoder training method, electrocardiography signal denoising method, and apparatuses
Rasti-Meymandi et al. A deep learning-based framework For ECG signal denoising based on stacked cardiac cycle tensor
CN108618773A (en) A kind of Denoising of ECG Signal, device and a kind of ecg signal acquiring equipment
CN111657936B (en) Signal denoising method based on wavelet transformation and total variation regularization
CN111110224A (en) Electrocardiogram classification method and device based on multi-angle feature extraction
El B’charri et al. The ECG signal compression using an efficient algorithm based on the DWT
CN116720056A (en) Enhancement decoding-based AE-GAN ECG signal reconstruction method
CN117503057B (en) Epileptic seizure detection device and medium for constructing brain network based on high-order tensor decomposition
El Bouny et al. Convolutional denoising auto-encoder based awgn removal from ecg signal
Tan et al. Best wavelet function identification system for ECG signal denoise applications
Hou et al. Deep neural network denoising model based on sparse representation algorithm for ecg signal
Jin et al. A novel deep wavelet convolutional neural network for actual ecg signal denoising
Priyadharsini et al. An Efficient method for the removal of ECG artifact from measured EEG Signal using PSO algorithm
Nagal et al. Optimization of adaptive noise canceller with grey wolf optimizer for EEG/ERP signal noise cancellation
CN111493864B (en) EEG signal mixed noise processing method, equipment and storage medium
Banerjee et al. Noise cleaning of ECG on edge device using convolutional sparse contractive Autoencoder
Sinnoor et al. An ECG Denoising Method Based on Hybrid MLTP-EEMD Model.
NSVN et al. Optimal threshold estimation using cultural algorithm for EMD-DWT based ECG denoising
Wang et al. Deep Convolutional Generative Adversarial Network with LSTM for ECG Denoising

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