§ 瀏覽學位論文書目資料
  
系統識別號 U0002-2306200614174000
DOI 10.6846/TKU.2006.00730
論文名稱(中文) 個人心電圖量測系統之實現
論文名稱(英文) An implementation of individual ECG acquisition system
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 電機工程學系碩士班
系所名稱(英文) Department of Electrical and Computer Engineering
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 94
學期 2
出版年 95
研究生(中文) 謝廣霖
研究生(英文) Kuang-Lin Hsieh
學號 693350109
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2006-06-20
論文頁數 106頁
口試委員 指導教授 - 賴友仁
委員 - 謝景棠
委員 - 施國琛
委員 - 陳俊忠
委員 - 許志旭
關鍵字(中) 數位濾波器
心電圖
關鍵字(英) MSP430
UML
SD card
Lomb method
FIR filter
Embedded system
Bluetooth
HRV
第三語言關鍵字
學科別分類
中文摘要
本論文提出一個心電圖擷取系統,其中包含心電圖機的製作、QRS波偵測、HRV頻域分析的實現以及小型嵌入式系統的設計。我們利用混合訊號處理器Mixed Signal Processor (MSP) 實現一個低複雜度的心電圖機。為了即時濾除室內電源信號以及肌肉移動所造成的雜訊,利用Equiripple method設計了一個FIR等連波濾波器,並且利用此FIR係數的對稱性,加快2倍濾波的速度及減少2倍的係數儲存量,最後再以MSP430實現此FIR濾波器。信號的儲存是使用FAT16格式存於SD Card,傳送則是利用Bluetooth達成無線傳輸。心電圖QRS複合波偵測演算法的實作上,因考量MSP430的效能,在設計演算法時,就將運算效率考量進去,使用移位或是FIFO的資料結構來加強偵測速度,以至於能夠在MSP430中即時地偵測R波位置,並且提出一個動態調整的閥值,來適應每個人的心跳大小。在HRV的分析方面,由於RR sequence並不是等間隔的取樣,因此需要內插(Interpolation)與重新取樣(Resample)來獲得類似等取樣間隔的訊號,這樣才能進行複立葉轉換,但這種處理會造成某些頻帶的破壞。因此我們使用Lomb method來實現HRV的頻域分析,經過驗證後發現,Lomb method的確比內插與重新取樣的方法獲得更好的頻譜。

    在系統架構方面,我們將Timer-trigger cooperative scheduler加入心電圖機中,並定義每個task中所擁有的狀態,讓此scheduler在各個task中的state進行切換,進而達到系統的可維護性(maintainability)、可預測性(predictability)以及即時性(Real-time)。最後利用Unified Modeling Language (UML)中的狀態圖、類別圖、順序圖、部署圖,詳細地描述本系統的行為以及結構。本論文詳細地描述整個系統的實現方法,包含雛型機(prototype)、演算法、系統架構,提供各領域有意研究心電圖的研究者。
英文摘要
An individual ECG acquisition system is proposed in this paper which includes implementation of the ECG recorder, the detection of QRS complex, the HRV frequency analysis and the design of small-scale embedded system. The mixed signal processor (MSP) is used to reduce the complexity of an ECG recorder. To reduce the interference of 60Hz noise from the power line, the MSP is used to implement a finite impulse response (FIR) filter which is designed to be equiripple. The filter structure combines the pipe for the input samples and the symmetrical characteristic of the FIR filter for efficiently computing the convolution. The experimental results show that the output ECG signal with the PQRST feature is easy to be recognized. This ECG signal is recorded for 24hr using a SD card. Furthermore, the ECG signal is transmitted to a smartphone and PC through Bluetooth to decrease the burden of this ECG recorder.

In considering the performance of MSP430, the algorithm of detecting QRS complex is implemented using bit-shifting and FIFO data structure to increase detection speed, so that the detection of the real-time R fiducial point can be realized with MSP430. The unevenly sampling interval of RR sequence should be adjusted by interpolation and re-sampling. But this procedure causes the high frequency domain of RR sequence to be destroyed. Therefore, Lomb method is used to implement the frequency analysis of HRV. As the result of verification, show that the Lomb method is better than the conventional method.

