CN108836305A - A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation - Google Patents
A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation Download PDFInfo
- Publication number
- CN108836305A CN108836305A CN201810429640.2A CN201810429640A CN108836305A CN 108836305 A CN108836305 A CN 108836305A CN 201810429640 A CN201810429640 A CN 201810429640A CN 108836305 A CN108836305 A CN 108836305A
- Authority
- CN
- China
- Prior art keywords
- wave
- ecg
- signal
- waves
- accuracy
- 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.)
- Granted
Links
- LKOHUNQOOYDYBV-UHFFFAOYSA-N CC(C)C(CC1)C1C1[O]2C3C=NC3CC12 Chemical compound CC(C)C(CC1)C1C1[O]2C3C=NC3CC12 LKOHUNQOOYDYBV-UHFFFAOYSA-N 0.000 description 2
- 0 CCC1N=C1* Chemical compound CCC1N=C1* 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7225—Details of analogue processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/725—Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Veterinary Medicine (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Public Health (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Physiology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Power Engineering (AREA)
- Cardiology (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
一种融合巴特沃斯滤波和小波变换的ECG特征提取方法,属于医学计算机技术领域。核心思想为:对原始ECG信号工频干扰进行了去噪处理;同时使用曲线拟合的方式,去基线漂移;在获取到较为精确的ECG信号后,使用差分阈值法和小波变换的方法分别对Q波、R波和S波分别进行定位,与专家标注的信息比对,分别调整阈值、尺度和平移量参数,得到最佳的定位结果。基于上述结果,针对Q波、R波和S波,分别选取差分阈值或者小波变换方法进行定位。本发明能够对原始的ECG信号进行更为精确的去噪处理,并且,能够实现QRS波的精确定位,为心电图的数字化分析提供基础。
An ECG feature extraction method combining Butterworth filter and wavelet transform belongs to the field of medical computer technology. The core idea is: to denoise the original ECG signal power frequency interference; at the same time, use the curve fitting method to remove the baseline drift; The Q wave, R wave, and S wave are positioned separately, compared with the information marked by experts, and the threshold, scale, and translation parameters are adjusted respectively to obtain the best positioning results. Based on the above results, for Q wave, R wave and S wave, the differential threshold or wavelet transform method is selected for positioning. The invention can perform more accurate denoising processing on the original ECG signal, and can realize the precise positioning of the QRS wave, so as to provide a basis for the digitized analysis of the electrocardiogram.
Description
技术领域technical field
本发明涉及一种心电信号特征提取的方法,尤其涉及一种融合巴特沃斯滤波和小波变换的ECG特征提取方法,属于医学计算机技术领域。The invention relates to a method for extracting features of electrocardiographic signals, in particular to a method for extracting ECG features combined with Butterworth filter and wavelet transform, and belongs to the technical field of medical computers.
背景技术Background technique
长久以来,心血管疾病因其高发病率和高死亡率严重威胁着人类的健康和生命。局世界卫生组织(WHO)估计,目前世界上每年有3600万人死于心血管疾病、糖尿病、呼吸系统疾病和恶性肿瘤等非传染性疾病,占全球死亡总数的2/3,到2020年,数目要攀升到4400万。For a long time, cardiovascular disease has seriously threatened human health and life because of its high morbidity and high mortality. The World Health Organization (WHO) estimates that 36 million people die each year from non-communicable diseases such as cardiovascular disease, diabetes, respiratory system disease and malignant tumors in the world, accounting for 2/3 of the total global deaths. By 2020, The number will climb to 44 million.
《中国心血管病报告(2015)》显示,2014年中国心血管病死亡率仍居疾病死亡构成的首位,高于肿瘤及其他疾病。2014年农村心血管病死亡率为295.63/10万,其中心脏病死亡率为143.72/10万,脑血管病死亡率为151.91/10万(脑出血74.51/10万,脑梗死45.30/10万);城市心血管病死亡率为261.99/10万,其中心脏病死亡率为136.21/10万,脑血管病死亡率为125.78/10万(脑出血52.25/10万,脑梗死41.99/10万)。随着中国社会老龄化步伐的加速,这些数据均在快速增长,心血管疾病已成为我国的重大公共卫生问题之一。所以,心脏类疾病的预防、诊断和治疗尤为重要,是当今医学人员的巨大挑战和研究热点。The "China Cardiovascular Disease Report (2015)" shows that in 2014, the mortality rate of cardiovascular disease in China still ranked first in the composition of disease deaths, higher than that of tumors and other diseases. In 2014, the mortality rate of cardiovascular disease in rural areas was 295.63/100,000, of which the mortality rate of heart disease was 143.72/100,000, and the mortality rate of cerebrovascular disease was 151.91/100,000 (cerebral hemorrhage 74.51/100,000, cerebral infarction 45.30/100,000) The mortality rate of cardiovascular diseases in the city is 261.99/100,000, of which the mortality rate of heart disease is 136.21/100,000, and the mortality rate of cerebrovascular disease is 125.78/100,000 (cerebral hemorrhage 52.25/100,000, cerebral infarction 41.99/100,000). With the acceleration of the aging of Chinese society, these data are increasing rapidly, and cardiovascular disease has become one of the major public health problems in our country. Therefore, the prevention, diagnosis and treatment of heart diseases are particularly important, which is a huge challenge and research hotspot for medical personnel today.
心电图(Electrocardiogram,ECG)检查通过放置在人体表面不同部位的电极,记录也肌细胞在每个也动周期收缩和舒张的过程中产生的电流,同时记录电流随心动周期方向和强弱的变化趋势并实时描绘心电变化曲线,用以判断心脏电活动的情况,可以判断心肌细胞是否死亡、是否存在缺血、是否存在冲动传导异常,并记录具有临床意义的特征性心电图改变。除此之外,某些电解质紊乱的疾病心电图也有特征性改变。如高钾血症会出现T波高尖、QT间期缩短,血钙降低会出现ST段延长等;进行ECG信号的特征提取对临床研究具有重要的意义。Electrocardiogram (ECG) records the current generated by muscle cells during the contraction and relaxation of each motor cycle through electrodes placed on different parts of the human body surface, and also records the change trend of the current with the direction and strength of the cardiac cycle And draw the ECG change curve in real time to judge the electrical activity of the heart. It can determine whether the myocardial cells are dead, whether there is ischemia, whether there is abnormal impulse conduction, and record the characteristic ECG changes with clinical significance. In addition, there are also characteristic changes in the electrocardiogram of certain electrolyte disorders. For example, hyperkalemia will lead to high peak T waves, shortened QT interval, and low blood calcium will cause ST segment prolongation, etc. The feature extraction of ECG signals is of great significance to clinical research.
但在心电信号的检测过程中,存在工频干扰、环境噪声等因素的影响,影响了测量时的精度。并且目前由于心电图的智能分析的准确性和可靠性并不能与心脏病专家的分析相提并论,所以它在实际临床应用中的比例并不大。However, in the detection process of the ECG signal, there are factors such as power frequency interference and environmental noise, which affect the accuracy of the measurement. And at present, because the accuracy and reliability of the intelligent analysis of the electrocardiogram cannot be compared with the analysis of cardiologists, so its proportion in actual clinical application is not large.
发明内容Contents of the invention
本发明的目的在于进一步提高现有心电信号的采集准确度以及各个QRS波段的精确检测,提出了一种融合巴特沃斯滤波和小波变换的ECG特征提取方法。The purpose of the present invention is to further improve the acquisition accuracy of existing electrocardiographic signals and the precise detection of each QRS band, and proposes an ECG feature extraction method combining Butterworth filter and wavelet transform.
本发明的核心思想为:对原始ECG信号工频干扰进行了去噪处理;同时使用曲线拟合的方式,去基线漂移;在获取到较为精确的ECG信号后,使用差分阈值法和小波变换的方法分别对Q波、R波和S波分别进行定位,与专家标注的信息比对,分别调整阈值、尺度和平移量参数,得到最佳的定位结果。The core idea of the present invention is: to denoise the original ECG signal power frequency interference; at the same time use the way of curve fitting to remove the baseline drift; Methods The Q wave, R wave and S wave were respectively positioned, compared with the information marked by experts, and the threshold, scale and translation parameters were adjusted respectively to obtain the best positioning results.
一种融合巴特沃斯滤波和小波变换的ECG特征提取方法,包括如下步骤:An ECG feature extraction method that combines Butterworth filter and wavelet transform, comprising the steps of:
步骤A、对原始ECG信号进行频谱分析得出最高频率和最低频率,再使用巴特沃斯滤波器对原始ECG信号进行滤波处理,得到滤波后的ECG1信号;步骤A又具体包括如下子步骤:Step A, performing spectrum analysis on the original ECG signal to obtain the highest frequency and the lowest frequency, and then using the Butterworth filter to filter the original ECG signal to obtain the filtered ECG 1 signal; Step A specifically includes the following sub-steps:
SA.1通过公式(1)使用离散傅里叶变换的方法,对ECG信号的频谱进行分析,得到ECG信号频谱X(ejω),进一步得ECG信号的最高频率f1以及工频干扰和其他噪声干扰频段的最低频率f2;SA.1 Use the discrete Fourier transform method to analyze the spectrum of the ECG signal through the formula (1) to obtain the ECG signal spectrum X(e jω ), and further obtain the highest frequency f 1 of the ECG signal, power frequency interference and other The lowest frequency f 2 of the noise interference frequency band;
其中,X(ejω)为ECG信号的频谱,ω为ECG信号的频率,ECG(n)为ECG信号的第n个幅值;Wherein, X(e jω ) is the frequency spectrum of the ECG signal, ω is the frequency of the ECG signal, and ECG(n) is the nth amplitude of the ECG signal;
在得到的X(ejω)中,低频段的最高频率,即为ECG信号的最高频率f1;高频段的最低频率,是工频干扰和其他噪声干扰频段的最低频率f2;In the obtained X(e jω ), the highest frequency of the low frequency band is the highest frequency f 1 of the ECG signal; the lowest frequency of the high frequency band is the lowest frequency f 2 of the power frequency interference and other noise interference frequency bands;
SA.2对ECG信号经巴特沃斯滤波器进行滤波,得到滤波后的ECG信号ECG1,具体通过公式(2)进行巴特沃斯滤波:SA.2 Filter the ECG signal through the Butterworth filter to obtain the filtered ECG signal ECG 1 , specifically carry out the Butterworth filter through the formula (2):
其中,公式(2)中的N代表整数集,|H(ω)|为巴特沃斯滤波器的模,|H(ω)|2为模的平方;ωc(2πf1<ωc<2πf2)为巴特沃斯滤波器的截止频率,p(p∈N)为阶数;Among them, N in the formula (2) represents an integer set, |H(ω)| is the modulus of the Butterworth filter, |H(ω)| 2 is the square of the modulus; ω c (2πf 1 <ω c <2πf 2 ) is the cut-off frequency of the Butterworth filter, and p(p∈N) is the order;
步骤B、对步骤A输出的ECG1进行曲线拟合、求取多项式系数并去基线漂移,得到去基线漂移后的信号,ECG2;Step B. Carry out curve fitting to the ECG 1 output in step A, obtain polynomial coefficients and remove the baseline drift, obtain the signal after removing the baseline drift, ECG 2 ;
步骤B又包括如下子步骤:Step B includes the following sub-steps:
SB.1基于公式(3)进行曲线拟合:SB.1 Carry out curve fitting based on formula (3):
其中,y为用来拟合的多项式,多项式的阶次q(q∈N),a0,a1,...,ap为q阶多项式的系数,x为采样时间序列,xi为x的第i次方;Among them, y is the polynomial used for fitting, the order of the polynomial is q(q∈N), a 0 , a 1 ,..., a p are the coefficients of the q-order polynomial, x is the sampling time series, and x i is x to the ith power;
SB.2基于公式(4),求取公式(3)中的多项式系数;SB.2 Calculate the polynomial coefficient in formula (3) based on formula (4);
其中,为多项式系数组成的向量,为ECG信号的幅值向量,C=[1 x x2 ... xq]T,CT为C的转置;in, is a vector of polynomial coefficients, is the magnitude vector of the ECG signal, C=[1 xx 2 ... x q ] T , C T is the transpose of C;
SB.3基于公式(5),得到去基线漂移后的信号;SB.3 Based on the formula (5), obtain the signal after removing the baseline drift;
ECG2=ECG1-y (5)ECG 2 =ECG 1 -y (5)
公式(5)中,ECG2为去基线漂移后的信号,ECG1为滤波后的信号;y是式公(3)的输出;In formula (5), ECG 2 is the signal after baseline drift removal, ECG 1 is the signal after filtering; y is the output of formula (3);
步骤C、将步骤B输出的ECG2信号使用差分阈值的方法先进行R波的定位,再进行Q波和S波的定位,分别输出R波、Q波和S波的位置;Step C, the ECG 2 signal output in step B uses the method of differential threshold to first locate the R wave, and then perform the positioning of the Q wave and S wave, and output the positions of the R wave, Q wave and S wave respectively;
步骤C又包含如下子步骤:Step C includes the following sub-steps:
SC.1基于公式(6)和公式(7),顺序计算ECG2信号的一阶差分S(n)和二阶差分W(n);SC.1 Calculate the first-order difference S(n) and the second-order difference W(n) of the ECG 2 signal sequentially based on formula (6) and formula (7);
S(n)=ECG2(n)-ECG2(n-1) (6)S(n)=ECG 2 (n)-ECG 2 (n-1) (6)
W(n)=S(n)-S(n-1) (7)W(n)=S(n)-S(n-1) (7)
其中,S(n)为第n个一阶差分,ECG2(n)为ECG2信号的第n个幅值,ECG2(n-1)为ECG2信号的第n-1个幅值,W(n)为第n个二阶差分,S(n-1)为第n-1个一阶差分;Wherein, S(n) is the nth first-order difference, ECG 2 (n) is the nth amplitude of the ECG 2 signal, ECG 2 (n-1) is the n-1th amplitude of the ECG 2 signal, W(n) is the nth second-order difference, S(n-1) is the n-1th first-order difference;
SC.2使用枚举法,确定步骤SC.1输出的S(n)的最大值max1和W(n)的最大值max2;SC.2 use the enumeration method to determine the maximum value max 1 of S(n) and the maximum value max 2 of W(n) output by step SC.1 ;
SC.3基于公式(8),设定阈值门限Y1:SC.3 Based on the formula (8), set the threshold Y 1 :
Y1=m1·max1(0<m1<1) (8)Y 1 =m 1 ·max 1 (0<m 1 <1) (8)
公式(8)中,阈值门限为Y1,m1是人为设定的系数,其范围为(0,1);In the formula (8), the threshold threshold is Y 1 , and m 1 is an artificially set coefficient, and its range is (0,1);
SC.4判断S(n)中是否有连续k1(k1∈N)个点超过Y1且ECG2(n)>0,并根据判断结果进行如下操作:SC.4 Judge whether there are consecutive k 1 (k 1 ∈ N) points in S(n) exceeding Y 1 and ECG 2 (n) > 0, and perform the following operations according to the judgment result:
SC.4A若S(n)中有连续k1(k1∈N)个点超过Y1,且ECG2(n)>0,该点n即为这个范围的R波峰,所处位置为r,跳至SC.5;SC.4A If there are k 1 (k 1 ∈ N) consecutive points exceeding Y 1 in S(n), and ECG 2 (n) > 0, this point n is the R peak of this range, and its position is r , skip to SC.5;
其中,k1是大于等于2的整数;Wherein, k 1 is an integer greater than or equal to 2;
SC.4B若S(n)中没有连续k1(k1∈N)个点超过Y1,则k1=k1-1,跳至步骤SC.4;SC.4B If there are no consecutive k 1 (k 1 ∈ N) points in S(n) exceeding Y 1 , then k 1 =k 1 -1, skip to step SC.4;
SC.5基于公式(9)和(10),设定起点阈值门限Y2和终点阈值门限Y3:SC.5 Based on formulas (9) and (10), set the starting threshold Y 2 and the ending threshold Y 3 :
Y2=m2·max2(0<m2<1) (9)Y 2 =m 2 ·max 2 (0<m 2 <1) (9)
Y3=m3·max2(0<m3<1) (10)Y 3 =m 3 ·max 2 (0<m 3 <1) (10)
公式(9)(10)中,阈值门限分别为Y2,Y3,m2,m3是人为设定的系数;In formulas (9) and (10), the thresholds are Y 2 and Y 3 respectively, and m 2 and m 3 are artificially set coefficients;
SC.6从每个R波向前搜索,判断W(n)中是否有连续k2(k2∈N)个点小于Y2,并根据判断结果进行如下操作:SC.6 Search forward from each R wave, judge whether there are consecutive k 2 (k 2 ∈ N) points in W(n) smaller than Y 2 , and perform the following operations according to the judgment result:
SC.6A若W(n)中有连续k2(k2∈N)个点小于Y2,该点n即为该点为这个范围的QRS波的起点s,跳至SC.5;SC.6A If there are k 2 (k 2 ∈ N) consecutive points in W(n) smaller than Y 2 , the point n is the starting point s of the QRS wave in this range, skip to SC.5;
其中,k2是大于等于2的整数;Wherein, k 2 is an integer greater than or equal to 2;
SC.6B若W(n)中没有连续k2(k2∈N)个点小于Y2,则k2=k2-1,跳至步骤SC.6;SC.6B If there are no consecutive k 2 (k 2 ∈N) points in W(n) smaller than Y 2 , then k 2 =k 2 -1, skip to step SC.6;
SC.7从每个R波向后搜索,判断W(n)中是否有连续k3(k3∈N)个点小于Y3,并根据判断结果进行如下操作:SC.7 Search backward from each R wave, judge whether there are consecutive k 3 (k 3 ∈ N) points in W(n) smaller than Y 3 , and perform the following operations according to the judgment result:
其中,k3是大于等于2的整数;Wherein, k 3 is an integer greater than or equal to 2;
SC.7A若W(n)中有连续k3(k3∈N)个点小于Y3,该点n即为该点为这个范围的QRS波的终点e,跳至SD.8;SC.7A If there are k 3 (k 3 ∈ N) consecutive points in W(n) smaller than Y 3 , this point n is the end point e of the QRS wave in this range, skip to SD.8;
SC.7B若W(n)中没有连续k3(k3∈N)个点小于Y3,则k3=k3-1,跳至步骤SC.7;SC.7B If there are no consecutive k 3 (k 3 ∈N) points in W(n) smaller than Y 3 , then k 3 =k 3 -1, skip to step SC.7;
SC.8基于公式(11),在Q波、R波和S波的起点s和R波所在r位置的范围内搜索幅值极小值点Q:SC.8 Based on the formula (11), search for the minimum amplitude point Q within the range of the starting point s of the Q wave, R wave and S wave and the position r of the R wave:
Q=min(ECG2(n)),(s<n<r) (11)Q=min(ECG 2 (n)),(s<n<r) (11)
公式(11)中,min(ECG2(n))为搜索ECG2(n)极小值的函数;In formula (11), min(ECG 2 (n)) is a function to search for the minimum value of ECG 2 (n);
基于公式(12),在R波和终点e的范围内搜索幅值极小值点S:Based on the formula (12), the amplitude minimum point S is searched within the range of the R wave and the terminal point e:
S=min(ECG2(n)),(r<n<e) (12)S=min(ECG 2 (n)),(r<n<e) (12)
SC.9通过步骤SC.4和步骤SC.8确定的R波、Q波和S波的位置,与专家标注的位置进行比较,基于公式(13),分别得到R波、Q波和S波的检测准确度p11,p12,p13:SC.9 Compare the positions of R wave, Q wave and S wave determined by step SC.4 and step SC.8 with the positions marked by experts, and obtain R wave, Q wave and S wave respectively based on formula (13) The detection accuracy of p 11 , p 12 , p 13 :
公式(13)中,i的取值为1,2,3,N11,N12,N13分别为ECG信号中R波、Q波和S波的个数,N11 *,N12 *,N13 *分别为检测正确的R波、Q波和S波的个数;In the formula (13), the value of i is 1, 2, 3, N 11 , N 12 , N 13 are respectively the number of R wave, Q wave and S wave in the ECG signal, N 11 * , N 12 * , N 13 * are respectively the number of correctly detected R wave, Q wave and S wave;
步骤D、将步骤B处理后的ECG2信号使用小波变换的方法得到不同阶层的小波分解图,然后通过检测小波变换系数模极大值的位置和幅度,输出Q,R,S波所在位置;步骤D又包含如下步骤:Step D, using the wavelet transform method to obtain wavelet decomposition diagrams of different levels of the ECG 2 signal processed in step B, and then output the positions of Q, R, and S waves by detecting the position and amplitude of the wavelet transform coefficient modulus maximum; Step D comprises the following steps again:
SD.1基于公式(14),(15),使用双正交样条小波对ECG信号进行小波变换,得到不同阶层下的小波分解图;SD.1 Based on the formulas (14) and (15), the biorthogonal spline wavelet is used to perform wavelet transformation on the ECG signal, and the wavelet decomposition diagrams at different levels are obtained;
其中,x0(n)=ECG2(n),即为处理后的ECG信号;Z为自然数集(下同);x(j)(n)为xj-1(n)的高频段信号在j尺度上的二进小波变换,d(j)(n)为xj-1(n)的低频段信号在j尺度上的二进小波变换,hj-1(k),gj-1(k)分别为设定的第k组正交的数字低通滤波器和高通滤波器系数;Among them, x 0 (n)=ECG 2 (n), which is the processed ECG signal; Z is a natural number set (the same below); x (j) (n) is the high-frequency signal of x j-1 (n) The binary wavelet transform on the j scale, d (j) (n) is the binary wavelet transform of the low-frequency signal of x j-1 (n) on the j scale, h j-1 (k), g j- 1 (k) is respectively the digital low-pass filter and the high-pass filter coefficient of the k group orthogonality of setting;
SD.2基于SD.1得到的不同尺度下的小波分解图,对c(c∈N)尺度下的波形,检测幅值极大值点M和极小值点L;检测两点间幅值为p(p<ε)的点,其中,ε为幅值趋近于零的数值,p即为原ECG信号的R波所在位置;SD.2 Based on the wavelet decomposition diagrams at different scales obtained in SD.1, for waveforms at the scale of c(c∈N), detect the amplitude maximum point M and the minimum value point L; detect the amplitude between two points is the point of p(p<ε), where ε is the value whose amplitude is close to zero, and p is the position of the R wave of the original ECG signal;
SD.3基于SD.2得到的R波位置p和公式(16)对b(b∈N)尺度下的波形,搜索R波前位置的模极小值,即为Q波,SD.3 Based on the R wave position p obtained in SD.2 and the formula (16), search for the modulus minimum at the front position of the R wave for the waveform at the b (b∈N) scale, which is the Q wave.
Q=x(b)(n)<x(b)(n-1),x(b)(n)<x(b)(n+1),(n<p) (16)Q=x (b) (n)<x (b) (n-1), x (b) (n)<x (b) (n+1), (n<p) (16)
其中,x(b)(n)为b尺度下,ECG信号第n个序列的幅值;Wherein, x (b) (n) is the magnitude of the nth sequence of the ECG signal at the b scale;
搜索R波后位置的模极小值,即为S波,Search for the modulus minimum at the position after the R wave, which is the S wave,
S=x(b)(n)<x(b)(n-1),x(b)(n)<x(b)(n+1),(n>p) (17)S=x (b) (n)<x (b) (n-1), x (b) (n)<x (b) (n+1), (n>p) (17)
其中,x(b)(n)为b尺度下,ECG信号第n个序列的幅值;Wherein, x (b) (n) is the magnitude of the nth sequence of the ECG signal at the b scale;
SD.4通过步骤SD.2和步骤SD.3检测的R波、Q波和S波的位置,与专家标注的位置进行比较,基于公式(18),分别得到R波、Q波和S波的检测准确度p21,p22,p23:SD.4 Compare the positions of R wave, Q wave and S wave detected by step SD.2 and step SD.3 with the positions marked by experts, and obtain R wave, Q wave and S wave respectively based on formula (18) The detection accuracy of p 21 , p 22 , p 23 :
公式(18)中,i的取值为1,2,3,N21,N22,N23分别为ECG信号中R波、Q波和S波的个数,N21 *,N22 *,N23 *分别为检测正确的R波、Q波和S波的个数;In the formula (18), the value of i is 1, 2, 3, N 21 , N 22 , N 23 are respectively the number of R wave, Q wave and S wave in the ECG signal, N 21 * , N 22 * , N 23 * are respectively the number of correctly detected R wave, Q wave and S wave;
其中,步骤D和步骤C也可以交换顺序;Wherein, step D and step C can also exchange order;
步骤E、通过专家标注的R波,Q波和S波对差分阈值法的所人为设定的参数进行反复调整,对小波变换的阶层进行反复调整,直至准确度收敛;步骤E又包含如下步骤:Step E, repeatedly adjust the artificially set parameters of the difference threshold method through the R wave, Q wave and S wave marked by experts, and repeatedly adjust the wavelet transform hierarchy until the accuracy converges; step E also includes the following steps :
SE.1分别基于步骤C获得的R波,Q波和S波与通过反复与专家标注的点比较,调整m1,m2,m3的值,分别决定是否跳至步骤C,具体为:SE.1 Adjust the values of m 1 , m 2 , and m 3 based on the R wave, Q wave, and S wave obtained in step C and the points marked by experts repeatedly, and decide whether to skip to step C, specifically:
SE.1A基于步骤C获得的R波,与通过反复与专家标注的R波进行比较,若准确度p11提高,则调整m1的值,跳至步骤C;若准确度p11没有提高,则跳至步骤SE.1B;SE.1A Based on the R wave obtained in step C, compare it with the R wave marked by experts repeatedly. If the accuracy p 11 improves, adjust the value of m 1 and skip to step C; if the accuracy p 11 does not improve, Then skip to step SE.1B;
步骤SE.1B基于步骤C获得的Q波,与通过反复与专家标注的Q波比较,Step SE.1B is based on the Q wave obtained in step C, compared with the Q wave marked by repeated consultation with experts,
若准确度p12提高,则调整m2的值,跳至步骤C;若准确度p12没有提高,则跳至步骤SE.1C;If the accuracy p 12 is improved, then adjust the value of m 2 and skip to step C; if the accuracy p 12 is not improved, then skip to step SE.1C;
步骤SE.1C基于步骤C获得的S波,与通过反复与专家标注的S波比较,Step SE.1C is based on the S wave obtained in step C, compared with the S wave marked by experts repeatedly,
若准确度p13提高,则调整m3的值,跳至步骤C;若准确度p13没有提高,则跳至步骤SE.2;If the accuracy p 13 is improved, then adjust the value of m 3 and skip to step C; if the accuracy p 13 is not improved, then skip to step SE.2;
SE.2分别基于步骤D获得的R波,Q波和S波与通过反复与专家标注的点比较,调整b,c的值,分别决定是否跳至步骤D,具体为:SE.2 Based on the R wave, Q wave and S wave obtained in step D and the points marked by experts repeatedly, adjust the values of b and c to decide whether to skip to step D, specifically:
SE.2A基于步骤D获得的R波,与通过反复与专家标注的R波进行比较,若准确度p21提高,则调整b的值,跳至步骤D;若准确度p21没有提高,则跳至步骤SE.2B;SE.2A Based on the R wave obtained in step D, compare it with the R wave marked by experts repeatedly. If the accuracy p 21 improves, adjust the value of b and skip to step D; if the accuracy p 21 does not improve, then Skip to step SE.2B;
步骤SE.2B基于步骤D获得的Q波、S波,与通过反复与专家标注的Q波和S波比较,Step SE.2B is based on the Q wave and S wave obtained in step D, compared with the Q wave and S wave marked by experts repeatedly,
若准确度p22、p23均提高,则调整c的值,跳至步骤D;若准确度p22、p23至少一个没有提高,则跳至步骤F。If both the accuracy p 22 and p 23 are improved, then adjust the value of c and skip to step D; if at least one of the accuracy p 22 and p 23 is not improved, then skip to step F.
步骤F、分别比较步骤C和步骤D的检测准确度,分别针对R波、Q波和S波,选择准确度高的检测方法,步骤F又包含如下步骤:Step F, comparing the detection accuracy of step C and step D respectively, and selecting a detection method with high accuracy for R wave, Q wave and S wave respectively, step F includes the following steps:
SF.1比较p11和p21的大小,若p11≥p21,则跳至步骤C,进行R波的提取,若p11<p21,则跳至步骤D,进行R波的提取;SF.1 Compare the size of p 11 and p 21 , if p 11 ≥ p 21 , then skip to step C to extract R wave, if p 11 <p 21 , then skip to step D to extract R wave;
SF.2比较p12和p22的大小,若p12≥p22,则跳至步骤C,进行Q波的提取,若p12<p22,则跳至步骤D,进行Q波的提取;SF.2 Compare the size of p 12 and p 22 , if p 12 ≥ p 22 , skip to step C to extract Q wave, if p 12 < p 22 , skip to step D to extract Q wave;
SF.3比较p13和p23的大小,若p13≥p23,则跳至步骤C,进行S波的提取,若p13<p23,则跳至步骤D,进行S波的提取,本方法结束。SF.3 Compare the size of p 13 and p 23 , if p 13 ≥ p 23 , then skip to step C to extract S wave, if p 13 <p 23 , then skip to step D to extract S wave, This method ends.
有益效果Beneficial effect
本发明一种融合巴特沃斯滤波和小波变换的ECG特征提取方法,对比已有技术,具有如下有益效果:能够对原始的ECG信号进行更为精确的去噪处理,并且,能够实现QRS波的精确定位,为心电图的数字化分析提供基础。An ECG feature extraction method fused with Butterworth filter and wavelet transform of the present invention has the following beneficial effects compared with the prior art: the original ECG signal can be denoised more accurately, and the QRS wave can be realized Accurate positioning provides the basis for digital analysis of ECG.
附图说明Description of drawings
图1是本发明一种融合巴特沃斯滤波和小波变换的ECG特征提取方法的Q波、R波以及S波的提取流程图。Fig. 1 is a flow chart of extracting Q wave, R wave and S wave of an ECG feature extraction method that combines Butterworth filter and wavelet transform according to the present invention.
具体实施方式Detailed ways
下面,结合附图并举实施例,对本发明进行详细描述。Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and examples.
实施例1Example 1
本发明提出了一种融合巴特沃斯滤波和小波变换的ECG信号特征提取方法,如图1所示。具体包括如下步骤:The present invention proposes an ECG signal feature extraction method that combines Butterworth filter and wavelet transform, as shown in FIG. 1 . Specifically include the following steps:
步骤1、对原始ECG信号进行频谱分析得出最高频率和最低频率,再使用巴特沃斯滤波器对原始ECG信号进行滤波处理,得到滤波后的ECG1信号;步骤1又具体包括如下子步骤:Step 1. Perform spectrum analysis on the original ECG signal to obtain the highest frequency and the lowest frequency, and then use the Butterworth filter to filter the original ECG signal to obtain the filtered ECG 1 signal; Step 1 specifically includes the following sub-steps:
S1.1通过公式(19)使用离散傅里叶变换的方法,对ECG信号的频谱进行分析,得到ECG信号频谱的最高频率和最低频率,X(ejω):S1.1 Use the discrete Fourier transform method to analyze the spectrum of the ECG signal through the formula (19), and obtain the highest frequency and the lowest frequency of the ECG signal spectrum, X(e jω ):
其中,X(ejω)为ECG信号的频谱,ω为ECG信号的频率,ECG(n)为ECG信号的第n个幅值;Wherein, X(e jω ) is the frequency spectrum of the ECG signal, ω is the frequency of the ECG signal, and ECG(n) is the nth amplitude of the ECG signal;
在得到的X(ejω)中,低频段的最高频率,即为ECG信号的最高频率f1;高频段的最低频率,是工频干扰和其他噪声干扰频段的最低频率f2;In the obtained X(e jω ), the highest frequency of the low frequency band is the highest frequency f 1 of the ECG signal; the lowest frequency of the high frequency band is the lowest frequency f 2 of the power frequency interference and other noise interference frequency bands;
S1.2对ECG信号经巴特沃斯滤波器进行滤波,得到滤波后的ECG信号ECG1,基于公式(20)进行巴特沃斯滤波;S1.2 Filter the ECG signal through a Butterworth filter to obtain a filtered ECG signal ECG 1 , and perform Butterworth filtering based on formula (20);
其中,公式(20)中的N代表整数集,|H(ω)|为巴特沃斯滤波器的模,|H(ω)|2为模的平方;ωc=2π×50Hz为巴特沃斯滤波器的截止频率,p=2为阶数;Wherein, N in the formula (20) represents an integer set, |H(ω)| is the modulus of the Butterworth filter, |H(ω)| 2 is the square of the modulus; ω c =2π×50Hz is the Butterworth The cutoff frequency of the filter, p=2 is the order;
步骤2、对步骤SA.2输出的ECG1进行曲线拟合、求取多项式系数并去基线漂移,得到去基线漂移后的信号ECG2;Step 2. Carry out curve fitting to the ECG 1 output in step SA.2, obtain polynomial coefficients and remove the baseline drift, and obtain the signal ECG 2 after the baseline drift is removed;
步骤2又包括如下子步骤:Step 2 includes the following sub-steps:
S2.1基于公式(21)进行曲线拟合;S2.1 Carry out curve fitting based on formula (21);
其中,y为用来拟合的多项式,多项式的阶次q=3,a0,a1,a2,a3为q阶多项式的系数,x为采样时间序列,xi为x的第i次方;Among them, y is the polynomial used for fitting, the order of the polynomial is q=3, a 0 , a 1 , a 2 , and a 3 are the coefficients of the q-order polynomial, x is the sampling time series, and x i is the ith of x power;
S2.2基于公式(22),求取公式(3)中的多项式系数;S2.2 Calculate the polynomial coefficient in formula (3) based on formula (22);
其中,为多项式系数组成的向量,为ECG信号的幅值向量,C=[1 x x2 x3]T,CT为C的转置;in, is a vector of polynomial coefficients, is the magnitude vector of the ECG signal, C=[1 xx 2 x 3 ] T , C T is the transpose of C;
S2.3基于公式(23),得到去基线漂移后的信号;S2.3 Based on formula (23), obtain the signal after removing the baseline drift;
ECG2=ECG1-y (23)ECG 2 = ECG 1 -y (23)
公式(23)中,ECG2为去基线漂移后的信号,ECG1为滤波后的信号;y是式公(21)的输出;In formula (23), ECG 2 is the signal after baseline drift removal, ECG 1 is the signal after filtering; y is the output of formula (21);
步骤3、将步骤2输出的ECG2信号使用差分阈值的方法先进行R波的定位,再进行Q波和S波的定位,分别输出R波、Q波和S波的位置;Step 3. The ECG 2 signal output in step 2 is used to locate the R wave first, then the Q wave and S wave, and output the positions of the R wave, Q wave, and S wave respectively by using the differential threshold method;
步骤3又包含如下子步骤:Step 3 includes the following sub-steps:
S3.1基于公式(24)和公式(25),顺序计算ECG2信号的一阶差分S(n)和二阶差分W(n);S3.1 Sequentially calculate the first-order difference S(n) and the second-order difference W(n) of the ECG 2 signal based on formula (24) and formula (25);
S(n)=ECG2(n)-ECG2(n-1) (24)S(n)=ECG 2 (n)-ECG 2 (n-1) (24)
W(n)=S(n)-S(n-1) (25)W(n)=S(n)-S(n-1) (25)
其中,S(n)为第n个一阶差分,ECG2(n)为ECG2信号的第n个幅值,ECG2(n-1)为ECG2信号的第n-1个幅值,W(n)为第n个二阶差分,S(n-1)为第n-1个一阶差分;Wherein, S(n) is the nth first-order difference, ECG 2 (n) is the nth amplitude of the ECG 2 signal, ECG 2 (n-1) is the n-1th amplitude of the ECG 2 signal, W(n) is the nth second-order difference, S(n-1) is the n-1th first-order difference;
S3.2使用枚举法,确定步骤S3.1输出的S(n)的最大值max1和W(n)的最大值max2;S3.2 use enumeration method to determine the maximum value max 1 of S(n) output by step S3.1 and the maximum value max 2 of W(n);
S3.3基于公式(26),设定阈值门限Y1:S3.3 Based on the formula (26), set the threshold Y 1 :
Y1=m1·max1(0<m1<1) (26)Y 1 =m 1 ·max 1 (0<m 1 <1) (26)
公式(26)中,阈值门限为Y1,m1=0.7;In formula (26), the threshold is Y 1 , m 1 =0.7;
S3.4判断S(n)中是否有连续k1(k1∈N)个点超过Y1且ECG2(n)>0,并根据判断结果进行如下操作:S3.4 Judge whether there are consecutive k 1 (k 1 ∈ N) points in S(n) exceeding Y 1 and ECG 2 (n) > 0, and perform the following operations according to the judgment result:
S3.4A若S(n)中有连续k1(k1∈N)个点超过Y1,且ECG2(n)>0,该点n即为这个范围的R波峰,所处位置为r,跳至S3.5;S3.4A If there are k 1 (k 1 ∈ N) consecutive points in S(n) exceeding Y 1 , and ECG 2 (n) > 0, the point n is the R peak of this range, and its position is r , skip to S3.5;
其中,k1是大于等于2的整数;Wherein, k 1 is an integer greater than or equal to 2;
S3.4B若S(n)中没有连续k1(k1∈N)个点超过Y1,则k1=k1-1,跳至步骤SC.4;S3.4B If there are no consecutive k 1 (k 1 ∈ N) points in S(n) exceeding Y 1 , then k 1 =k 1 -1, skip to step SC.4;
S3.5基于公式(27)和(28),设定起点阈值门限Y2和终点阈值门限Y3:S3.5 Based on formulas (27) and (28), set the starting threshold threshold Y 2 and the ending threshold threshold Y 3 :
Y2=m2·max2(0<m2<1) (27)Y 2 =m 2 ·max 2 (0<m 2 <1) (27)
Y3=m3·max2(0<m3<1) (28)Y 3 =m 3 ·max 2 (0<m 3 <1) (28)
公式(27)(28)中,阈值门限分别为Y2,Y3,m2=0.5,m3=0.6;In the formulas (27) and (28), the thresholds are respectively Y 2 and Y 3 , m 2 =0.5, m 3 =0.6;
S3.6从每个R波向前搜索,判断W(n)中是否有连续k2(k2∈N)个点小于Y2,并根据判断结果进行如下操作:S3.6 Search forward from each R wave, judge whether there are consecutive k 2 (k 2 ∈ N) points in W(n) smaller than Y 2 , and perform the following operations according to the judgment result:
S3.6A若W(n)中有连续k2=5个点小于Y2,该点n即为该点为这个范围的QRS波的起点s,跳至S3.5;S3.6A If there are consecutive k 2 = 5 points in W(n) smaller than Y 2 , the point n is the starting point s of the QRS wave in this range, skip to S3.5;
其中,k2是大于等于2的整数;Wherein, k 2 is an integer greater than or equal to 2;
S3.6B若W(n)中没有连续k2=5个点小于Y2,则k2=k2-1,跳至步骤S3.6;S3.6B If there are no consecutive k 2 =5 points in W(n) smaller than Y 2 , then k 2 =k 2 -1, skip to step S3.6;
S3.7从每个R波向后搜索,判断W(n)中是否有连续k3=5个点小于Y3,并根据判断结果进行如下操作:S3.7 Search backward from each R wave, judge whether there are consecutive k 3 =5 points in W(n) smaller than Y 3 , and perform the following operations according to the judgment result:
其中,k3是大于等于2的整数;Wherein, k 3 is an integer greater than or equal to 2;
S3.7A若W(n)中有连续k3=5个点小于Y3,该点n即为该点为这个范围的QRS波的终点e,跳至S4.8;S3.7A If there are k 3 = 5 consecutive points in W(n) smaller than Y 3 , the point n is the end point e of the QRS wave in this range, skip to S4.8;
S3.7B若W(n)中没有连续k3=5个点小于Y3,则k3=k3-1,跳至步骤S3.7;S3.7B If there are no consecutive k 3 =5 points in W(n) smaller than Y 3 , then k 3 =k 3 -1, skip to step S3.7;
S3.8基于公式(29),在Q波、R波和S波的起点s和R波所在r位置的范围内搜索幅值极小值点Q:S3.8 Based on the formula (29), search for the minimum amplitude point Q within the range of the starting point s of the Q wave, R wave and S wave and the position r of the R wave:
Q=min(ECG2(n)),(s<n<r) (29)Q=min(ECG 2 (n)),(s<n<r) (29)
公式(29)中,min(ECG2(n))为搜索ECG2(n)极小值的函数;In formula (29), min(ECG 2 (n)) is a function to search for the minimum value of ECG 2 (n);
基于公式(30),在R波和终点e的范围内搜索幅值极小值点S:Based on the formula (30), the amplitude minimum point S is searched within the range of the R wave and the terminal point e:
S=min(ECG2(n)),(r<n<e) (30)S=min(ECG 2 (n)),(r<n<e) (30)
S3.9通过步骤S3.4和步骤S3.8确定的R波、Q波和S波的位置,与专家标注的位置进行比较,基于公式(13),分别得到R波、Q波和S波的检测准确度p11,p12,p13:S3.9 Compare the positions of R wave, Q wave and S wave determined by step S3.4 and step S3.8 with the positions marked by experts, and obtain R wave, Q wave and S wave respectively based on formula (13) The detection accuracy of p 11 , p 12 , p 13 :
公式(31)中,i的取值为1,2,3,N11,N12,N13分别为ECG信号中R波、Q波和S波的个数,N11 *,N12 *,N13 *分别为检测正确的R波、Q波和S波的个数;In the formula (31), the value of i is 1, 2, 3, N 11 , N 12 , N 13 are respectively the number of R wave, Q wave and S wave in the ECG signal, N 11 * , N 12 * , N 13 * are respectively the number of correctly detected R wave, Q wave and S wave;
步骤4、将步骤2处理后的ECG2信号使用小波变换的方法得到不同阶层的小波分解图,然后通过检测小波变换系数模极大值的位置和幅度,输出Q,R,S波所在位置;步骤4又包含如下步骤:Step 4, use the wavelet transform method to obtain the wavelet decomposition diagrams of different levels of the ECG 2 signal processed in step 2, and then output the position of the Q, R, and S waves by detecting the position and amplitude of the modulus maximum value of the wavelet transform coefficient; Step 4 further includes the following steps:
S4.1基于公式(32),(33),使用双正交样条小波对ECG信号进行小波变换,得到不同阶层下的小波分解图;S4.1 Based on formulas (32) and (33), perform wavelet transformation on the ECG signal using biorthogonal spline wavelet to obtain wavelet decomposition diagrams at different levels;
其中,x0(n)=ECG2(n),即为处理后的ECG信号;Z为自然数集(下同);x(j)(n)为xj-1(n)的高频段信号在j尺度上的二进小波变换,d(j)(n)为xj-1(n)的低频段信号在j尺度上的二进小波变换,hj-1(k),gj-1(k)分别为设定的第k组正交的数字低通滤波器和高通滤波器系数;Among them, x 0 (n)=ECG 2 (n), which is the processed ECG signal; Z is a natural number set (the same below); x (j) (n) is the high-frequency signal of x j-1 (n) The binary wavelet transform on the j scale, d (j) (n) is the binary wavelet transform of the low-frequency signal of x j-1 (n) on the j scale, h j-1 (k), g j- 1 (k) is respectively the digital low-pass filter and the high-pass filter coefficient of the k group orthogonality of setting;
S4.2基于S4.1得到的不同尺度下的小波分解图,对2尺度下的波形,检测幅值极大值点M和极小值点L;检测两点间幅值为p(p<0.05)的点,p即为原ECG信号的R波所在位置;S4.2 Based on the wavelet decomposition diagrams at different scales obtained in S4.1, for waveforms at 2 scales, detect the amplitude maximum point M and the minimum value point L; the amplitude between the two points is detected to be p(p< 0.05), p is the position of the R wave of the original ECG signal;
S4.3基于S4.2得到的R波位置p和公式(34)对1尺度下的波形,搜索R波前位置的模极小值,即为Q波,S4.3 Based on the R wave position p obtained in S4.2 and the formula (34) for the waveform at scale 1, search for the modulus minimum value of the front position of the R wave, which is the Q wave.
Q=x(b)(n)<x(b)(n-1),x(b)(n)<x(b)(n+1),(n<p) (34)Q=x (b) (n)<x (b) (n-1),x (b) (n)<x (b) (n+1),(n<p)(34)
其中,x(b)(n)为1尺度下,ECG信号第n个序列的幅值;Wherein, x (b) (n) is the magnitude of the nth sequence of the ECG signal at a scale of 1;
搜索R波后位置的模极小值,即为S波,Search for the modulus minimum at the position after the R wave, which is the S wave,
S=x(b)(n)<x(b)(n-1),x(b)(n)<x(b)(n+1),(n>p) (35)S=x (b) (n)<x (b) (n-1), x (b) (n)<x (b) (n+1), (n>p) (35)
其中,x(b)(n)为1尺度下,ECG信号第n个序列的幅值;Wherein, x (b) (n) is the magnitude of the nth sequence of the ECG signal at a scale of 1;
S4.4通过步骤S4.2和步骤S4.3检测的R波、Q波和S波的位置,与专家标注的位置进行比较,基于公式(36),分别得到R波、Q波和S波的检测准确度p21,p22,p23:S4.4 Compare the positions of R wave, Q wave and S wave detected by step S4.2 and step S4.3 with the positions marked by experts, and obtain R wave, Q wave and S wave respectively based on formula (36) The detection accuracy of p 21 , p 22 , p 23 :
公式(13)中,i的取值为1,2,3,N21,N22,N23分别为ECG信号中R波、Q波和S波的个数,N21 *,N22 *,N23 *分别为检测正确的R波、Q波和S波的个数;In the formula (13), the value of i is 1, 2, 3, N 21 , N 22 , N 23 are respectively the number of R wave, Q wave and S wave in the ECG signal, N 21 * , N 22 * , N 23 * are respectively the number of correctly detected R wave, Q wave and S wave;
其中,步骤4和步骤3也可以交换顺序;Wherein, step 4 and step 3 can also exchange order;
步骤5、通过专家标注的R波,Q波和S波对差分阈值法的所人为设定的参数进行反复调整,对小波变换的阶层进行反复调整,直至准确度收敛;步骤5又包含如下步骤:Step 5. Repeatedly adjust the artificially set parameters of the differential threshold method through the R wave, Q wave and S wave marked by experts, and repeatedly adjust the wavelet transform hierarchy until the accuracy converges; Step 5 also includes the following steps :
S5.1分别基于步骤3获得的R波,Q波和S波与通过反复与专家标注的点比较,调整m1,m2,m3的值,分别决定是否跳至步骤3,具体为:S5.1 Based on the R wave, Q wave and S wave obtained in step 3 and the points marked by experts repeatedly, adjust the values of m 1 , m 2 , and m 3 to decide whether to skip to step 3, specifically:
S5.1A基于步骤3获得的R波,与通过反复与专家标注的R波进行比较,若准确度p11提高,则调整m1的值,跳至步骤3;若准确度p11没有提高,则跳至步骤S5.1B;S5.1A Based on the R wave obtained in step 3, compare it with the R wave marked by experts repeatedly. If the accuracy p 11 improves, adjust the value of m 1 and skip to step 3; if the accuracy p 11 does not improve, Then skip to step S5.1B;
步骤S5.1B基于步骤3获得的Q波,与通过反复与专家标注的Q波比较,Step S5.1B is based on the Q wave obtained in step 3, compared with the Q wave marked by experts repeatedly,
若准确度p12提高,则调整m2的值,跳至步骤3;若准确度p12没有提高,则跳至步骤S5.1C;If the accuracy p12 is improved, then adjust the value of m2 , and skip to step 3; if the accuracy p12 is not improved, then skip to step S5.1C;
步骤S5.1C基于步骤3获得的S波,与通过反复与专家标注的S波比较,Step S5.1C is based on the S wave obtained in step 3, compared with the S wave marked by experts repeatedly,
若准确度p13提高,则调整m3的值,跳至步骤3;若准确度p13没有提高,则跳至步骤S5.2;If the accuracy p13 is improved, then adjust the value of m3 and skip to step 3; if the accuracy p13 is not improved, then skip to step S5.2;
S5.2分别基于步骤4获得的R波,Q波和S波与通过反复与专家标注的点比较,调整b,c的值,分别决定是否跳至步骤4,具体为:S5.2 Based on the R wave, Q wave and S wave obtained in step 4 and the points marked by experts repeatedly, adjust the values of b and c to decide whether to skip to step 4, specifically:
S5.2A基于步骤4获得的R波,与通过反复与专家标注的R波进行比较,若准确度p21提高,则调整b的值,跳至步骤4;若准确度p21没有提高,则跳至步骤S5.2B;S5.2A Based on the R wave obtained in step 4, compare it with the R wave marked by experts repeatedly. If the accuracy p 21 is improved, adjust the value of b and skip to step 4; if the accuracy p 21 does not increase, then Skip to step S5.2B;
步骤S5.2B基于步骤4获得的Q波、S波,与通过反复与专家标注的Q波和S波比较,Step S5.2B is based on the Q wave and S wave obtained in step 4, compared with the Q wave and S wave marked by experts repeatedly,
若准确度p22、p23均提高,则调整c的值,跳至步骤4;若准确度p22、p23至少一个没有提高,则跳至步骤6。If both the accuracy p 22 and p 23 are improved, then adjust the value of c and skip to step 4; if at least one of the accuracy p 22 and p 23 is not improved, then skip to step 6.
步骤6、分别比较步骤3和步骤4的检测准确度,分别针对R波、Q波和S波,选择准确度高的检测方法,步骤5又包含如下步骤:Step 6, compare the detection accuracy of step 3 and step 4 respectively, respectively for R wave, Q wave and S wave, select the detection method with high accuracy, step 5 comprises the following steps again:
S6.1比较p11和p21的大小,若p11≥p21,则跳至步骤3,进行R波的提取,若p11<p21,则跳至步骤4,进行R波的提取;S6.1 Compare the size of p 11 and p 21 , if p 11 ≥ p 21 , skip to step 3 to extract the R wave, and if p 11 < p 21 , skip to step 4 to extract the R wave;
S6.2比较p12和p22的大小,若p12≥p22,则跳至步骤3,进行Q波的提取,若p12<p22,则跳至步骤4,进行Q波的提取;S6.2 Compare the size of p 12 and p 22 , if p 12 ≥ p 22 , skip to step 3 to extract Q wave, if p 12 < p 22 , skip to step 4 to extract Q wave;
S6.3比较p13和p23的大小,若p13≥p23,则跳至步骤3,进行S波的提取,若p13<p23,则跳至步骤4,进行S波的提取,本方法结束。S6.3 Compare the size of p 13 and p 23 , if p 13 ≥ p 23 , skip to step 3 to extract S wave, if p 13 < p 23 , skip to step 4 to extract S wave, This method ends.
需要说明的是,本说明书所述的仅为本发明的较佳实施例而已,以上实施例仅用于说明本发明的技术方案而非对本发明的限制。凡本领域技术人员依本发明的构思通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在本发明的范围之内。It should be noted that what is described in this specification is only a preferred embodiment of the present invention, and the above embodiments are only used to illustrate the technical solution of the present invention rather than limit the present invention. All technical solutions obtained by those skilled in the art through logical analysis, reasoning or limited experiments according to the concept of the present invention shall fall within the scope of the present invention.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810429640.2A CN108836305B (en) | 2018-05-08 | 2018-05-08 | A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810429640.2A CN108836305B (en) | 2018-05-08 | 2018-05-08 | A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108836305A true CN108836305A (en) | 2018-11-20 |
CN108836305B CN108836305B (en) | 2019-04-12 |
Family
ID=64212855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810429640.2A Active CN108836305B (en) | 2018-05-08 | 2018-05-08 | A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108836305B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109542021A (en) * | 2018-12-24 | 2019-03-29 | 广东理致技术有限公司 | A kind of sensor weak signal data acquisition method and device |
CN112244862A (en) * | 2020-10-14 | 2021-01-22 | 哈尔滨理工大学 | ECG Signal Denoising Algorithm Based on RFDA Wavelet Threshold |
CN112611444A (en) * | 2020-12-30 | 2021-04-06 | 西安和其光电科技股份有限公司 | Distributed optical fiber vibration monitoring system and method capable of achieving accurate positioning |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5025794A (en) * | 1988-08-30 | 1991-06-25 | Corazonix Corporation | Method for analysis of electrocardiographic signal QRS complex |
CN101799974A (en) * | 2010-03-12 | 2010-08-11 | 上海交通大学 | Electrocardio signal transmission method based on self-adaptive codebook |
CN101828916A (en) * | 2010-05-07 | 2010-09-15 | 深圳大学 | Electrocardiosignal processing system |
US20160022164A1 (en) * | 2009-11-03 | 2016-01-28 | Vivaquant Llc | Detecting fiducial points in physiological signals |
CN106037720A (en) * | 2015-12-04 | 2016-10-26 | 贵州大学 | Application method of hybrid continuous information analysis technology in medicine |
CN107693011A (en) * | 2017-11-13 | 2018-02-16 | 湖北科技学院 | A baseline filtering method for electrocardiogram signal |
CN107788969A (en) * | 2017-09-29 | 2018-03-13 | 成都瑞迪康医疗科技有限公司 | The automatic testing method of QRS complex in a kind of electrocardiosignal |
-
2018
- 2018-05-08 CN CN201810429640.2A patent/CN108836305B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5025794A (en) * | 1988-08-30 | 1991-06-25 | Corazonix Corporation | Method for analysis of electrocardiographic signal QRS complex |
US20160022164A1 (en) * | 2009-11-03 | 2016-01-28 | Vivaquant Llc | Detecting fiducial points in physiological signals |
CN101799974A (en) * | 2010-03-12 | 2010-08-11 | 上海交通大学 | Electrocardio signal transmission method based on self-adaptive codebook |
CN101828916A (en) * | 2010-05-07 | 2010-09-15 | 深圳大学 | Electrocardiosignal processing system |
CN106037720A (en) * | 2015-12-04 | 2016-10-26 | 贵州大学 | Application method of hybrid continuous information analysis technology in medicine |
CN107788969A (en) * | 2017-09-29 | 2018-03-13 | 成都瑞迪康医疗科技有限公司 | The automatic testing method of QRS complex in a kind of electrocardiosignal |
CN107693011A (en) * | 2017-11-13 | 2018-02-16 | 湖北科技学院 | A baseline filtering method for electrocardiogram signal |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109542021A (en) * | 2018-12-24 | 2019-03-29 | 广东理致技术有限公司 | A kind of sensor weak signal data acquisition method and device |
CN112244862A (en) * | 2020-10-14 | 2021-01-22 | 哈尔滨理工大学 | ECG Signal Denoising Algorithm Based on RFDA Wavelet Threshold |
CN112244862B (en) * | 2020-10-14 | 2024-05-14 | 哈尔滨理工大学 | Electrocardiogram signal denoising algorithm based on RFDA wavelet threshold |
CN112611444A (en) * | 2020-12-30 | 2021-04-06 | 西安和其光电科技股份有限公司 | Distributed optical fiber vibration monitoring system and method capable of achieving accurate positioning |
Also Published As
Publication number | Publication date |
---|---|
CN108836305B (en) | 2019-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103549950B (en) | Improved difference threshold detection algorithm for mobile ECG (electrocardiogram) monitoring | |
CN110236518B (en) | Electrocardio and heart-shock signal combined classification method and device based on neural network | |
CN108272451B (en) | QRS wave identification method based on improved wavelet transformation | |
CN104783787B (en) | A kind of J wave detecting methods based on neutral net | |
CN105030228A (en) | Method for determining P wave position of electrocardiosignal and device for realizing method | |
CN105212922A (en) | The method and system that R wave of electrocardiosignal detects automatically are realized towards FPGA | |
CN108836305B (en) | A kind of ECG feature extracting method of fusion Butterworth filtering and wavelet transformation | |
CN110090016B (en) | Method and system for locating R-wave position, and automatic R-wave detection method using LSTM neural network | |
Zifan et al. | Automated ECG segmentation using piecewise derivative dynamic time warping | |
Shaik et al. | A method for QRS delineation based on STFT using adaptive threshold | |
Alhelal et al. | FPGA-based denoising and beat detection of the ECG signal | |
CN109009087B (en) | Rapid detection method for electrocardiosignal R wave | |
CN114587381A (en) | Spike detection method based on multi-channel EEG intelligent screening and weighted sample generation | |
CN104382589B (en) | Fetal electrocardiogram separation extraction method based on partial resampling by segments | |
Luengo et al. | Blind analysis of atrial fibrillation electrograms: a sparsity-aware formulation | |
KR102451623B1 (en) | Method and Apparatus for Comparing Features of ECG Signal with Difference Sampling Frequency and Filter Methods for Real-Time Measurement | |
CN110179456A (en) | Electrocardio Noise Identification model training and electrocardio noise detecting method, device | |
Alhelal et al. | Denoising and beat detection of ECG signal by Using FPGA | |
Khandait et al. | ECG signal processing using classifier to analyses cardiovascular disease | |
Gómez-Herrero et al. | Relative estimation of the Karhunen-Loève transform basis functions for detection of ventricular ectopic beats | |
Li et al. | An automatic detection algorithm for T wave position based on T wave morphology | |
Mao et al. | ECG Automatic Identification Method based on BP Neural | |
Wang et al. | ECG Feature Wave Recognition Based on Adaptive Wavelet Thresholding Algorithm | |
Niknazar et al. | Detection of characteristic points of ECG using quadratic spline wavelet transfrom | |
CN115153482B (en) | Digital signal filtering processing method and system for blood flow graph |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |