WO2021217873A1 - 心电信号中基线漂移的滤除方法、装置、设备及存储介质 - Google Patents

心电信号中基线漂移的滤除方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021217873A1
WO2021217873A1 PCT/CN2020/099571 CN2020099571W WO2021217873A1 WO 2021217873 A1 WO2021217873 A1 WO 2021217873A1 CN 2020099571 W CN2020099571 W CN 2020099571W WO 2021217873 A1 WO2021217873 A1 WO 2021217873A1
Authority
WO
WIPO (PCT)
Prior art keywords
ecg signal
signal sequence
sequence
value
sampling time
Prior art date
Application number
PCT/CN2020/099571
Other languages
English (en)
French (fr)
Inventor
申超波
郭维
阮晓雯
徐亮
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021217873A1 publication Critical patent/WO2021217873A1/zh

Links

Images

Classifications

    • 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

Definitions

  • This application relates to the technical field of data processing, and in particular to a method, device, equipment, and storage medium for filtering baseline drift in ECG signals.
  • ECG signal is a commonly used method for detecting and diagnosing cardiovascular diseases.
  • deep learning is introduced into this field. Deep learning can make up for the shortcomings of traditional filtering methods by extracting the deep features of the ECG signal.
  • most deep learning models learn by extracting noise-containing signal features to remove the noise contained in the signal. Therefore, it is necessary to obtain a clean ECG signal before inputting training samples for deep learning.
  • Baseline drift is the most common kind of ECG signal noise, and its amplitude is also the highest in ECG signals, and it is the easiest to find in the observed ECG signals. It originates from the influence of the human body's breathing on the organs, causing the baseline of the ECG signal to deviate from the normal baseline level, thereby affecting the shape of the ECG signal, and in severe cases, it will also affect the doctor's analysis and judgment of the signal.
  • the frequency of baseline drift is generally between 0.05 and 2 Hz, which belongs to low-frequency noise.
  • the current method used to filter baseline drift is mainly to filter it out with a high-pass filter.
  • the inventor realized that the frequency range of the ECG signal itself is 0.05-100 Hz, and the frequency of the baseline drift is within the frequency range of the ECG signal. Therefore, the use of a high-pass filter often leads to loss of the low frequency part of the ECG signal, which causes ST-segment distortion. In severe cases, it will also affect the final diagnosis.
  • the main purpose of this application is to solve the problem of characteristic loss in the process of filtering the baseline drift of the ECG signal.
  • the first aspect of the application provides a method for baseline drift in ECG signals, including:
  • the first ECG signal sequence is horizontally flipped and then forwardly input into a preset IIR filter, and interference filtering processing is performed to obtain a second ECG signal sequence;
  • the second ECG signal sequence is reversely inputted into the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence;
  • the third ECG signal sequence is used as an ECG signal filtered from baseline drift interference and output.
  • the second aspect of the present application provides a device for filtering baseline drift in ECG signals, including: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor communicate with each other through a wire Connect; the at least one processor calls the instructions in the memory, so that the filtering device for baseline drift in the ECG signal performs the following steps:
  • the first ECG signal sequence is horizontally flipped and then forwardly input into a preset IIR filter, and interference filtering processing is performed to obtain a second ECG signal sequence;
  • the second ECG signal sequence is reversely inputted into the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence;
  • the third ECG signal sequence is used as an ECG signal filtered from baseline drift interference and output.
  • the third aspect of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer, the computer executes the following steps:
  • the first ECG signal sequence is horizontally flipped and then forwardly input into a preset IIR filter, and interference filtering processing is performed to obtain a second ECG signal sequence;
  • the second ECG signal sequence is reversely inputted into the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence;
  • the third ECG signal sequence is used as an ECG signal filtered from baseline drift interference and output.
  • a fourth aspect of the present application provides a filtering device for baseline drift in an ECG signal, and the filtering device includes:
  • the preprocessing module is used to read the original ECG signal to be processed, and preprocess the original ECG signal to obtain the first ECG signal sequence;
  • the first filtering module is configured to reverse the first ECG signal sequence horizontally and forward it into a preset IIR filter, and perform filtering interference processing to obtain a second ECG signal sequence;
  • the second filtering module is configured to reversely input the second ECG signal sequence into the IIR filter after horizontally inverting, and perform correction delay phase processing to obtain a third ECG signal sequence;
  • the output module is used for outputting the third ECG signal sequence as an ECG signal filtered from baseline drift interference.
  • the axis is reversed, the frequency domain phase at this time is
  • the ECG signal passing through the filter is inverted again and passed through the filter in the reverse direction.
  • the phase of the ECG signal finally obtained is
  • the third ECG signal sequence when the third ECG signal sequence is output, there will be an early output of the signal at the amplitude mutation point. Therefore, the first ECG signal sequence is segmented at the amplitude mutation point and then inverted twice to eliminate the reverse timing output in advance, thereby retaining more characteristics of the ECG signal.
  • the distribution of the electrocardiogram signal obtained by the application is more smooth and uniform, and the possibility of distortion of the mutation point is reduced, which facilitates the extraction of the characteristics of the electrocardiogram signal.
  • This application can also be applied in the field of smart medical care, so as to promote the construction of smart cities.
  • FIG. 1 is a schematic diagram of a first embodiment of a method for filtering baseline drift in a central electrical signal according to an embodiment of this application;
  • FIG. 2 is a schematic diagram of a second embodiment of a method for filtering baseline drift in a central electrical signal according to an embodiment of this application;
  • FIG. 3 is a schematic diagram of a third embodiment of a method for filtering baseline drift in a central electrical signal according to an embodiment of this application;
  • FIG. 4 is a schematic diagram of a fourth embodiment of a method for filtering baseline drift in a central electrical signal according to an embodiment of this application;
  • FIG. 5 is a schematic diagram of an embodiment of a device for filtering baseline drift in a central electrical signal according to an embodiment of the application
  • FIG. 6 is a schematic diagram of another embodiment of a filtering device for baseline drift in a central electrical signal according to an embodiment of the application;
  • FIG. 7 is a schematic diagram of an embodiment of a filtering device for baseline drift in a central electrical signal according to an embodiment of the application.
  • the embodiments of the present application provide methods, devices, equipment, and storage media for filtering baseline drift in ECG signals.
  • the characteristic signal of the ECG signal is retained as much as possible, which is conducive to the feature extraction and classification of the ECG signal.
  • the ECG signal distribution obtained by the present application is smoother and more uniform, and the possibility of distortion of the mutation point is reduced, which is beneficial to extracting the characteristics of the ECG signal.
  • an embodiment of a method for filtering baseline drift in an ECG signal includes:
  • MATLAB is a common computer language and interactive environment for digital calculation and analysis.
  • the ECG signal is processed in MATLAB.
  • the raw ECG signal to be processed can be obtained in two ways: direct acquisition and database acquisition.
  • Direct acquisition means that the ECG signal is collected directly from the human body through the ECG signal acquisition system.
  • Database acquisition is to download the original data of the ECG signal from the database.
  • each sampling point of the ECG signal After loading the ECG signal in MATLAB, each sampling point of the ECG signal includes two values of sampling time and voltage. Taking the time as the independent variable and the voltage as the dependent variable, the corresponding functional relationship f(n) (n is the sampling time) can be obtained in MATLAB, which is the expression of the ECG signal in the time domain , Which is its first ECG signal sequence.
  • the first ECG signal sequence is horizontally inverted, it is forwardly input into a preset IIR filter, and the interference filtering process is performed to obtain a second ECG signal sequence;
  • Existing digital filters are common non-recursive filters, such as FIR filters.
  • the filter of this application uses an IIR filter.
  • the filter used in this embodiment is a digital filter in the MATLAB environment and is an elliptical passband filter in an IIR filter.
  • the first value and the last value of the fourth ECG signal sequence obtained by this equation are the last value and the first value of the first ECG signal sequence, respectively. In this way, the reversal of the first ECG signal sequence is realized.
  • the impulse response sequence is also called the unit sequence.
  • y impz(b,a,N) for the impulse response of a discrete system, where N is the number of all sampling time points in the ECG signal, that is, the length of the ECG signal.
  • the second ECG signal sequence is reversely input to the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence;
  • the operating environment is MATLAB.
  • the first value and the last value of the fifth ECG signal sequence obtained by this equation are the last value and the first value of the second ECG signal sequence, respectively. In this way, the reversal of the first ECG signal sequence is realized.
  • the baseline drift interference of the third ECG signal sequence has been filtered out.
  • the time domain diagram of the third ECG signal sequence is obtained through the plot() function.
  • the ECG signal passing through the filter is inverted again and passed through the filter in the reverse direction.
  • the phase of the ECG signal finally obtained is
  • another embodiment of the method for filtering baseline drift in the ECG signal includes:
  • the data obtained includes two types of data, one is the sampling time and the other is the voltage value, that is, the sampling value.
  • sampling time points are: 0, 1, 2, 3, 4, and the corresponding sampling values are: 10, 20, 10, 20, 10.
  • each sampling time point sequentially write the sampling time point and the sampling value into a preset two-dimensional array to obtain a first ECG signal sequence
  • the integer number of the array length is the number of sampled values, that is, the number of sampling time points.
  • the first ECG signal sequence is [01234]x[1020102010], which can also be expressed as (0, 10), (1, 20), (2, 10), (3, 20) and (4, 10).
  • the impulse response sequence is also called the unit sequence.
  • the filtering by the input filter can also be regarded as the process of convolving each sampling point of the ECG signal sequence with its time-corresponding impulse response sequence.
  • the used filter is an elliptical filter, and both the passband and stopband of the elliptical filter have Chebyshev ripple.
  • Input the parameters after selecting the filter type in advance, including sampling frequency (Fs), passband frequency (Wp), stopband frequency (Ws), passband fluctuation (Rp) and stopband minimum attenuation (Rs).
  • Fs sampling frequency
  • Wp passband frequency
  • Ws stopband frequency
  • Rp passband fluctuation
  • Rs stopband minimum attenuation
  • h(n) is the impulse response sequence corresponding to n at the sampling time point
  • "*" represents the convolution of the sequence.
  • the modulus of the filtered second ECG signal sequence is
  • the second ECG signal sequence is reversely input to the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence;
  • the third embodiment of the method for filtering baseline drift in the ECG signal includes:
  • the time point of the first sample value of the signal needs to be zero.
  • the if function is used to determine whether the sampling time point corresponding to the first sampling value of the ECG signal is zero.
  • f(n) is used to represent the time domain expression of the first ECG signal sequence. If the coordinate corresponding to the first point of the first ECG signal sequence is not the origin, after obtaining the length of the entire ECG signal, the value of len is brought into f(n) to obtain the last value in the ECG signal, namely f (len).
  • the first ECG signal sequence is horizontally flipped and then forwardly input into a preset IIR filter, and interference filtering processing is performed to obtain a second ECG signal sequence;
  • the second ECG signal sequence is reversely input to the IIR filter after being horizontally inverted, and the delay phase correction process is performed to obtain a third ECG signal sequence.
  • the fourth embodiment of the method for filtering baseline drift in the ECG signal includes:
  • the wavelet transform modulus maximum is defined as: if there is
  • the value point is the amplitude mutation point of the first ECG signal sequence.
  • the ECG signal is an unstable signal, there are points in the ECG signal sequence where the amplitude changes drastically, which are called mutation points.
  • the sudden change point is that the difference between the amplitude change and other stationary values is too large, so it is equivalent to introducing a new end point in the signal sequence.
  • the IIR filter is a recursive filter, the previous output value will have an impact on the next input value, so when filtering interference and baseline drift, the first signal sequence will have a certain distortion at the mutation point.
  • the mutation point is also a kind of sampling point, which includes the sampling value and the sampling time point. According to the size of the sampling time point and the sampling time point of the mutation point, the first ECG signal sequence is divided into two segments.
  • a signal sequence of length 2L+N is formed by adding L signal points at the front and rear ends of the signal sequence of length N.
  • the signal sequence added in the front is [2x(1)-x(3p+1), 2x(1)-x(3p),..., 2x(1)-x(2)]
  • the signal sequence added in the rear is [2x(N)-x(N-1), x(N)-x(N-2),..., 2x(N)-x(N-3p)], where p is the order.
  • the first value and the last value of the fifth ECG signal sequence obtained by this equation are the last value and the first value of the second ECG signal sequence, respectively. In this way, the reversal of the first ECG signal sequence is realized.
  • the fifth ECG signal is loaded, and the signal is filtered.
  • the modulus of the sixth ECG signal sequence is
  • , and the phase is Arg[Y(e jw) )] Arg[H(e -jw )]+Arg[Y 3 (e jw )].
  • the indicator often used to describe phase distortion is group delay, that is
  • ⁇ ( ⁇ ) is a function of ⁇ , it means that the system has a non-linear phase, and there is a relative time delay between the frequencies of the input signal, which will cause the time domain of the filtered signal to change, that is, the phenomenon of dispersion.
  • ⁇ ( ⁇ ) is zero, it means that the system has zero phase, there is no relative time delay between signal frequencies, and there is no time delay between input and output signals in the time domain.
  • the first ECG signal sequence is segmented. Therefore, the sixth ECG signal sequence obtained after filtering twice is a segmented sequence.
  • the sixth ECG signal sequence is combined according to the amplitude mutation point to obtain the third ECG signal sequence.
  • this method realizes that the group delay before and after filtering is zero, there is no relative time delay between the frequencies of the third ECG signal sequence, and the first ECG signal sequence and the third ECG signal sequence are in the time domain. There is also no time delay, thus avoiding the loss of characteristics of the ECG signal after passing through the filter.
  • this solution uses an extension signal sequence to smooth the two segments of the signal sequence. Reduce the impact of sudden changes on your own ECG signal.
  • the phase of the obtained ECG signal is
  • the characteristic signal of the ECG signal is retained as much as possible, which is beneficial to the feature extraction and classification and recognition of the ECG signal.
  • This application can also be applied in the field of smart medical care, so as to promote the construction of smart cities.
  • An embodiment of a device for filtering baseline drift in electrical signals includes:
  • the preprocessing module 501 is configured to read the original ECG signal to be processed, and preprocess the original ECG signal to obtain the first ECG signal sequence;
  • the first filtering module 502 is configured to forward input the preset IIR filter after horizontally inverting the first ECG signal sequence, and perform filtering interference processing to obtain a second ECG signal sequence;
  • the second filtering module 503 is configured to reversely input the second ECG signal sequence into the IIR filter after horizontally inverting, and perform correction delay phase processing to obtain a third ECG signal sequence;
  • the output module 504 is configured to use the third ECG signal sequence as an ECG signal filtered from baseline drift interference and output it.
  • the phase of the final ECG signal is
  • This application can also be applied in the field of smart medical care, so as to promote the construction of smart cities.
  • the second embodiment of the filtering device for baseline drift in the central electrical signal in the embodiment of the present application includes:
  • the preprocessing module 501 is configured to read the original ECG signal to be processed, and preprocess the original ECG signal to obtain the first ECG signal sequence;
  • the first filtering module 502 is configured to forward input the preset IIR filter after horizontally inverting the first ECG signal sequence, and perform filtering interference processing to obtain a second ECG signal sequence;
  • the second filtering module 503 is configured to reversely input the second ECG signal sequence into the IIR filter after horizontally inverting, and perform correction delay phase processing to obtain a third ECG signal sequence;
  • the output module 504 is configured to use the third ECG signal sequence as an ECG signal filtered from baseline drift interference and output it.
  • the preprocessing module 501 is specifically used for:
  • the sampling time point and the sampling value are sequentially written into a preset two-dimensional array to obtain the first ECG signal sequence.
  • a proofreading module 505 is further included, and the proofreading module 505 is specifically configured to:
  • the device for filtering baseline drift in the ECG signal further includes a continuation module 506, and the continuation module 506 is specifically configured to:
  • the wavelet transform modulus maximum method determines the amplitude mutation point in the first ECG signal sequence, wherein the formula of the wavelet transform modulus maximum method is,
  • the first ECG signal sequence is segmented; after the segmentation, the first signal sequence is added and extended, and Outputting the first signal sequence after adding a continuation sequence, wherein the continuation sequence is a preset signal sequence with a length of 3p, and the p is the order of the IIR filter.
  • the first filtering module 502 includes:
  • the first flip unit 5021 is used to horizontally flip the first ECG signal sequence to obtain a fourth ECG signal sequence, wherein the first value and the last value of the fourth ECG signal sequence are respectively the The last value and the first value of the first ECG signal sequence;
  • the determining unit 5022 is configured to determine the corresponding impulse response sequence according to the amplitude square function of the IIR filter
  • the first convolution unit 5023 is configured to forward convolve the fourth ECG signal sequence with the impulse response sequence to filter out the deviation caused by interference in the first ECG signal sequence to obtain the first ECG signal sequence. 2. ECG signal sequence.
  • the second filtering module 503 includes:
  • the second flip unit 5031 is used to horizontally flip the second ECG signal sequence to obtain a fifth ECG signal sequence, wherein the first value and the last value of the fifth ECG signal sequence are respectively the The last value and the first value of the second ECG signal sequence;
  • the second convolution unit 5032 is configured to reverse convolve the fifth ECG signal sequence and the impulse response sequence to correct the delayed phase generated by the forward convolution to obtain a sixth ECG signal sequence ;
  • the merging unit 5033 is configured to subtract the continuation sequence from the sixth signal sequence and merge to obtain a third ECG signal sequence according to the amplitude mutation point.
  • the third ECG signal sequence when the third ECG signal sequence is output, there will be an early output of the signal at the amplitude mutation point. Therefore, the first ECG signal sequence is segmented at the amplitude mutation point and then inverted twice to eliminate the reverse timing output in advance, thereby retaining more characteristics of the ECG signal.
  • the distribution of the electrocardiogram signal obtained by the application is more smooth and uniform, and the possibility of distortion of the mutation point is reduced, which facilitates the extraction of the characteristics of the electrocardiogram signal.
  • FIG. 7 is a schematic structural diagram of a filtering device for baseline drift in ECG signals according to an embodiment of the present application.
  • the filtering device 600 for baseline drift in ECG signals may have relatively large differences due to different configurations or performances. It may include one or more processors (central processing units, CPU) 610 (for example, one or more processors) and memory 620, and one or more storage media 630 (for example, one or more Storage equipment in Shanghai). Among them, the memory 620 and the storage medium 630 may be short-term storage or persistent storage.
  • the program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of command operations in the device 600 for filtering baseline drift in the ECG signal. Further, the processor 610 may be configured to communicate with the storage medium 630, and execute a series of instruction operations in the storage medium 630 on the device 600 for filtering baseline drift in the ECG signal.
  • the filtering device 600 based on baseline drift in the ECG signal may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and/or, one or more Operating system 631, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc.
  • Operating system 631 such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium may also be a volatile computer-readable storage medium.
  • the computer-readable storage medium stores instructions, and when the instructions run on the computer, the computer executes the steps of the method for filtering baseline drift in the ECG signal.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Biophysics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Power Engineering (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

一种基于心电信号中基线漂移的滤除方法、装置、设备及存储介质。该基于心电信号中基线漂移的滤除方法包括:读取待处理的原始心电信号,并对原始心电信号进行预处理,得到第一心电信号序列;将第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;将第二心电信号序列水平翻转后反向输入IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;将第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。

Description

心电信号中基线漂移的滤除方法、装置、设备及存储介质
本申请要求于2020年4月29日提交中国专利局、申请号为202010359177.6,发明名称为“心电信号中基线漂移的滤除方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种心电信号中基线漂移的滤除方法、装置、设备及存储介质。
背景技术
心电信号是一种常用的检测和诊断心血管疾病的方法。为了快速获得心电信号的诊断结果,深度学习被引入了这个领域。深度学习能够通过提取心电信号的深层特征,从而弥补传统的滤波方法的缺陷。但是深度学习大部分模型都是通过提取含噪音的信号特征来进行学习,从而去除信号所含噪声,因此这需要在输入深度学习的训练样本前需要获得干净的心电信号。
基线漂移是心电信号噪音中最为常见的一种,它的幅值也是心电信号中最高的,在观测到的心电信号中最容易发现。它源自于人体的呼吸对器官的影响,导致心电信号的基线偏离正常的基线水平,从而影响到心电信号的形态,严重时还会影响到医生对信号的分析判断。基线漂移的频率一般在0.05~2Hz之间,属于低频噪音。目前用于滤除基线漂移的方法主要是采用高通滤波器将其滤除。但是发明人意识到心电信号本身的频率范围为0.05~100Hz,基线漂移的频率在心电信号的频率范围内,因此采用高通滤波器往往导致心电信号的低频部分发生损失从而引起ST段失真,严重情况下还会影响最后的诊断结果。
发明内容
本申请的主要目的在于解决心电信号在滤除基线漂移过程中出现特征损失的问题。
本申请第一方面提供了一种心电信号中基线漂移方法,包括:
读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
本申请第二方面提供了一种心电信号中基线漂移的滤除设备,包括:存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互连;所述至少一个处理器调用所述存储器中的所述指令,以使得所述心电信号中基线漂移的滤除设备执行如下步骤:
读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
本申请第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有 指令,当其在计算机上运行时,使得计算机执行如下步骤:
读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
本申请第四方面提供了一种心电信号中基线漂移的滤除装置,所述滤除装置包括:
预处理模块,用于读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
第一滤除模块,用于将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
第二滤除模块,用于将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
输出模块,用于将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
本申请技术方案从数据库或心电图仪中获取心电信号后,将心电信号平移至数据起始点为0的位置,然后将平移后的心电信号以y=(N-1)/2作为对称轴进行反转,此时的频域相位为|e -jw(N-1)||Y 1(e jw)|,反转后再通过滤波器,此时的频域相位为|Y 2(e jw)|=|H(e jw)||Y 1(e jw)|。其后将通过滤波器的心电信号再次反转,反向通过滤波器,最后得到的心电信号的相位为|Y(e jw)|=|H(e jw))| 2|X(e jw)|,因此滤除前和滤除后的心电信号不存在相位差,也即零相位。从而尽可能地保留了心电信号的特征信号,有利于之后心电信号的特征提取和分类识别。此外在本方案中,输出的第三心电信号序列时会出现幅度突变点有信号的提前输出。因此将所述第一心电信号序列在幅度突变点分段再进行两次反转滤波,消除反时序提前输出,从而保留了更多的心电信号的特征。通过本申请获得的心电信号分布更为平缓和均一,且减少了突变点的发生畸变的可能,有利于提取心电信号的特征。本申请还可应用于智慧医疗领域中,从而推动智慧城市的建设。
附图说明
图1为本申请实施例中心电信号中基线漂移的滤除方法的第一个实施例示意图;
图2为本申请实施例中心电信号中基线漂移的滤除方法的第二个实施例示意图;
图3为本申请实施例中心电信号中基线漂移的滤除方法的第三个实施例示意图;
图4为本申请实施例中心电信号中基线漂移的滤除方法的第四个实施例示意图;
图5为本申请实施例中心电信号中基线漂移的滤除装置的一个实施例示意图;
图6为本申请实施例中心电信号中基线漂移的滤除装置的另一个实施例示意图;
图7为本申请实施例中心电信号中基线漂移的滤除设备的一个实施例示意图。
具体实施方式
本申请实施例提供了心电信号中基线漂移的滤除方法、装置、设备及存储介质。从数据库或心电图仪中获取心电信号后,将心电信号平移至数据起始点为0的位置,然后将平移后的心电信号以y=(N-1)/2作为对称轴进行反转,反转后再通过滤波器,其后将通过滤波器的心电信号再次反转,反向通过滤波器,滤除前和滤除后的心电信号不存在相位差,也即零相位。从而尽可能地保留了心电信号的特征信号,有利于之后心电信号的特征提取 和分类识别。此外通过本申请获得的心电信号分布更为平缓和均一,且减少了突变点的发生畸变的可能,有利于提取心电信号的特征。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中,心电信号中基线漂移的滤除方法的一个实施例包括:
101、读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
MATLAB是一种常见的数字计算分析的计算机语言和交互环境。在本实施例中,在MATLAB中处理心电信号。
首先获取待处理的第一心电信号序列。待处理的原始心电信号的获取可通过直接获取和数据库获取两种方式。
直接获取即通过心电信号采集系统直接从人体采集心电信号。数据库获取即从数据库中下载心电信号的原始数据。
在MATLAB中载入心电信号后,心电信号的每一个采样点包括采样时间和电压两个数值。将其中的时间作为自变量,电压作为因变量,则在MATLAB中可得到对应的函数关系f(n)(n为采样时间),该函数关系即为该心电信号在时域上的表达式,也即其第一心电信号序列。
102、将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
现有的数字滤波器都是常见的非递归型滤波器,比如FIR滤波器。而本申请的滤波器采用了IIR滤波器。
本实施例采用的滤波器为MATLAB环境下的数字滤波器且为IIR滤波器中,椭圆通带滤波器。
在MATLAB中加载获取的第一心电信号序列,并通过if函数判断该心电信号的第一个采样时间点是否为零。若不为零,则将第一心电信号序列进行平移,以使第一心电信号序列起始的采样时间点数值为零。
将第一心电信号序列带入方程y1(n)=x(N-1-n)的x(n)中,其中N表示第一心电信号序列的长度。
由于该方程是将x(n)函数以y=(N-1)/2位为对称轴进行对称,实现水平翻转。因此通过该方程得到的第四心电信号序列的第一个数值和最后一个数值分别为第一心电信号序列的最后一个数值和第一个数值。从而实现了第一心电信号序列的反向。
冲激响应序列也称为单位序列。在MATLAB中有一个求离散系统脉冲响应的专门函数y=impz(b,a,N),其中N为心电信号中所有采样时间点的数量,也就是心电信号的长度。通过此函数可将心电信号序列与滤波器的冲激响应序列进行卷积,得到过滤之后的第二心电信号序列。
103、将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
在本实施例中,运行环境为MATLAB。
将第二心电信号序列带入方程y(n)=x(N-1-n)的x(n)中,其中N表示第二心电 信号序列的长度。
由于该方程是将x(n)函数以y=(N-1)/2位为对称轴进行对称,实现水平翻转。因此通过该方程得到的第五心电信号序列的第一个数值和最后一个数值分别为第二心电信号序列的最后一个数值和第一个数值。从而实现了第一心电信号序列的反向。
104、将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
在本实施例中,第三心电信号序列与第一心电信号序列相比,基线漂移干扰已经被滤除。输出第三心电信号序列后通过plot()函数得到第三心电信号序列的时域图。
计算第一心电信号序列和第三心电信号序列的均值和方差,发现第三心电信号序列的方差较第一心电信号序列的方差小很多,使心电信号的第三心电信号序列波形分布更为均一,有利于后续更进一步的分析。
在本申请实施例中,从数据库或心电图仪中获取心电信号后,将心电信号平移至数据起始点为0的位置,然后将平移后的心电信号以y=(N-1)/2作为对称轴进行反转,此时的频域相位为|e -jw(N-1)||Y 1(e jw)|,反转后再通过滤波器,此时的频域相位为|Y 2(e jw)|=|H(e jw)||Y 1(e jw)|。其后将通过滤波器的心电信号再次反转,反向通过滤波器,最后得到的心电信号的相位为|Y(e jw)|=|H(e jw))| 2|X(e jw)|,因此滤除前和滤除后的心电信号不存在相位差,也即零相位。从而尽可能地保留了心电信号的特征信号,有利于之后心电信号的特征提取和分类识别。
请参阅图2,本申请实施例中,心电信号中基线漂移的滤除方法的另一个实施例包括:
201、读取待处理的原始心电信号
202、对所述原始心电信号进行采样,得到采样时间点和所述采样时间点对应的采样值;
在MATLAB中加载所述心电信号,通过MATLAB的处理模块将心电信号转换为由数字组成的数据。
由于心电信号是每隔一个采样时间,记录一次电压变化,因此得到的数据中包括两种类型数据,一个是采样时间,一个是电压值,也即采样值。
例如采样时间点分别为:0,1,2,3,4,对应的采样值为:10,20,10,20,10。
203、根据各采样时间点,依次将所述采样时间点和所述采样值写入预置二维数组中,得到第一心电信号序列;
预先设置一个空白数组,数组长度的整数数量即为采样值的数量,也就是采样时间点的数量。
将采样时间点和采样值进行一一对应后,将这两个数值按照时间顺序依次放置在空白数组中,第一心电信号序列为[01234]x[1020102010],也可表示为(0,10),(1,20),(2,10),(3,20)和(4,10)。
207、将所述第一心电信号序列水平翻转,得到第四心电信号序列,其中所述第四心电信号序列的第一个数值和最后一个数值分别为所述第一心电信号序列的最后一个数值和第一个数值;
将第一心电信号序列带入方程y1(n)=x(N-1-n)的x(n)中,其中N表示第一心电信号序列的长度。
由于该方程是将x(n)函数以y=(N-1)/2位为对称轴进行对称,实现水平翻转,因此通过该方程得到的第四心电信号序列的第一个数值和最后一个数值分别为第一心电信号序列的最后一个数值和第一个数值。从而实现了第一心电信号序列的反向。
208、根据所述IIR滤波器的幅度平方函数,确定对应的冲激响应序列,其中,所述IIR滤波器的幅度平方函数的表达式为
Figure PCTCN2020099571-appb-000001
其中,p表示所述IIR滤波 器的阶数,ε为波纹参数,Rp(W)为阶数p的,以输入频率W为自变量的有理函数;
当p为奇数时,
Figure PCTCN2020099571-appb-000002
当p为偶数时,
Figure PCTCN2020099571-appb-000003
其中Wi为输入频率,0<Wi<1且i=1,2,…k;
冲激响应序列也称为单位序列。输入滤波器进行滤波也可被视为心电信号序列的每一个采样点与其时间对应的冲激响应序列进行卷积的过程。
在本实施例中,所采用的滤波器为椭圆滤波器,椭圆滤波器的通带和阻带都具有切比雪夫波纹。
预先在选择滤波器类型后输入参数,包括采样频率(Fs)、通带频率(Wp)、阻带频率(Ws)、通带波动(Rp)和阻带最小衰减(Rs)。由这些参数可在预置的幅度平方函数模型基础上设计IIR滤波器的幅度平方函数。求得幅度平方函数后,即可得到该滤波器的冲激响应序列。
设置滤波器的长度M=64,采样频率fs=8000等等滤波器的特征频率,然后以采样频率的一半,对频率进行归一化,得到归一化后的频率wn_lpf=fc_lpf*2/fs。最后将参数M-1,wn_lpf代入预置的幅度平方函数,得到该滤波器的幅度平方函数(b_lpf)2,最后求得每个采样时间点的冲击响应序列m_lpf=10*log(abs(fft(b_lpf))2)。
设置完参数后点击“DesignFilter”即可得到所设计的IIR滤波器。
209、将所述第四心电信号序列与所述冲激响应序列进行正向卷积,以滤除所述第一心电信号序列中干扰产生的偏差,得到第二心电信号序列;
通过MATLAB的Simulink环境下的DigitalFilterDesign(数字滤波器)模块导入设计好的滤波器。得到第一心电信号序列反转后的第四心电信号序列后,加载第四心电信号序列,将第四心电信号序列输入预置的滤波器中对信号进行滤波。
函数表达式为y2=y1(n)*h(n)。其中h(n)为采样时间点为n对应的冲激响应序列,“*”表示序列的卷积。
进行滤波后的第二心电信号序列的模为|Y 2(e jw)|=|H(e jw)||Y 1(e jw)|。
210、将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
211、将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
请参阅图3,本申请实施例中,心电信号中基线漂移的滤除方法的第三个实施例包括:
301、读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
302、判断所述第一心电信号序列的第一个采样时间点的数值是否为零;
由于IIR滤波器的特性,需要将信号的第一个采样值的时间点为零。通过if函数判断该心电信号的第一个采样值对应的采样时间点是否为零。
建立一个len=length()函数,以获取整个心电信号的长度。
303、若否,则将所有采样值的采样时间点减去第一采样时间点的数值,以使所述第一心电信号序列的第一个采样时间点的数值为零;
在一个实施例中,用f(n)表示第一心电信号序列的时域表达式。若第一心电信号序列最开始的点对应的坐标不是原点,在获取整个心电信号的长度后,将len值带入到f(n)中,得到心电信号中最后一个值,即f(len)。预设一个变量temp,通过“=”将f(len)的值赋值至变量temp中以保护最后一个值。将最后一个值保护后,进入for循环中,通过 f(n-1)=f(n)将所有的点向前移位,直到该心电信号的最开始的值x对应的位置为0。再把temp赋值至f(len)中,完成整个原始心电信号序列的平移。
304、输出第一个采样时间点的数值为零的所述第一心电信号序列;
305、将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
306、将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
307、将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
请参阅图4,本申请实施例中,心电信号中基线漂移的滤除方法的第四个实施例包括:
401、读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
402、基于小波变换模极大值方法,确定所述第一心电信号序列中幅度突变点,其中,所述小波变换模极大值方法的公式为|Wf(s 0,n)|≤|Wf(s 0,n 0)|,|Wf(s 0,n)|为采样时间点n对应的模,s 0和n 0分别为所述幅度突变点对应的突变采样值和突变采样时间点;
小波变换模极大值定义为:若对属于n 0的某一领域内的任意点,有|Wf(s 0,n)|,则称(s 0,n 0)为小波变换的模极大值点,即所述第一心电信号序列的幅度突变点。
因为心电信号是一种不平稳的信号,因此在心电信号序列中存在幅值发生剧烈变化的点,被称为突变点。突变点由于幅值变化与其他平稳值差值过大,因此相当于在信号序列的此处引入了新的端点。而IIR滤波器是一种递归型滤波器,前一个输出值对下一个输入值会产生影响,因此在滤除干扰和基线漂移时,第一信号序列在突变点会发生一定的畸变。
403、根据所述幅度突变点对应的突变采样值s 0和突变采样时间点n 0,将所述第一心电信号序列分段;
突变点也是一种采样点,包含了采样值和采样时间点。根据采样时间点与突变点的采样时间点的大小,将第一心电信号序列分为两段。
404、对分段后所述第一信号序列进行增加延拓序列,并输出增加延拓序列后的所述第一信号序列,其中,所述延拓序列为,长度为3p的预置信号序列,所述p为所述IIR滤波器的阶数;
在本实施例中,取L=3p(p为滤波器阶数)为拓展长度。
在长度为N的信号序列前后两端各加上L个信号点构成长度为2L+N的信号序列。
在前方增加的信号序列为[2x(1)-x(3p+1),2x(1)-x(3p),…,2x(1)-x(2)],在后方增加的信号序列为[2x(N)-x(N-1),x(N)-x(N-2),…,2x(N)-x(N-3p)],其中p为阶数。
405、将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
406、将所述第二心电信号序列水平翻转,得到第五心电信号序列,其中所述第五心电信号序列的第一个数值和最后一个数值分别为所述第二心电信号序列的最后一个数值和第一个数值;
将第二心电信号序列带入方程y(n)=x(N-1-n)的x(n)中,其中N表示第二心电信号序列的长度。
由于该方程是将x(n)函数以y=(N-1)/2位为对称轴进行对称,实现水平翻转。因此通过该方程得到的第五心电信号序列的第一个数值和最后一个数值分别为第二心电信号序列的最后一个数值和第一个数值。从而实现了第一心电信号序列的反向。
407、将所述第五心电信号序列与所述冲激响应序列进行反向卷积,以校正所述正向卷积产生的延迟相位得到第六心电信号序列;
得到反转后的第五心电信号后,加载第五心电信号,对信号进行滤波。
第二次通过滤波器后,第六心电信号序列的模为|Y(e jw)|=|H(e -jw)||Y 2(e jw)|,相位为Arg[Y(e jw)]=Arg[H(e -jw)]+Arg[Y 3(e jw)]。
常用于描述相位失真的指针是群时延,即
Figure PCTCN2020099571-appb-000004
当τ(ω)为ω的函数时,表示系统具有非线性相位,输入信号的各频率之间具有相对时延,这将导致滤波后信号时域发生变化,即弥散现象。当τ(ω)为零时,表示系统零相位,信号频率之间不存在相对时延,输入和输出信号在时域上也没有时间延迟。
由上可知,将第六心电信号序列经过傅里叶变换可得|Y(e jw)|=|H(e jw)||Y 3(e jw)|=|H(e jw)| 2|X(e jw)|。
408、根据所述幅度突变点,将所述第六信号序列减去延拓序列后合并得到第三心电信号序列;
由于经过步骤302和步骤303,第一心电信号序列被分段。因此经过两次滤波后得到的第六心电信号序列为分段序列。
之后,将第六心电信号序列按照幅度突变点进行合并得到第三心电信号序列。
在一个实施例中,幅度突变点为s 0=0.6,n 0=500,第一心电信号序列被分为两段,则将第一段心电信号序列采样时间点从0到500的采样值与第二段心电序号采样时间点从500至最后一个采样时间点进行合并,得到第三心电信号序列。
由于合并后心电信号序列的模和相位不会发生改变,因此第三心电信号序列与未分段的第一心电信号序列没有发生相位变化。
所以,本方法实现了滤波前和滤波后的群时延为零,第三心电信号序列的频率之间不存在相对时延,第一心电信号序列和第三心电信号序列在时域上也没有时间延迟,从而避免了通过滤波器之后心电信号的特征损失。
409、将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
在实际应用中,信号序列的起始和结束端存在直流分量,滤波后的信号序列两段存在高频突变,为了克服这个问题,本方案采用延拓信号序列使信号序列的两段平滑,从而减少突变对本身心电信号的影响。同时,在第二次通过通过滤波器后,得到的心电信号的相位为|Y(e jw)|=|H(e jw))| 2|X(e jw)|,因此滤除前和滤除后的心电信号不存在相位差,也即零相位。从而尽可能地保留了心电信号的特征信号,有利于之后心电信号的特征提取和分类识别。本申请还可应用于智慧医疗领域中,从而推动智慧城市的建设。
上面对本申请实施例中心电信号中基线漂移的滤除方法进行了描述,下面对本申请实施例中心电信号中基线漂移的滤除装置进行描述,请参阅图5,本申请实施例中一种心电信号中基线漂移的滤除装置一个实施例包括:
预处理模块501,用于读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
第一滤除模块502,用于将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
第二滤除模块503,用于将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
输出模块504,用于将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
在本申请实施例中,从数据库或心电图仪中获取心电信号后,将心电信号平移至数据起始点为0的位置,然后将平移后的心电信号以y=(N-1)/2作为对称轴进行反转,此时的 频域相位为|e -jw(N-1)||Y 1(e jw)|,反转后再通过滤波器,此时的频域相位为|H(e jw)||Y 1(e jw)|。其后将通过滤波器的心电信号再次反转,反向通过滤波器,最后得到的心电信号的相位为|H(e jw))| 2|X(e jw)|,因此滤除前和滤除后的心电信号不存在相位差,也即零相位。从而尽可能地保留了心电信号的特征信号,有利于之后心电信号的特征提取和分类识别。本申请还可应用于智慧医疗领域中,从而推动智慧城市的建设。
请参阅图6,在本申请实施例中心电信号中基线漂移的滤除装置的第二个实施例包括:
预处理模块501,用于读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
第一滤除模块502,用于将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
第二滤除模块503,用于将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
输出模块504,用于将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
可选的,预处理模块501具体用于:
读取待处理的原始心电信号
对所述原始心电信号进行采样,得到采样时间点和所述采样时间点对应的采样值;
根据各采样时间点,依次将所述采样时间点和所述采样值写入预置二维数组中,得到第一心电信号序列。
可选的,所述预处理模块501和所述第一滤除模块702之间,还包括校对模块505,所述校对模块505具体用于:
断所述第一心电信号序列的第一个采样时间点的数值是否为零;若否,则将所有采样值的采样时间点减去第一采样时间点的数值,以使所述第一心电信号序列的第一个采样时间点的数值为零;输出第一个采样时间点的数值为零的所述第一心电信号序列。
可选的,所述心电信号中基线漂移的滤除装置还包括延拓模块506,所述延拓模块506具体用于:
基于小波变换模极大值方法,确定所述第一心电信号序列中幅度突变点,其中,所述小波变换模极大值方法的公式为,|Wf(s 0,n)|≤|Wf(s 0,n 0)|,所述n表示采样时间点,所述|Wf(s 0,n)|为所述采样时间点对应的模,所述s 0和所述n 0分别为所述幅度突变点对应的突变采样值和突变采样时间点;
根据所述幅度突变点对应的突变采样值s 0和突变采样时间点n 0,将所述第一心电信号序列分段;对分段后所述第一信号序列进行增加延拓序列,并输出增加延拓序列后的所述第一信号序列,其中,所述延拓序列为长度为3p的预置信号序列,所述p为所述IIR滤波器的阶数。
可选的,所述第一滤除模块502包括:
第一翻转单元5021,用于将所述第一心电信号序列水平翻转,得到第四心电信号序列,其中所述第四心电信号序列的第一个数值和最后一个数值分别为所述第一心电信号序列的最后一个数值和第一个数值;
确定单元5022,用于根据所述IIR滤波器的幅度平方函数,确定对应的冲激响应序列;
第一卷积单元5023,用于将所述第四心电信号序列与所述冲激响应序列进行正向卷积,以滤除所述第一心电信号序列中干扰产生的偏差,得到第二心电信号序列。
可选的,所述第二滤除模块503包括:
第二翻转单元5031,用于将所述第二心电信号序列水平翻转,得到第五心电信号序列,其中所述第五心电信号序列的第一个数值和最后一个数值分别为所述第二心电信号序列 的最后一个数值和第一个数值;
第二卷积单元5032,用于将所述第五心电信号序列与所述冲激响应序列进行反向卷积,以校正所述正向卷积产生的延迟相位得到第六心电信号序列;
合并单元5033,用于根据所述幅度突变点,将所述第六信号序列减去延拓序列后合并得到第三心电信号序列。
在本方案中,输出的第三心电信号序列时会出现幅度突变点有信号的提前输出。因此将所述第一心电信号序列在幅度突变点分段再进行两次反转滤波,消除反时序提前输出,从而保留了更多的心电信号的特征。通过本申请获得的心电信号分布更为平缓和均一,且减少了突变点的发生畸变的可能,有利于提取心电信号的特征。
上面图5和图6从模块化功能实体的角度对本申请实施例中的心电信号中基线漂移的滤除装置进行详细描述,下面从硬件处理的角度对本申请实施例中心电信号中基线漂移的滤除设备进行详细描述。
图7是本申请实施例提供的一种心电信号中基线漂移的滤除设备的结构示意图,该心电信号中基线漂移的滤除设备600可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)610(例如,一个或一个以上处理器)和存储器620,一个或一个以上存储应用程序833或数据632的存储介质630(例如一个或一个以上海量存储设备)。其中,存储器620和存储介质630可以是短暂存储或持久存储。存储在存储介质630的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括心电信号中基线漂移的滤除设备600中的一系列指令操作。更进一步地,处理器610可以设置为与存储介质630通信,在心电信号中基线漂移的滤除设备600上执行存储介质630中的一系列指令操作。
基于心电信号中基线漂移的滤除设备600还可以包括一个或一个以上电源640,一个或一个以上有线或无线网络接口650,一个或一个以上输入输出接口660,和/或,一个或一个以上操作系统631,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图7示出的心电信号中基线漂移的滤除设备结构并不构成对基于心电信号中基线漂移的滤除设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行心电信号中基线漂移的滤除方法的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种心电信号中基线漂移的滤除方法,其中,所述心电信号中基线漂移的滤除方法包括:
    读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
    将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
    将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
    将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
  2. 根据权利要求1所述的心电信号中基线漂移的滤除方法,其中,所述读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列包括:
    读取待处理的原始心电信号;
    对所述原始心电信号进行采样,得到采样时间点和所述采样时间点对应的采样值;
    根据各采样时间点,依次将所述采样时间点和所述采样值写入预置二维数组中,得到第一心电信号序列。
  3. 根据权利要求2所述的心电信号中基线漂移的滤除方法,其中,在所述读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列之后,还包括:
    判断所述第一心电信号序列的第一个采样时间点的数值是否为零;
    若否,则将所有采样值的采样时间点减去第一采样时间点的数值,以使所述第一心电信号序列的第一个采样时间点的数值为零;
    输出第一个采样时间点的数值为零的所述第一心电信号序列。
  4. 根据权利要求3所述的心电信号中基线漂移的滤除方法,其中,在所述将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列之前,还包括:
    基于小波变换模极大值方法,确定所述第一心电信号序列中幅度突变点;
    根据所述幅度突变点对应的突变采样值s 0和突变采样时间点n 0,将所述第一心电信号序列分段;
    对分段后所述第一信号序列进行增加延拓序列,并输出增加延拓序列后的所述第一信号序列,其中,所述延拓序列为长度为3p的预置信号序列,p为所述IIR滤波器的阶数;
    其中,所述小波变换模极大值方法的公式为|Wf(s 0,n)|≤|Wf(s 0,n 0)|,n为采样时间点,|Wf(s 0,n)|为所述采样时间点对应的模,s 0和n 0分别为所述幅度突变点对应的突变采样值和突变采样时间点。
  5. 根据权利要求4所述的心电信号中基线漂移的滤除方法,其中,所述将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列包括:
    将所述第一心电信号序列进行水平翻转,得到第四心电信号序列,其中所述第四心电信号序列的第一个数值和最后一个数值分别为所述第一心电信号序列的最后一个数值和第一个数值;
    根据所述IIR滤波器的幅度平方函数,确定对应的冲激响应序列;
    将所述第四心电信号序列与所述冲激响应序列进行正向卷积,以滤除所述第一心电信号序列中干扰产生的偏差,得到第二心电信号序列。
  6. 根据权利要求5所述的心电信号中基线漂移的滤除方法,其中,所述IIR滤波器的幅度平方函数的表达式为
    Figure PCTCN2020099571-appb-100001
    其中,ε为波纹参数,Rp(W)为阶数p的,以输入频率W为自变量的有理函数;
    当p为奇数时,
    Figure PCTCN2020099571-appb-100002
    当p为偶数时,
    Figure PCTCN2020099571-appb-100003
    其中Wi为输入频率,0<Wi<1且i=1,2,…k。
  7. 据权利要求6的心电信号中基线漂移的滤除方法,其中,所述将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列包括:
    将所述第二心电信号序列水平翻转,得到第五心电信号序列,其中所述第五心电信号序列的第一个数值和最后一个数值分别为所述第二心电信号序列的最后一个数值和第一个数值;
    将所述第五心电信号序列与所述冲激响应序列进行反向卷积,以校正所述正向卷积产生的延迟相位得到第六心电信号序列;
    根据所述幅度突变点,将所述第六信号序列减去延拓序列后合并,得到第三心电信号序列。
  8. 一种心电信号中基线漂移的滤除设备,其中,所述心电信号中基线漂移的滤除设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:
    读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
    将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
    将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
    将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
  9. 如权利要求8所述的心电信号中基线漂移的滤除设备,其中,所述计算机程序被所述处理器执行实现所述读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列时,包括如下步骤:
    读取待处理的原始心电信号;
    对所述原始心电信号进行采样,得到采样时间点和所述采样时间点对应的采样值;
    根据各采样时间点,依次将所述采样时间点和所述采样值写入预置二维数组中,得到第一心电信号序列。
  10. 如权利要求9所述的心电信号中基线漂移的滤除设备,其中,所述计算机程序被所述处理器执行实现所述读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列之后,包括如下步骤:
    判断所述第一心电信号序列的第一个采样时间点的数值是否为零;
    若否,则将所有采样值的采样时间点减去第一采样时间点的数值,以使所述第一心电信号序列的第一个采样时间点的数值为零;
    输出第一个采样时间点的数值为零的所述第一心电信号序列。
  11. 如权利要求10所述的心电信号中基线漂移的滤除设备,其中,所述计算机程序被所述处理器执行实现所述将所述第一心电信号序列水平翻转后正向输入预置IIR滤波 器,并进行滤除干扰处理,得到第二心电信号序列之前,包括如下步骤:
    基于小波变换模极大值方法,确定所述第一心电信号序列中幅度突变点;
    根据所述幅度突变点对应的突变采样值s 0和突变采样时间点n 0,将所述第一心电信号序列分段;
    对分段后所述第一信号序列进行增加延拓序列,并输出增加延拓序列后的所述第一信号序列,其中,所述延拓序列为长度为3p的预置信号序列,p为所述IIR滤波器的阶数;
    其中,所述小波变换模极大值方法的公式为|Wf(s 0,n)|≤|Wf(s 0,n 0)|,n为采样时间点,|Wf(s 0,n)|为所述采样时间点对应的模,s 0和n 0分别为所述幅度突变点对应的突变采样值和突变采样时间点。
  12. 如权利要求11所述的心电信号中基线漂移的滤除设备,其中,所述计算机程序被所述处理器执行实现所述将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列时,包括如下步骤:
    将所述第一心电信号序列进行水平翻转,得到第四心电信号序列,其中所述第四心电信号序列的第一个数值和最后一个数值分别为所述第一心电信号序列的最后一个数值和第一个数值;
    根据所述IIR滤波器的幅度平方函数,确定对应的冲激响应序列;
    将所述第四心电信号序列与所述冲激响应序列进行正向卷积,以滤除所述第一心电信号序列中干扰产生的偏差,得到第二心电信号序列。
  13. 如权利要求12所述的心电信号中基线漂移的滤除设备,其中,所述IIR滤波器的幅度平方函数的表达式为
    Figure PCTCN2020099571-appb-100004
    其中,ε为波纹参数,Rp(W)为阶数p的,以输入频率W为自变量的有理函数;
    当p为奇数时,
    Figure PCTCN2020099571-appb-100005
    当p为偶数时,
    Figure PCTCN2020099571-appb-100006
    其中Wi为输入频率,0<Wi<1且i=1,2,…k。
  14. 如权利要求13所述的心电信号中基线漂移的滤除设备,其中,所述计算机程序被所述处理器执行实现所述将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列时,包括如下步骤:
    将所述第二心电信号序列水平翻转,得到第五心电信号序列,其中所述第五心电信号序列的第一个数值和最后一个数值分别为所述第二心电信号序列的最后一个数值和第一个数值;
    将所述第五心电信号序列与所述冲激响应序列进行反向卷积,以校正所述正向卷积产生的延迟相位得到第六心电信号序列;
    根据所述幅度突变点,将所述第六信号序列减去延拓序列后合并,得到第三心电信号序列。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
    将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理, 得到第二心电信号序列;
    将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
    将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
  16. 如权利要求15所述的计算机可读存储介质,其中,当所述计算机指令在计算机上运行时,使得计算机还执行如下步骤:
    读取待处理的原始心电信号;
    对所述原始心电信号进行采样,得到采样时间点和所述采样时间点对应的采样值;
    根据各采样时间点,依次将所述采样时间点和所述采样值写入预置二维数组中,得到第一心电信号序列。
  17. 如权利要求16所述的计算机可读存储介质,其中,当所述计算机指令在计算机上运行时,使得计算机还执行如下步骤:
    判断所述第一心电信号序列的第一个采样时间点的数值是否为零;
    若否,则将所有采样值的采样时间点减去第一采样时间点的数值,以使所述第一心电信号序列的第一个采样时间点的数值为零;
    输出第一个采样时间点的数值为零的所述第一心电信号序列。
  18. 如权利要求17所述的计算机可读存储介质,其中,当所述计算机指令在计算机上运行时,使得计算机还执行如下步骤:
    基于小波变换模极大值方法,确定所述第一心电信号序列中幅度突变点;
    根据所述幅度突变点对应的突变采样值s 0和突变采样时间点n 0,将所述第一心电信号序列分段;
    对分段后所述第一信号序列进行增加延拓序列,并输出增加延拓序列后的所述第一信号序列,其中,所述延拓序列为长度为3p的预置信号序列,p为所述IIR滤波器的阶数;
    其中,所述小波变换模极大值方法的公式为|Wf(s 0,n)|≤|Wf(s 0,n 0)|,n为采样时间点,|Wf(s 0,n)|为所述采样时间点对应的模,s 0和n 0分别为所述幅度突变点对应的突变采样值和突变采样时间点。
  19. 如权利要求18所述的计算机可读存储介质,其中,当所述计算机指令在计算机上运行时,使得计算机还执行如下步骤:
    将所述第一心电信号序列进行水平翻转,得到第四心电信号序列,其中所述第四心电信号序列的第一个数值和最后一个数值分别为所述第一心电信号序列的最后一个数值和第一个数值;
    根据所述IIR滤波器的幅度平方函数,确定对应的冲激响应序列;
    将所述第四心电信号序列与所述冲激响应序列进行正向卷积,以滤除所述第一心电信号序列中干扰产生的偏差,得到第二心电信号序列。
  20. 一种心电信号中基线漂移的滤除装置,其中,所述心电信号中基线漂移的滤除装置包括:
    预处理模块,用于读取待处理的原始心电信号,并对所述原始心电信号进行预处理,得到第一心电信号序列;
    第一滤除模块,用于将所述第一心电信号序列水平翻转后正向输入预置IIR滤波器,并进行滤除干扰处理,得到第二心电信号序列;
    第二滤除模块,用于将所述第二心电信号序列水平翻转后反向输入所述IIR滤波器,并进行校正延迟相位处理,得到第三心电信号序列;
    输出模块,用于将所述第三心电信号序列作为滤除基线漂移干扰后的心电信号并输出。