A time-triggered cooperative scheduler is added in this ECG recorder. Each state of tasks is defined and the tasks are dispatched by the scheduler for the requirements of reliability, maintainability, and predictability in this embedded system. The class diagram, the state diagram, the sequence diagram and the deployment diagram in Unified Modeling Language (UML) are used to describe the proposed system.
第三語言摘要
論文目次
目錄
圖目錄	IV
表目錄	IX
第一章 緒論	1
1.1 研究背景及動機	1
1.2 研究目的	3
1.3 論文架構	9
第二章 低複雜度之心電圖擷取系統	10
2.1 硬體元件方塊圖	10
2.2 心電訊號擷取方法	11
2.2.1 心電訊號前處理	11
2.2.2 混合訊號處理器	12
2.2.3 數位濾波器規格與實現	15
2.3 儲存系統	24
2.3.1 SD Card控制原理	26
2.3.2 心電圖檔案儲存與編碼格式	33
2.4 生理資訊傳輸	39
2.4.1 藍芽無線傳輸	39
2.4.2 網路傳輸	40
第三章 QRS Complex偵測演算法	43
3.1 心電圖R波偵測	43
3.1.1 R波偵測前處理	44
3.1.2 最大值比較	47
3.1.3 動態閥值	49
3.1.4 Match filter	53
第四章 Heart Rate Variability(HRV)分析	55
4.1	HRV分析簡介	55
4.2	Lomb method	57
4.3	Lomb method驗證	60
第五章 圖型化的系統塑模	63
5.1.	Unified Module Language(UML)	63
5.2.	嵌入式系統設計	64
5.3.	心電擷取裝置韌體架構	65
5.3.1.	時間驅動之協同排程器 (Time-triggered Cooperative Scheduler)	65
5.3.2.	Task設計	69
5.3.3.	Interrupt Service Routine (ISR)	78
5.3.4.	韌體架構	83
5.3.5.	心電圖分析軟體架構	87
第六章 結果與討論	89
6.1	心電圖擷取裝置製作成果	89
6.2	分析軟體成果	93
6.3	成果總結	98
6.4	未來發展方向	100
6.4.1	心電訊號擷取裝置	100
6.4.2	心電圖分析	101
第七章 參考文獻	102

 
圖目錄
圖1. 1 十大死因中青年罹患心臟病的比率	2
圖1. 2 PDA為基礎之居家看護系統	4
圖1. 3可攜式無線生理訊號量測系統之實現	4
圖1. 4 以微控制器為主的可攜式心電圖記錄器	4
圖1. 5 達凱的Read My Heart	5

圖2.1硬體元件方塊圖	11
圖2.2  心電圖的前處理電路	12
圖2.3  MSP430硬體乘法器架構圖	15
圖2.4  Frequency Response	17
圖2.5  Impulse Response	18
圖2.6  濾波器結構(放入新取樣值前)	19
圖2.7  濾波器結構(放入新取樣值後)	20
圖2.8  假指令演算過程	21
圖2.9  原始訊號以及加入60Hz雜訊的合成訊號。	22
圖2.10  原始訊號以及處理後的訊號	23
圖2.11  濾波過後心電圖	24
圖2.12  Sd Card 腳位規格圖	26
圖2.13  命令格式	27
圖2.14  命令格式範例	27
圖2.15  R1的格式	28
圖2.16  發送命令與回應的時序圖	29
圖2. 17 寫入指令回應的延遲時間	30
圖2.18  讀取的時序圖	30
圖2.19  讀取指令的回應的延遲時間	30
圖2.20  CRC7 Generator/Checker	33
圖2.21  CRC16 Generator/Checker	33
圖2.22  212 編碼	38
圖2.23  藍芽模組	39
圖2.24  醫療諮詢平台	40
圖2.25  使用Smart Phone顯示心電圖	41
圖2.26  登入伺服器與醫生列表	42

