CN115054269A - ECG signal denoising method and system based on APSO-VMD algorithm - Google Patents

ECG signal denoising method and system based on APSO-VMD algorithm Download PDF

Info

Publication number
CN115054269A
CN115054269A CN202210649228.8A CN202210649228A CN115054269A CN 115054269 A CN115054269 A CN 115054269A CN 202210649228 A CN202210649228 A CN 202210649228A CN 115054269 A CN115054269 A CN 115054269A
Authority
CN
China
Prior art keywords
ecg signal
vmd
apso
algorithm
signal
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
CN202210649228.8A
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.)
Hunan Normal University
Original Assignee
Hunan Normal University
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 Hunan Normal University filed Critical Hunan Normal University
Priority to CN202210649228.8A priority Critical patent/CN115054269A/en
Publication of CN115054269A publication Critical patent/CN115054269A/en
Pending legal-status Critical Current

Links

Images

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]
    • A61B5/346Analysis of electrocardiograms
    • 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/7225Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • 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

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Molecular Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Public Health (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Psychiatry (AREA)
  • Physiology (AREA)
  • Cardiology (AREA)
  • Power Engineering (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses an ECG signal denoising method based on an adaptive particle swarm-variational modal decomposition (APSO-VMD) algorithm, which comprises the following implementation steps: acquisition of a raw ECG signal; inputting the ECG signal into a combination of APSO-VMD algorithm analog calculations (K, alpha); continuously updating the individual and global extremum by calculating a fitness function to finally find an optimal solution; and (3) carrying out ECG signal denoising by using the found optimal (K, alpha) to the VMD model. Compared with the traditional EMD and wavelet threshold denoising algorithms, the APSO-VMD algorithm has the highest signal-to-noise ratio (SNR) and Autocorrelation Coefficient (AC) and the smallest Mean Square Error (MSE), thereby ensuring the effective denoising and accurate reconstruction of the ECG signal. Researches prove that the ECG signal denoising method based on the APSO-VMD algorithm has a better denoising effect, and has the advantages of high signal reconstruction accuracy, simplicity in calculation, easiness in implementation and the like.

Description

ECG signal denoising method and system based on APSO-VMD algorithm
Technical Field
The invention relates to a technology for detecting and analyzing Electrocardiogram (ECG) of a human body. Specifically, an ECG signal denoising method and system based on an APSO-VMD algorithm are designed, and are used for realizing effective denoising and accurate waveform reconstruction of an ECG signal.
Background
The heart is made up of an infinite number of myocardial cells, and the electrical activity of the heart is essential to its normal pumping function. An Electrocardiogram (ECG) is a comprehensive reflection of electrophysiological activities of a cardiac muscle cell population, wherein cardiac muscle cells generate potential changes in the processes of depolarization and repolarization and are transmitted to the body surface through body tissues, and potential differences captured at different parts of the body surface through surface electrodes connected to limbs or the chest are ECG signals. The ECG signal can reflect the physiological status of each part of the heart to a certain extent, contains rich diagnostic information, and is widely applied to clinical diagnosis of arrhythmia, myocardial infarction, various cardiovascular diseases and autonomic nervous system disorder. The ECG signal is a nonlinear and non-stable human body bioelectricity signal, the amplitude range of the ECG signal is between 10 muV-4 mV under normal conditions, the ECG signal has weakness, low frequency and instability, and is very easy to be influenced by various interferences or additional activities of other parts of the heart, so that the ECG signal can be seriously distorted in the detection process, the accuracy of judging the heart diseases is greatly reduced, and the denoising becomes the primary problem of the ECG signal detection.
The main frequency range of the ECG signal is normally 0.05Hz to 100 Hz. The ECG noise mainly comprises power frequency interference, myoelectricity interference, baseline drift and the like. The power frequency interference can be well eliminated by an 50/60Hz wave trap, and for the elimination of the electromyographic interference and the baseline shift, various researchers have held different opinions and proposed a plurality of methods, including a digital filter method, a wavelet method, an empirical mode decomposition method and the like.
1. Digital filter method
The digital filter has the advantages of easy realization, high stability, flexible design and the like, and avoids the problems of voltage drift, temperature drift, noise and the like which cannot be overcome by an analog filter, so that along with the development of digital technology, the digital technology for realizing the functions of the filter is more and more noticed and widely applied by people. However, the conventional digital filtering method processes the ECG signal in the frequency domain, which may cause many useful signals to be filtered out due to the band aliasing of the ECG signal and the noise signal.
2. Wavelet method
Wavelet Transform (WT) is a time-frequency localization analysis method with multi-resolution characteristics, overcomes some defects of FFT and its improved algorithm, and is especially suitable for analysis of abrupt non-stationary signals. Its limitations, however, preclude its use: 1) the frequency domain resolution in WT is coarse and there may be severe frequency aliasing between bands, far from the level of FFT and its improved algorithms. 2) Wavelet functions of different scales interfere with each other in a frequency domain, are easily influenced by noise, and cannot well separate harmonics and inter-harmonics with relatively close frequencies. 3) The signal can be qualitatively analyzed by using the characteristics of the WT at the mutation point, and the WT has certain difficulty in directly detecting the amplitude of the signal. 4) WT has the disadvantages of large calculation amount, difficulty in real-time calculation, difficulty in realization by an embedded system and the like to different degrees. Moreover, the wavelet method has high selection dependency on the threshold, artificial noise may occur when the threshold is set too low, the ECG signal is damaged when the threshold is set too high, and the denoising effect is influenced by the selection of the wavelet basis.
3. Empirical mode decomposition method
The Empirical Mode Decomposition (EMD) is a method of signal Decomposition based on the time scale characteristics of the data itself without setting any basis function in advance. This is essentially different from the fourier decomposition and wavelet decomposition methods that are built on a priori harmonic basis functions and wavelet basis functions. Due to the characteristics, the EMD method can be theoretically applied to the decomposition of any type of signals, so that the EMD method has obvious advantages in processing non-stationary and non-linear data, is suitable for analyzing non-linear and non-stationary signal sequences and has high signal-to-noise ratio. The key of the method is empirical Mode decomposition, which can decompose a complex signal into a finite number of eigenmode functions (IMFs for short), and each decomposed IMF component contains local characteristic signals of different time scales of an original signal. Therefore, the EMD can adaptively decompose the noisy ECG signal into a series of Intrinsic Mode Function (IMF) components, discard the IMF component determined as noise, and reconstruct the remaining IMF component to obtain the denoised ECG signal, but modal aliasing usually exists between the IMF components, thereby affecting the denoising effect.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: aiming at the problems in the prior art, the invention provides an ECG signal denoising method and system based on an APSO-VMD algorithm. The invention skillfully utilizes an Adaptive Particle Swarm Optimization (APSO) algorithm to optimize and select the mode decomposition number K and the penalty factor alpha in the VMD algorithm, and overcomes the defects of low speed and poor algorithm generalization and the like depending on manual selection of (K, alpha) parameters in the traditional VMD algorithm. The APSO-VMD denoising algorithm provided by the invention obtains the lowest MSE, the highest SNR and the highest AC, and shows that the APSO-VMD denoising algorithm has stronger denoising capability; original waveform characteristics of the ECG signal are completely reserved, so that effective denoising and accurate reconstruction of the ECG signal are guaranteed.
In order to solve the technical problems, the invention adopts the technical scheme that:
an ECG signal denoising method based on an APSO-VMD algorithm is characterized by comprising the following implementation steps:
1) acquisition of a raw ECG signal;
2) inputting the ECG signal into a combination of APSO-VMD algorithm analog calculations (K, alpha);
3) continuously updating the individual and global extremum by calculating a fitness function to finally find an optimal solution;
4) and (3) carrying out ECG signal denoising by using the found optimal (K, alpha) to the VMD model.
Optionally, the detailed steps of step 1) include:
the main frequency range of the ECG signal is normally 0.05Hz to 100 Hz. The ECG noise mainly comprises power frequency interference, myoelectricity interference, baseline drift and the like.
The invention adopts the record of the MIT arrhythmia database 103 as a pure ECG signal, and adds 20dB Gaussian white noise and 0.3Hz baseline drift to simulate the ECG signal in a real environment.
Optionally, the detailed steps of step 2) include:
2.1) variational modal decomposition
Variational Modal Decomposition (VMD)) The method is a self-adaptive and completely non-recursive mode variation and signal processing method, and the VMD can decompose an actual signal f (t) number into K discrete modes u k (K-1, 2,3, …, K), unlike EMD algorithm, u is k The bandwidth in the frequency domain has specific sparse property, is an amplitude modulation and frequency modulation (AM-FM) signal, can effectively inhibit modal aliasing and endpoint effect which occur in EMD, and has firmer mathematical theoretical foundation. Each u in VMD k Closely surrounding the corresponding center frequency omega k And its bandwidth is obtained by gaussian smooth demodulation. The constraint variation problem during VMD processing is shown by the following equation:
Figure BDA0003687135240000031
Figure BDA0003687135240000032
in the above formula, { u k }={u 1 ,u 2 ,u 3 ,…,u k And { omega } and k }={ω 123 ,…,ω k are the set of decomposed K modes and their corresponding center frequencies, respectively.
And introducing a secondary penalty parameter alpha and a Lagrangian multiplier lambda (t) to solve the constraint variation problem of the formula. Wherein the augmented Lagrangian function is represented by the following formula:
Figure BDA0003687135240000033
obtaining the saddle point of the above formula by an alternative direction multiplier method, and iteratively updating u in a frequency domain k ,ω k And lambda.
The specific steps of the VMD to decompose the signal into K modal components are as follows:
(1) initialization
Figure BDA0003687135240000034
λ 1 And n is 0;
(2) and updating the modal function. The update can be done by adding wiener filtering on the frequency domain:
Figure BDA0003687135240000035
(3) and updating the center frequency.
Figure BDA0003687135240000036
In the above formula, the first and second carbon atoms are,
Figure BDA0003687135240000041
is the center frequency of the corresponding IMF power spectrum.
(4) The lagrange multiplier is updated.
Figure BDA0003687135240000042
The update is performed by the following formula,
Figure BDA0003687135240000043
in the above formula: τ is a noise margin parameter. When a signal contains strong noise, τ may be set to 0 in order to obtain a good noise reduction effect.
(5) Repeating the steps 2,3 and 4 until the iteration termination condition is met
Figure BDA0003687135240000044
In the above formula, ε is discrimination accuracy, ε is greater than 0
(6) And outputting a result to obtain K modal components.
The decomposition layer number K and the punishment factor alpha have the largest influence on the VMD decomposition result, and the quality of the denoising effect is directly influenced. Normally, the value of (K, α) needs to be manually selected before performing the variational modal decomposition, but the manual selection cannot make the variational modal decomposition achieve the best effect. Therefore, simply and directly selecting the parameters (K, α) is an urgent problem to be solved.
2.2) construction of variational mode model
Firstly, initializing a particle group in an APSO algorithm, determining the particle group scale, randomly generating a particle group speed matrix V and a position matrix P, and establishing mapping between the particle group position dimension and the variational modal decomposition layer number K and the penalty factor alpha, wherein the mapping relation is that the values of the decomposition layer number K and the penalty factor alpha correspond to the particle group speed matrix V and the position matrix P one by one.
Optionally, the detailed steps of step 3) include:
and finally, accumulating the useful IMF components, and calculating the dispersion entropy of each combination as a fitness value. The fitness function is a measure of the quality of the spatial position of the particle, and the smaller the fitness function is, the better the position of the particle is, which is defined as the following formula:
Figure BDA0003687135240000045
in the above formula, m is the signal dimension, c is the number of classes; p (i) is for each one of c m Relative frequency, x i Is a corresponding dispersion pattern of the embedded signal.
3.2) updating the iteration to find the optimal solution
Continuously updating the individual extreme value Pbest and the global extreme value Gbest of the particle swarm position through a fitness function, and continuously updating the speed of each particle as shown in the following formula:
Figure BDA0003687135240000051
Figure BDA0003687135240000052
in the above formula, t represents the current iteration number; w represents an inertia factor; c. C 1 And c 2 Represents a learning factor; r is 1 And r 2 Represents the interval [0,1]The random number of (2).
In order to realize nonlinear over-optimization and accelerate convergence speed, the self-adaptive inertia factor adjusting method is adopted, and the formula is shown as the following formula:
Figure BDA0003687135240000053
in the above formula, ζ represents the current fitness value of each particle; zeta min Representing the minimum fitness value of all current particles; zeta avg Representing the average fitness value of all the particles at present. The self-adaptive adjustment method adds the current fitness value of each particle as a variable into an adjustment strategy, and can adjust global and local optimization performance by continuously and dynamically adjusting the inertia factor w, so that the convergence speed is increased, and the global optimal solution is conveniently and quickly obtained.
Optionally, the detailed steps in step 4) are:
and when the minimum condition of the fitness function F is met, stopping iteration, wherein the global extreme value Gbest of the particle swarm is the optimal solution of the optimized variation mode, and the optimal decomposition layer number K and the penalty factor alpha which are searched by iteration are brought into the VMD model to realize effective denoising and accurate reconstruction of the ECG signal.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises:
a signal generating unit for generating an ECG signal;
the signal operation program unit is used for inputting the acquired ECG signal into the optimal decomposition layer number K and the penalty factor alpha which are searched by the APSO-VMD algorithm;
the VMD program unit is used for substituting the found optimal decomposition layer number K and the penalty factor alpha into a VMD algorithm to reconstruct the signal;
and the GUI display unit is used for displaying the waveform reconstructed by the VMD algorithm.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises a PC device, and is characterized in that the PC device is programmed or configured to execute the steps of the ECG signal denoising method based on the APSO-VMD algorithm according to any one of claims 1-5.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises a PC device, and is characterized in that the memory of the PC device is stored with an embedded program which is programmed or configured to execute the ECG signal denoising system based on the APSO-VMD algorithm according to any one of claims 1-5.
In addition, the present invention also provides a digital signal readable storage medium, which is characterized in that the digital signal readable storage medium stores an embedded program programmed or configured to execute the APSO-VMD algorithm-based ECG signal denoising method according to any one of claims 1 to 5.
In addition, the invention also provides an ECG signal denoising method and system based on the APSO-VMD algorithm, which comprises a power supply module, an analog-to-digital converter and PC equipment, wherein the output end of the power supply module is connected with the analog-to-digital converter, the analog-to-digital converter is connected with the PC equipment, and the PC equipment is programmed or configured to execute the steps of the ECG signal denoising method based on the APSO-VMD algorithm.
Compared with the prior art, the invention has the following advantages: according to the invention, after the filtered digital signal of the measured voltage is obtained, the VMD algorithm is adopted to effectively alleviate the problem of IMF mode aliasing in the EMD algorithm. The method utilizes the characteristics of high convergence rate and global optimization of the APSO algorithm to optimally select the modal decomposition number K and the penalty factor alpha in the VMD algorithm, and overcomes the defects of low speed and poor algorithm generalization and the like depending on manual selection of (K, alpha) parameters in the traditional VMD algorithm. The APSO-VMD denoising algorithm provided by the invention obtains the lowest MSE, the highest SNR and the highest AC, and shows that the APSO-VMD denoising algorithm has stronger denoising capability; the original waveform characteristics of the ECG signal are more completely preserved. The invention can realize effective denoising and accurate reconstruction of the ECG signal, and has the advantages of simple calculation, easy embedded realization and the like.
Drawings
FIG. 1 is a schematic diagram of a basic flow of a method according to an embodiment of the present invention.
FIG. 2 is a diagram of extracting useful modal components based on the APSO-VMD algorithm in the embodiment of the present invention.
FIG. 3 is a diagram of the denoising result of the ECG signal based on the APSO-VMD algorithm in the embodiment of the present invention.
FIG. 4 is a schematic structural diagram of an ECG signal denoising method and system based on an APSO-VMD algorithm in the embodiment of the present invention.
Detailed Description
Referring to fig. 1, the implementation steps of the ECG signal denoising method based on the APSO-VMD algorithm include:
1) acquisition of a raw ECG signal;
2) inputting the ECG signal into a combination of APSO-VMD algorithm analog calculations (K, alpha);
3) continuously updating the individual and global extremum by calculating a fitness function to finally find an optimal solution;
4) and (3) carrying out ECG signal denoising by using the found optimal (K, alpha) to the VMD model.
Optionally, the detailed steps of step 1) include:
the main frequency range of the ECG signal is normally 0.05Hz to 100 Hz. The ECG noise mainly comprises power frequency interference, myoelectricity interference, baseline drift and the like.
The invention adopts the record of the MIT arrhythmia database 103 as a pure ECG signal, and adds 20dB Gaussian white noise and 0.3Hz baseline drift to simulate the ECG signal in a real environment.
Optionally, the detailed steps of step 2) include:
2.1) variational modal decomposition
A Variational Modal Decomposition (VMD) is an adaptive, completely non-recursive modal variational and signal processing method, and the VMD can decompose an actual signal f (t) into K discrete modes u k (K-1, 2,3, …, K), unlike EMD algorithm, u is k The bandwidths in the frequency domain have specific sparse properties, are amplitude modulation and frequency modulation (AM-FM) signals, and can effectively inhibit modal aliasing and end points appearing in EMDAnd has more firm mathematical theoretical basis. Each u in VMD k Closely surrounding the corresponding center frequency omega k And its bandwidth is obtained by gaussian smooth demodulation. The constraint variation problem during VMD processing is shown by the following equation:
Figure BDA0003687135240000071
Figure BDA0003687135240000072
in the above formula, { u k }={u 1 ,u 2 ,u 3 ,…,u k And { omega } and k }={ω 123 ,…,ω k are the set of decomposed K modes and their corresponding center frequencies, respectively.
And introducing a secondary penalty parameter alpha and a Lagrangian multiplier lambda (t) to solve the constraint variation problem of the formula. Wherein the augmented Lagrangian function is represented by the following formula:
Figure BDA0003687135240000073
obtaining the saddle point of the above formula by an alternative direction multiplier method, and iteratively updating u in a frequency domain k ,ω k And lambda.
The specific steps of the VMD to decompose the signal into K modal components are as follows:
(1) initialization
Figure BDA0003687135240000074
λ 1 And n is 0;
(2) and updating the modal function. The update can be done by adding wiener filtering on the frequency domain:
Figure BDA0003687135240000075
(3) and updating the center frequency.
Figure BDA0003687135240000076
In the above formula, the first and second carbon atoms are,
Figure BDA0003687135240000077
is the center frequency of the corresponding IMF power spectrum.
(4) The lagrange multiplier is updated.
Figure BDA0003687135240000078
The update is performed by the following formula,
Figure BDA0003687135240000081
in the above formula: τ is a noise margin parameter. When a signal contains strong noise, τ may be set to 0 in order to obtain a good noise reduction effect.
(5) Repeating the steps 2,3 and 4 until the iteration termination condition is met
Figure BDA0003687135240000082
In the above formula, ε is discrimination accuracy, ε is greater than 0
(6) And outputting a result to obtain K modal components.
The decomposition layer number K and the punishment factor alpha have the largest influence on the VMD decomposition result, and the quality of the denoising effect is directly influenced. Normally, the value of (K, α) needs to be manually selected before performing the variational modal decomposition, but the manual selection cannot make the variational modal decomposition achieve the best effect. Therefore, simply and directly selecting the parameters (K, α) is an urgent problem to be solved.
2.2) construction of variational mode model
Firstly, initializing a particle group in an APSO algorithm, determining the particle group scale, randomly generating a particle group speed matrix V and a position matrix P, and establishing mapping between the particle group position dimension and the variational modal decomposition layer number K and the penalty factor alpha, wherein the mapping relation is that the values of the decomposition layer number K and the penalty factor alpha correspond to the particle group speed matrix V and the position matrix P one by one.
Optionally, the detailed steps of step 3) include:
and finally, accumulating the useful IMF components, and calculating the dispersion entropy of each combination as a fitness value. The fitness function is a measure of the quality of the spatial position of the particle, and the smaller the fitness function is, the better the position of the particle is, which is defined as the following formula:
Figure BDA0003687135240000083
in the above formula, m is the signal dimension, c is the number of classes; p (i) is for each one of c m Relative frequency, x i Is a corresponding dispersion pattern of the embedded signal.
3.2) updating the iteration to find the optimal solution
Continuously updating the individual extreme value Pbest and the global extreme value Gbest of the particle swarm position through a fitness function, and continuously updating the speed of each particle as shown in the following formula:
Figure BDA0003687135240000084
Figure BDA0003687135240000085
in the above formula, t represents the current iteration number; w represents an inertia factor; c. C 1 And c 2 Represents a learning factor; r is 1 And r 2 Represents the interval [0,1]The random number of (2).
In order to realize nonlinear over-optimization and accelerate convergence speed, the self-adaptive inertia factor adjusting method is adopted, and the formula is shown as the following formula:
Figure BDA0003687135240000091
in the above formula, ζ represents the current fitness value of each particle; zeta min Representing the minimum fitness value of all the current particles; zeta avg Representing the average fitness value of all the particles at present. The self-adaptive adjustment method adds the current fitness value of each particle as a variable into an adjustment strategy, and can adjust global and local optimization performance by continuously and dynamically adjusting the inertia factor w, so that the convergence speed is increased, and the global optimal solution is conveniently and quickly obtained.
Optionally, the detailed steps in step 4) are:
and when the minimum condition of the fitness function F is met, stopping iteration, wherein the global extreme value Gbest of the particle swarm is the optimal solution of the optimized variation mode, and the optimal decomposition layer number K and the penalty factor alpha which are searched by iteration are brought into the VMD model to realize effective denoising and accurate reconstruction of the ECG signal.
In the following, the ECG signal denoising method based on the APSO-VMD algorithm of the present embodiment is further realized through simulation, and a wavelet method, an EMD method and an APSO-VMD method are respectively adopted in the ECG denoising experiment, and the experimental results are shown in table 1.
TABLE 1 De-noising results of different algorithms on ECG signals
Figure BDA0003687135240000092
Referring to table 1, in the above three algorithms, the signal-to-noise ratio and autocorrelation coefficient of the processed ECG signal by the wavelet method are minimum, and the mean square error is maximum, whereas the signal obtained by processing the ECG signal by the method of the present invention has the highest signal-to-noise ratio and autocorrelation coefficient, and the minimum mean square error.
Therefore, simulation experiment results show that the method has the characteristics of good denoising effect, good robustness and the like, and can accurately and effectively reconstruct the original ECG signal. Compared with the existing detection method, the method has the advantages of good ECG signal denoising effect, simple calculation, easy embedded realization and the like.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises:
a signal generating unit for generating an ECG signal;
the signal operation program unit is used for inputting the obtained ECG signal into the optimal decomposition layer number K and the penalty factor alpha which are searched by the APSO-VMD algorithm;
the VMD program unit is used for substituting the found optimal decomposition layer number K and the penalty factor alpha into a VMD algorithm to reconstruct the signal;
and the GUI display unit is used for displaying the waveform reconstructed by the VMD algorithm.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises a PC device, and is characterized in that the PC device is programmed or configured to execute the steps of the ECG signal denoising method based on the APSO-VMD algorithm according to any one of claims 1-5.
In addition, the invention also provides an ECG signal denoising system based on the APSO-VMD algorithm, which comprises a PC device, and is characterized in that the memory of the PC device is stored with an embedded program which is programmed or configured to execute the ECG signal denoising system based on the APSO-VMD algorithm according to any one of claims 1-5.
In addition, the present invention also provides a digital signal readable storage medium, which is characterized in that the digital signal readable storage medium stores an embedded program programmed or configured to execute the APSO-VMD algorithm-based ECG signal denoising method according to any one of claims 1 to 5.
As shown in FIG. 2, the ECG signal input is screened for useful components in the VMD decomposition after finding the optimal decomposition level K and penalty factor alpha based on the APSO-VMD algorithm.
Referring to fig. 3, it can be seen that the denoised signal with useful modal component integration is compared with the noisy signal without baseline drift, and it is obvious from fig. 3 that the waveform shape trend is not changed and the interference noise is well filtered.
Referring to fig. 4, the power module 1 is used for supplying power to the analog-to-digital converter 2 and the Adalm 1000A/D acquisition 3, the ECG signal is converted into a digital signal by the analog-to-digital converter 2, the digital signal is transmitted to the PC4 by the Adalm 1000A/D acquisition 3, and the ECG signal denoising process based on the APSO-VMD algorithm is performed in the PC4, and the denoised ECG waveform is displayed.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.