PCT/CN2020/099571 2020-04-29 2020-06-30 心电信号中基线漂移的滤除方法、装置、设备及存储介质 WO2021217873A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010359177.6A CN111631707A (zh) 2020-04-29 2020-04-29 心电信号中基线漂移的滤除方法、装置、设备及存储介质
CN202010359177.6 2020-04-29

Publications (1)

Publication Number Publication Date
WO2021217873A1 true WO2021217873A1 (zh) 2021-11-04

Family

ID=72323699

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099571 WO2021217873A1 (zh) 2020-04-29 2020-06-30 心电信号中基线漂移的滤除方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111631707A (zh)
WO (1) WO2021217873A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114118175A (zh) * 2021-12-21 2022-03-01 中元汇吉生物技术股份有限公司 Maldi-tof质谱信号的预处理方法、设备及介质
CN114689968A (zh) * 2022-03-16 2022-07-01 河南翔宇医疗设备股份有限公司 一种电磁兼容试验中的滤波方法及相关装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5402795A (en) * 1992-10-14 1995-04-04 Delmar Avionics Electrocardiographic baseline filtering and estimation system with bidirectional filter
CN101361650A (zh) * 2007-08-07 2009-02-11 深圳市理邦精密仪器有限公司 Iir滤波器的零相位实现方法及零相位iir滤波装置
US20170215756A1 (en) * 2013-07-10 2017-08-03 Alivecor, Inc. Devices and methods for real-time denoising of electrocardiograms
CN107174262A (zh) * 2017-05-27 2017-09-19 西南交通大学 注意力评测方法和系统
CN107361753A (zh) * 2017-08-29 2017-11-21 哈尔滨理工大学 基于脉搏波形特征点的人体健康状态监护方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5402795A (en) * 1992-10-14 1995-04-04 Delmar Avionics Electrocardiographic baseline filtering and estimation system with bidirectional filter
CN101361650A (zh) * 2007-08-07 2009-02-11 深圳市理邦精密仪器有限公司 Iir滤波器的零相位实现方法及零相位iir滤波装置
US20170215756A1 (en) * 2013-07-10 2017-08-03 Alivecor, Inc. Devices and methods for real-time denoising of electrocardiograms
CN107174262A (zh) * 2017-05-27 2017-09-19 西南交通大学 注意力评测方法和系统
CN107361753A (zh) * 2017-08-29 2017-11-21 哈尔滨理工大学 基于脉搏波形特征点的人体健康状态监护方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JI YUE BO, QIN SHU REN, TANG BAO PING: "Digital Filtering with Zero Phase Error", JOURNAL OF CHONGQING UNIVERSITY(NATURAL SCIENCE EDITION), vol. 23, no. 6, 30 November 2000 (2000-11-30), pages 4 - 7, XP055862179, ISSN: 1000-582x *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114118175A (zh) * 2021-12-21 2022-03-01 中元汇吉生物技术股份有限公司 Maldi-tof质谱信号的预处理方法、设备及介质
CN114689968A (zh) * 2022-03-16 2022-07-01 河南翔宇医疗设备股份有限公司 一种电磁兼容试验中的滤波方法及相关装置