圖3.1  R波偵測流程	44
圖3.2  原始訊號(TP1)	44
圖3.3  經過低通後的訊號(TP2)	45
圖3.4  微分以及低通後的訊號 (TP4)	46
圖3.5  經過8點的平滑濾波 (TP5)	47
圖3.6  Sliding window	48
圖3.7  即時偵測	49
圖3.8  計算動態閥值的流程圖	51
圖3.9  標出R波位置的心電圖	52
圖3.10  偵測R波演算法	53
圖3.11  統計平均的心電圖	54

圖4. 1 HRV頻譜分析	56
圖4. 2 RR sequence	60
圖4. 3模擬RR sequence 之FT與Lomb比較	61
圖4. 4使用式(4.8)模擬取樣不固定的RR sequence	61
圖4. 5取樣間隔不一之FT與Lomb Method比較	62

圖5. 1 排程器的狀態圖	68
圖5. 2 TaskECG的狀態圖	71
圖5. 3檔案處理狀態圖	72
圖5. 4命令分析狀態圖	74
圖5. 5命令分析部署圖	75
圖5. 6某一時間下的排程順序	77
圖5. 7外部中斷之狀態圖	78
圖5. 8  Release Timer之活動圖。	80
圖5. 9 TimerB Driver的活動圖。	81
圖5. 10發生RxD中斷時的處理順序	82
圖5. 11資料傳輸	83
圖5. 12 心電圖機部署圖	84
圖5. 13心電圖機韌體類別圖	86
圖5. 14心電圖分析軟體類別圖	88

圖6. 1量測電極	89
圖6. 2 量測方法	90
圖6. 3 原型機正面	91
圖6. 4 原型機反面	91
圖6. 5 使用Smart Phone處理心電圖	93
圖6. 6分析軟體介紹	94
圖6. 7 濾波後之波形以及閥值追蹤	95
圖6. 8  HRV的頻譜顯示功能	95
圖6. 9 ECG訊號的FFT顯示功能---未濾波	96
圖6. 10 ECG訊號的FFT顯示功能---已濾波	96
圖6. 11 RR序列顯示功能	96
圖6. 12平均ECG與特徵點顯示功能	97
圖6. 13  ECG的瀑布圖	98
 
表目錄
表2. 1 濾波器規格	16
表2. 2 各延遲時間的對照表	31
表2. 3 FAT16 boot recorder	35
表2. 4 FAT sector distribution	35
表2. 5  FAT16 table property	36
表2. 6 儲存卡的磁區分配	37

表5. 1 Cooperative 與 Pre-emptive排程方法比較	66
表5. 2命令格式	73
參考文獻
[1].	吳丕均,”可攜式即時心律變異度監視系統”,中原大學醫學工程系, 2002。
[2].	涂清源,"建構無線傳輸與網際網路之居家看護系統",中原大學醫學工程學系碩士論文,2002。 
[3].	葉春甫,”以PDA為基礎之居家看護系統",台灣大學電機工程研究
所, 2002。
[4].	吳炯男,”可攜式無線生理訊號量測系統之實現",南台科技大學電機工程系,2004。
[5].	Segura-Juarez J.J., Cuesta-Frau D., Samblas-Pena L., and Aboy M., ”A microcontroller-based portable electrocardiograph Recorder”, IEEE Transaction on biomedical engineering, vol. 51, no. 9, September. 2004.
[6].	Meissimilly G., Rodriguez J., Rodriguez G., Gonzalez R., and Canizares M., ”Microcontroller-based real-Time QRS detector for ambulatory monitoring”, Proceedings of the 25" Annual International Conference of the IEEE EMBS Cancun, Mexico . September 17-21,2003
[7].	呂嘉陞編譯,”心電圖學必備”,合記圖書出版社。
[8].	謝文哲, 吳賢財, 林榮三編著,” 省電型16位元單晶片MSP430入門實務”。
[9].	Ying-Wen Bai,Wen-Yang Chu,Chien-Yu Chen,Yi-Ting Lee,Yi-Ching Tasi, and Cheng-Hung Tasi,”Adjustable 60Hz noise reduction by a notch filter for ECG signals”, IMTC2004 – Instrumentation Measurement Technology Ccnference, Como, Italy 18-20 May 2004.
[10].	T.W. Parks, and J.H. McClellan. “A program for the design of linear-phase filter impulse response digital filters.”, IEEE Trans. on Audio and Electroacoustics, August 1972. p.p 195-199.
[11].	Vinay K. Ingle, and John G. Proakis, ”Digital signal system with Matlab, Tomson Learing, 2000.
[12].	Sanjit K. Mitra, Digital Signal Processing a computer based approach .
[13].	Emmanuel C. Ifeochor, and Barrie W. Jervis,  Digital signal processing a practical approach
[14].	MIT-BIH Database distribution, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA02139, 1998
[15].	SD Card, SanDisk Industrial Grade, No. 80-36-00285, http://www.sandisk.com, October 2003.
[16].	劉昌賢,“以數位訊號處理器為基礎的即時心率分析器設計”,長庚大學電機工程系,2001
[17].	Terry B. J. Kuo, Tsann Lin, Cheryl C. H. Yang, Chia-Lin Li, Chieh-Fu Chen, and Pesus Chou, ”Effect of aging on gender differences in neural control of heart rate”, American Physiological Society, 1999. p.p 2233-2239.
[18].	Lomb NR. “Least-squares frequency analysis of unequally spaced data.” Astrophysics and Space Science 1976, p.p 447–462,
[19].	Tran Thong, Iris O Yung, Daniel P Zajdel, Roger M Ellingson, James McNames, Mateo Aboy, and Barry S. Oken, “Heart rate variability analysis of effect of nicotine using periodograms”, IEEE EMBS San Francisco, USA, Sept. 2004. p.p 294-297.
[20].	George B. Moody, ”Spectral analysis of heart rate without resampling”, Harvard-M.I.T. Division of Health Sciences and Technology, Cambridge, MA, USA.
[21].	Willian Perss, and George.B Rybicki, “Fast algorithm for spectral analysis of unevenly sampled data”, astrophysical journal, March 1989, p.p 277-280.
[22].	Thong T 1, McNames J2, Aboy M2, and Oken B, ”Averaged Lomb periodograms for nonuniform sampling”, Bio-signal, 2004
[23].	Pablo Laguna, George B. Moody, and Roger G. Mark, ”Power spectral density of unevenly sampled data by least-square analysis: performance and application to heart rate signals”, IEEE transaction on biomedical engineering, vol.45, june 1998. p.p 698-715.
[24].	Grady Booch, James Rumbaugh, and Ivar Jacobson, The unified modeling language user guide , Addison-Wesley, 2005.
[25].	朱成瑋,“嵌入式控制系統設計與實務:以智慧型FCU恆溫控制器為例”,台灣科技大學自動化與及控制研究所,2005。
[26].	許信傑,“使用統一模式語言與設計樣式於即時系統的開發”,中央大學,2000。
[27].	Michael J.Pont, Patterns for timer-triggered embedded systems, Addison-Wesley, 2001.
[28].	Masa Ishijima, ”Monitoring of electrocardiograms in bed without utilizing body surface electrodes”, IEEE Transaction on biomedical engineering, vol. 40, JUNE 1993, p.p 593-594.
[29].	MSP430F149, Texas Instruments mixed signal processor datasheet, http://www.ti.com, July 2000.
[30].	Teera Phatrapornnant and Michael J. Pont, ”Reducing jitter in embedded systems employing a time-triggered software architecture and dynamic voltage scaling”, IEEE Transaction on computer, vol.55, Feb. 2006, p.p 113-124.
[31].	Robert A. Warner, “Thee Waterfall Display for Continuous Electrocardiographic Monitoring”, The ISCE 27th Annual Conference, April 2002.
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文立即公開
校外
同意授權
校外電子論文立即公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信