Claims (10)

1. An ECG signal denoising method based on an APSO-VMD algorithm is characterized by comprising the following implementation steps:
1) acquisition of a raw ECG signal;
2) inputting the ECG signal into a combination of APSO-VMD algorithm analog calculations (K, alpha);
3) continuously updating the individual and global extremum by calculating a fitness function to finally find an optimal solution;
4) and substituting the found optimal (K, alpha) into the VMD model to realize the denoising of the ECG signal.
2. The APSO-VMD algorithm-based ECG signal denoising method of claim 1, wherein the detailed steps of step 1) include:
the main frequency range of the ECG signal is normally 0.05Hz to 100 Hz. The ECG noise mainly comprises power frequency interference, myoelectricity interference, baseline drift and the like.
The invention adopts the record of the MIT arrhythmia database 103 as a pure ECG signal, and adds 20dB Gaussian white noise and 0.3Hz baseline drift to simulate the ECG signal in a real environment.
3. The APSO-VMD algorithm-based ECG signal denoising method of claim 1, wherein the detailed step of step 2) comprises:
2.1) variational modal decomposition
Variational Modal Decomposition (VMD) is an adaptive, completely non-recursive method of modal variational and signal processing, and VMD can decompose an actual signal f (t) number into K discrete modes u k (K ═ 1,2,3, …, K), unlike the EMD algorithm, u k The bandwidth in the frequency domain has specific sparse property, is an amplitude modulation and frequency modulation (AM-FM) signal, can effectively inhibit modal aliasing and endpoint effect which occur in EMD, and has firmer mathematical theoretical foundation. Each u in VMD k Closely surrounding the corresponding center frequency omega k And its bandwidth is obtained by gaussian smooth demodulation. The constraint variation problem during VMD processing is shown by the following equation:
Figure FDA0003687135230000011
Figure FDA0003687135230000012
in the above formula, { u k }={u 1 ,u 2 ,u 3 ,…,u k And { omega } and k }={ω 123 ,…,ω k are the set of decomposed K modes and their corresponding center frequencies, respectively.
And introducing a secondary penalty parameter alpha and a Lagrangian multiplier lambda (t) to solve the constraint variation problem of the formula. Wherein the augmented Lagrangian function is represented by the following formula:
Figure FDA0003687135230000013
obtaining saddle points of the above formula by using an alternative direction multiplier method, and iteratively updating u in a frequency domain k ,ω k And lambda.
The specific steps of the VMD to decompose the signal into K modal components are as follows:
(1) initialization
Figure FDA0003687135230000021
λ 1 And n is 0;
(2) and updating the modal function. The update can be done by adding wiener filtering on the frequency domain:
Figure FDA0003687135230000022
(3) and updating the center frequency.
Figure FDA0003687135230000023
In the above formula, the first and second carbon atoms are,
Figure FDA0003687135230000024
is the center frequency of the corresponding IMF power spectrum.
(4) And updating the Lagrange multiplier.
Figure FDA0003687135230000025
The update is performed by the following formula,
Figure FDA0003687135230000026
in the above formula: τ is a noise margin parameter. When a signal contains strong noise, τ may be set to 0 in order to obtain a good noise reduction effect.
(5) Repeating the steps 2,3 and 4 until the iteration termination condition is met
Figure FDA0003687135230000027
In the above formula, ε is discrimination accuracy, ε is greater than 0
(6) And outputting a result to obtain K modal components.
The decomposition layer number K and the punishment factor alpha have the largest influence on the VMD decomposition result, and the quality of the denoising effect is directly influenced. Normally, the value of (K, α) needs to be manually selected before performing the variational modal decomposition, but the manual selection cannot make the variational modal decomposition achieve the best effect. Therefore, simply and directly selecting the parameters (K, α) is an urgent problem to be solved.
2.2) construction of variational mode model
Firstly, initializing a particle group in an Adaptive Particle Swarm (APSO) algorithm, determining the particle swarm size, randomly generating a particle swarm velocity matrix V and a position matrix P, and establishing mapping between the particle swarm position dimension and the variational modal decomposition layer number K and a penalty factor alpha, wherein the mapping relation is that the values of the decomposition layer number K and the penalty factor alpha correspond to the corresponding particle swarm velocity matrix V and the position matrix P one by one.
4. The APSO-VMD algorithm-based ECG signal denoising method of claim 1, wherein the detailed step of step 3) comprises:
3.1) calculating the fitness function
And finally, accumulating the useful IMF components, and calculating the dispersion entropy of each combination as a fitness value. The fitness function is a measure of the quality of the spatial position of the particle, and the smaller the fitness function is, the better the position of the particle is, which is defined as the following formula:
Figure FDA0003687135230000031
in the above formula, m is the signal dimension, c is the number of classes; p (i) is for each one of c m Relative frequency, x i Is a corresponding dispersion pattern of the embedded signal.
3.2) updating the iteration to find the optimal solution
Continuously updating the individual extreme value Pbest and the global extreme value Gbest of the particle swarm position through a fitness function, and continuously updating the speed of each particle as shown in the following formula:
Figure FDA0003687135230000032
Figure FDA0003687135230000033
in the above formula, t represents the current iteration number; w represents an inertia factor; c. C 1 And c 2 Represents a learning factor; r is 1 And r 2 Represents the interval [0,1]The random number of (2).
In order to realize nonlinear over-optimization and accelerate convergence speed, the self-adaptive inertia factor adjusting method is adopted, and the formula is shown as the following formula:
Figure FDA0003687135230000034
in the above formula, ζ represents the current fitness value of each particle; zeta min Representing the minimum fitness value of all current particles; zeta avg Representing the average fitness value of all the particles at present. The self-adaptive adjustment method adds the current fitness value of each particle as a variable into an adjustment strategy, and can adjust global and local optimization performance by continuously and dynamically adjusting the inertia factor w, so that the convergence speed is increased, and the global optimal solution is conveniently and quickly obtained.
5. The APSO-VMD algorithm-based ECG signal denoising method of claim 1, wherein the detailed steps in step 4) are:
and when the minimum condition of the fitness function F is met, stopping iteration, wherein the global extreme value Gbest of the particle swarm is the optimal solution of the optimized variation mode, and the optimal decomposition layer number K and the penalty factor alpha which are searched by iteration are brought into the VMD model to realize effective denoising and accurate reconstruction of the ECG signal.
6. An ECG signal denoising system based on an APSO-VMD algorithm is characterized by comprising:
a signal generating unit for generating an ECG signal;
the signal operation program unit is used for inputting the acquired ECG signal into the optimal decomposition layer number K and the penalty factor alpha which are searched by the APSO-VMD algorithm;
the VMD program unit is used for substituting the found optimal decomposition layer number K and the penalty factor alpha into a VMD algorithm to reconstruct the signal;
and the GUI display unit is used for displaying the waveform reconstructed by the VMD algorithm.
7. An APSO-VMD algorithm based ECG signal denoising system, comprising a PC device, wherein the PC device is programmed or configured to perform the steps of the APSO-VMD algorithm based ECG signal denoising method of any of claims 1-5.
8. An ECG signal denoising system based on an APSO-VMD algorithm, comprising a PC device, wherein the memory of the PC device stores an embedded program programmed or configured to execute the ECG signal denoising method based on the APSO-VMD algorithm according to any one of claims 1-5.
9. A digital signal readable storage medium, wherein the digital signal readable storage medium stores an embedded program programmed or configured to execute the APSO-VMD algorithm-based ECG signal denoising method according to any of claims 1-5.
10. The ECG signal denoising system based on the APSO-VMD algorithm is characterized by comprising a power supply module (1), an analog-to-digital converter (2), an Adalm 1000A/D acquisition (3) and a PC (4), wherein the output end of the power supply module (1) is respectively electrically connected with the analog-to-digital converter (2) and the Adalm 1000A/D acquisition (3), the output end of the analog-to-digital converter (2) is connected with the PC (4) through the Adalm 1000A/D acquisition (3), and the PC (4) is programmed or configured to execute the steps of the ECG signal denoising method based on the APSO-VMD algorithm according to any one of claims 1-5.
CN202210649228.8A 2022-06-10 2022-06-10 ECG signal denoising method and system based on APSO-VMD algorithm Pending CN115054269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210649228.8A CN115054269A (en) 2022-06-10 2022-06-10 ECG signal denoising method and system based on APSO-VMD algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210649228.8A CN115054269A (en) 2022-06-10 2022-06-10 ECG signal denoising method and system based on APSO-VMD algorithm