Also Published As

Publication number Publication date
CN111631707A (zh) 2020-09-08

Similar Documents

Publication Publication Date Title
Sun et al. ECG signal conditioning by morphological filtering
Ercelebi Electrocardiogram signals de-noising using lifting-based discrete wavelet transform
WO2021217873A1 (zh) 心电信号中基线漂移的滤除方法、装置、设备及存储介质
Al-Qawasmi et al. ECG signal enhancement using wavelet transform
Rasti-Meymandi et al. A deep learning-based framework For ECG signal denoising based on stacked cardiac cycle tensor
WO2022036968A1 (zh) 心电图数据增广方法、装置、电子设备及介质
CN110680308A (zh) 基于改进emd与阈值法融合的心电信号去噪方法
JP2015512293A (ja) Ecgモニタリングのためのシステムおよび方法
CN107341769A (zh) 一种心电信号除噪方法及系统
Houamed et al. ECG signal denoising by fractional wavelet transform thresholding
El Bouny et al. Convolutional denoising auto-encoder based awgn removal from ecg signal
Farahabadi et al. Detection of QRS complex in electrocardiogram signal based on a combination of hilbert transform, wavelet transform and adaptive thresholding
Cherkassky et al. Myopotential denoising of ECG signals using wavelet thresholding methods
Bhogeshwar et al. To verify and compare denoising of ECG signal using various denoising algorithms of IIR and FIR filters
Kollem et al. ECG Noise Removal Using FCN DAE Method
Subramaniam et al. Motion artifact suppression in the ECG signal by successive modifications in frequency and time
Chaturvedi et al. Analysis of ECG signal by Polynomial Approximation
Bhogeshwar et al. Study of structural complexity of optimal order digital filters for de-noising ECG signal
Malhotra et al. A real time wavelet filtering for ECG baseline wandering removal
Bakshi et al. FPGA Based Digital Filters Design to Remove Noise from ECG Signal
Reddy et al. A fast iterative filtering method for efficient denoising of phonocardiogram signals
Subramanian et al. Performance comparison of wavelet and multiwavelet denoising methods for an electrocardiogram signal
Mejhoudi et al. Implementation and evaluation of ECG signal processing algorithms on embedded architectures
Bhaskar et al. Minimization of base-line drift interference from ecg signal using fpga based adaptive filter
Vinutha et al. A novel signal-adaptive multi-feature extraction algorithm for arrhythmia detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20933408

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 21.03.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20933408

Country of ref document: EP

Kind code of ref document: A1