基于Matlab的心电信号分析与处理摘要:本课题设计了一个简单的心电信号分析系统。
直接采用Matlab语言编程对输入的原始心电信号进行处理,并通过matlab语言编程设计对其进行时域和频域的波形频谱分析,根据具体设计要求完成系统的程序编写、调试及功能测试,得出一定的结论。
(This topic has designed a simple ECG analysis system. Direct use of Matlab programming language original ECG signal input is processed, and its waveform spectrum analysis of the time domain and frequency domain matlab language programming through design, prepared in accordance with specific design requirements to complete the system of procedures, debugging and functional testing, too a certain conclusion.) 关键字:matlab、心电信号、滤波一、课题目的及意义心电信号是人类最早研究并应用于医学临床的生物信号之一,它比其它生物电信号更易于检测,并且具有较直观的规律性,因而心电图分析技术促进了医学的发展。
然而,心电图自动诊断还未广泛应用于临床,从国内外的心电图机检测分析来看,自动分析精度还达不到可以替代医生的水平,仅可以为临床医生提供辅助信息。
其主要原因是心电波形的识别不准,并且心电图诊断标准不统一。
因此,探索新的方法以提高波形识别的准确率,寻找适合计算机实现又具诊断价值的诊断标准,是改进心电图自动诊断效果,扩大其应用范围的根本途径。
如何把心电信号的特征更加精确的提取出来进行自动分析,判断出其异常的类型成了亟待解决的焦点问题。
本课题通过matlab语言编程,对原始心电信号进行一定的分析处理。
(ECG is the first human study and one biological signal applied to clinical medicine, it is easier to detect than other biological signals, and has a more intuitive regularity, thus ECG analysis technology for the development of medical science.However, ECG automatic diagnosis has not been widely used in clinical, ECG machine detection analysis from home and abroad, the accuracy of the automatic analysis can replace the doctor has not yet reached the level of aid can only provide information to the clinician. The main reason is not allowed to identify the ECG waveform and ECG diagnostic criteria are not uniform. Therefore, to explore new ways to improve the accuracy of waveform recognition, searching for computer-implemented but also with the diagnostic value of the diagnostic criteria,the effect of improving the electrocardiogram automatic diagnosis, the fundamental way to expand its range of applications. How to ECG extract more accurate feature automatically analyze, determine the type of exception has become the focal point of their problems to be solved)二、设计思路1.根据给定的一段MIT-BIH心电信号,画出心电信号的时域波形和频谱图(幅频和相频);(According to a given period of MIT-BIH ECG, ECG draw a time-domain waveform and spectrum (amplitude and phase frequency); 2.根据心电信号频率范围及其噪声的频率范围设计2个滤波器(一个IIR,一个FIR)实现对心电信号滤波。
滤波器的种类(高通,低通,带通,带阻),滤波器性能指标(通阻带截止频率,衰减系数),滤波器的设计方法(IIR有冲击响应不变法和双线性变换法,FIR有窗函数法及频率抽样法)等自行设计。
要求输出所设计的滤波器的系统函数,画出滤波器的频率响应(幅频响应和相频响应)曲线;(Design two filters (a IIR, a FIR) filter to achieve ECG ECG according to the frequency range and noise frequency range. Filter type (high-pass, low pass, band pass, band stop), filter performance indicators (pass stopband cutoff frequency, attenuation coefficient), filter design methods (IIR has impulse response invariance and bilinear transform , FIR with window function method and frequency sampling method) own design. System functions required output filter design, draw the filter frequency response (amplitude-frequency response and phase frequency response) curve;)3.用该滤波器对心电信号进行滤波,画出滤波以后心电信号的时域波形和频谱(幅频);分析信号滤波前后心电信号的时域和频域的变化;(With this filter ECG signal filtering, filtering after the draw ECG waveform and spectrum (amplitude and frequency); changes before and after the time-domain analysis of ECG signal filtering and frequency domain;)4.两个滤波器滤波效果异同分析(Similarities and differences between the two filters filtering effect analysis)三、设计过程及分析3.1原始心电信号分析用load函数将原心电信号导入b = load('C:\Users\TOSHIBA\Desktop\信号处理\102.txt'),并画出心电信号的时域波形和频谱图(幅频和相频),(ECG with a load function will import b = load ('C: \ Users \ TOSHIBA \ Desktop \ Signal processing \ 102.txt'), and draw the ECG waveform and spectrum (amplitude and phase frequency ) (如图1所示:图1 原始心电信号的时域波形图及频谱图心电信号由于受到人体诸多因素的影响,因而有着一般信号所没有的特点:(1)信号弱。
心电信号是体表的电生理信号,一般比较微弱,幅度在10pV~5mV,频率为0.05~100Hz。
例如从母体腹部收取到的胎儿心电信号仅10/zV~50/IV。
(2)噪声强。
由于人体自身信号弱,加之人体又是一个复杂的系统,因此信号容易受到噪声干扰。
(3)随机性强。
心电信号不仅是随机的,而且是非平稳的。
同时,在心电图检测过程中极易受到各种噪声源的干扰,从而使图像质量变差,使均匀和连续变化的心电数值产生突变,在心电图上形成一些毛刺。
使原本很微弱的信号很难和噪声进行分解。
可能出现的噪声有如下的种类:1)工频干扰工频干扰是由电力系统和人体的分布电容引起的,其频率包括50Hz(MIT-BIH数据库数据工频因为是美国标准,所以是60Hz)的基波及其各次谐波,其幅值成分在ECG峰一峰值的0—50%范围内变化。
2)引起基线漂移的干扰心电信号有时候会出现信号基线起伏不平的现象,造成这样的现象有很多原因,主要的有:①呼吸运动人体呼吸时胸腔内器官和组织会发生一定程度的变化,会对在体表记录到的心电图波形的幅度和形态有所影响,表现为基线随呼吸产生周期性或非周期性漂移,从而导致心电波形的幅度随呼气和吸气而分别上抬和下移。
呼吸运动是引起心电基线漂移的主要原因。
②运动伪迹运动伪迹是由于人体轻微运动造成电极与入体的接触电阻发生变化而引入的一种干扰,它的产生原因仅仅是接触电阻的变化,而不是接触的断续。
这种干扰同样导致信号基线的变化,但不是基线的跃变。
③信号记录和处理中电子设备引起的干扰这种干扰对信号影响很大,严重时可完全淹没心电信号或使得基线剧烈漂移,其中导联开路和放大器的热移是主要因素。
这种干扰往往无法通过心电分析算法来校正。
由于心电波形已经完全畸变,此时对这些数据分析已无太大意义。
所以一般跳过此段数据。
3)高频噪声心电信号中的高频噪声主要是肌电噪声。