Publications (1)

Publication Number Publication Date
CN115054269A true CN115054269A (en) 2022-09-16

Family

ID=83199516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210649228.8A Pending CN115054269A (en) 2022-06-10 2022-06-10 ECG signal denoising method and system based on APSO-VMD algorithm

Country Status (1)

Country Link
CN (1) CN115054269A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117332221A (en) * 2023-09-26 2024-01-02 国网江苏省电力有限公司南通供电分公司 Noise reduction method and system for oil leakage ultrasonic signals of hydraulic mechanism
CN117541020A (en) * 2024-01-04 2024-02-09 山东合能科技有限责任公司 Scheduling management method and system for urban drainage pump station

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117332221A (en) * 2023-09-26 2024-01-02 国网江苏省电力有限公司南通供电分公司 Noise reduction method and system for oil leakage ultrasonic signals of hydraulic mechanism
CN117541020A (en) * 2024-01-04 2024-02-09 山东合能科技有限责任公司 Scheduling management method and system for urban drainage pump station
CN117541020B (en) * 2024-01-04 2024-03-22 山东合能科技有限责任公司 Scheduling management method and system for urban drainage pump station

Similar Documents

Publication Publication Date Title
Labate et al. Empirical mode decomposition vs. wavelet decomposition for the extraction of respiratory signal from single-channel ECG: A comparison
CN115054269A (en) ECG signal denoising method and system based on APSO-VMD algorithm
CN110680308B (en) Electrocardiosignal denoising method based on fusion of improved EMD and threshold method
CN111616697B (en) Electrocardiosignal denoising algorithm based on new threshold function wavelet transform
CN101642368B (en) Method and device for processing autonomic nervous function signals and testing system
Sayadi et al. Multiadaptive bionic wavelet transform: Application to ECG denoising and baseline wandering reduction
CN109359506B (en) Magnetocardiogram signal noise reduction method based on wavelet transformation
Ma et al. EMG signal filtering based on variational mode decomposition and sub-band thresholding
CN108338784A (en) The Denoising of ECG Signal of wavelet entropy threshold based on EEMD
Li et al. ECG denoising method based on an improved VMD algorithm
CN108577834A (en) A method of it is detected automatically for phase spike between epilepsy
CN112294340A (en) Method, system, storage medium and computer equipment for quickly and automatically removing myoelectric artifacts
CN104305992A (en) Interactive method for rapidly and automatically extracting fetus electrocardio
Iravanian et al. A novel algorithm for cardiac biosignal filtering based on filtered residue method
CN113109289A (en) Selection method of optimal wavelet denoising combination and THz spectrum denoising method
CN111493821B (en) PPG signal real-time denoising method based on MODWT and median filtering
CN112998704A (en) Wearable device blood oxygen saturation calculation method
Altay et al. Signal-to-noise ratio and mean square error improving algorithms based on newton filters for measurement ECG data processing
Elouaham et al. Combination time-frequency and empirical wavelet transform methods for removal of composite noise in EMG signals
El Khadiri et al. A Comparison of the Denoising Performance Using Capon Time-Frequency and Empirical Wavelet Transform Applied on Biomedical Signal.
Bhavsar Improved ECG Denoising using CEEMAN based on Complexity Measure and Nonlocal Mean Approach.
CN116584960A (en) Diaphragmatic electromyographic signal noise reduction method
Dubey et al. Two-stage nonlocal means denoising of ECG signals
Sun et al. An improved PPG denoising methodology based on EEMD and wavelet threshold
Elouaham et al. Filtering of biomedical signals by using complete ensemble empirical mode decomposition with adaptive noise

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication