Kablosuz iletişim kullanılarak kalp seslerinin gerçek zamanda depolanması, görüntülenmesi ve analizi
Real time heart sound storage, monitoring and analysis using wireless communication
Yazar: CEMİL OVACIK
Danışman: PROF. DR. TAMER ÖLMEZ ; PROF. DR. AHMET COŞKUN SÖNMEZ ; YRD. DOÇ. DR. GÜLAY ÖKE
İstanbul Teknik Üniversitesi / Fen Bilimleri Enstitüsü / Mekatronik Mühendisliği Ana Bilim Dalı / Zooloji Bilim Dalı
Derece: Yüksek Lisans, 2014
Konu: Elektrik ve Elektronik Mühendisliği = Electrical and Electronics Engineering ; Mekatronik Mühendisliği = Mechatronics Engineering

Özet:
Kalp sesleri, kalbin atışı sırasında kalp kapakçıklarının acilip kapanması ve kanınkalp içerisinde akmasi nedeniyle oluşan seslerdir. Kalp sesleri, birincil kalp sesi(S1) ve ikincil kalp sesi (S2) olarak iki ana bilesenden olusur. Bu kalp seslerikullanilarak pek çok kalp rahatsızlıgi etkili kullanarak teşhis edilebilir.Klasikyontemde kalp seslerinin dinlenmesinde steteskop kullanılır.Ancak ortam gürültüsu,dinleyicinin kulağının iyi duymamasi ya da deneyim eksikligi gibi sebeplerden oturusteteskopla dinlenen kalp sesi yetersiz kalabilmektedir. Bilgisayar ve sinyal isleme alanindaki gelismelerle birlikte, tibbi uygulamalarda bilgisayar desteklihizli ve dogru bir bicimde olcum, teshis ve depolama yapilabilir.  Bu sebepten dolayi, kalp sesinin dinlenmesi, kayit edilmesi, goruntulenmesi vehizli bir sekilde tani konulabilmesi için gelişmiş bilgisayar destekli yöntemlerin kullanilmasi gerekli hale gelmistir.
Bu tez çalısmasında amaç, fizyolojik kalp sesinin elde edilip, elektriksel sinyaledönüştürülmesi, elde edilen sinyalin kablosuz olarak bilgisayara gönderilmesi vesayisal isaret isleme teknikleri ile analiz edilmesidir.
Bu tez çalısmasında, insan vucudundan kalp sesininelde edilebilmesi için 3 sensor tasarlanmis vedenenmistir.Tasarlanan 3 sensor kullanilarakelde edilen kalp sesi sinyaliuzerinde islem yapilamayacak kadar düşük genlikte olduğundan, sinyal ilk olarak  kuvvetlendirilmistir. Kuvvetlendirilen bu kalp sesi sinyali, tasarlanan analog  bir bant geciren filtreden gecirilip, gurultu kaynaklari (insan vucudu, dis ortam sesi, konusma,elektriksel vb.) sinyal uzerinden temizlenmis ve kalp sesi bilesenleri belirgin hale getirilmeye calisilmistir. Kuvvetlendirilmis ve ardindan filtreden gecirilmis kalp sesi sinyali, mikrodenetleyicinin analog-sayisal donusturucu (ADC)  girisi kullanilarak sayisal isarete donusturulmus ve sayisal isarete donusturulen bu sinyal, mikrodenetleyicinin bagli olduguwifi modül ile TCP-IP protokolu kullanilarak, kablosuz olarak bilgisayar ortaminaaktarılmıştır. Bilgisayar ortamina aktarılan bu sayisal kalp sesi işaretleri bir takim sayisal isaret isleme yontemleri kullanilarak analiz edilmistir. Sayisal isaret isleme yontemleri kullanilarak segmente edilen birincil (S1) ve ikincil (S2) kalp sesleri bilgisayar ortamındagerçek zamanli olarak gosterilmis ve kayit edilmistir.

Abstract:
The heart sounds are produced during the opening and closing of the heart and the flow of blood through the heart. There are two main heart sound component: the first heart sound (S1) and the second heart sound (S2). Using this heart sounds, many heart diseases can be diagnosed effectively. In classical method, stethoscope is used to listen heart sounds. However, auscultation of heart sounds may be insufficient because of ambient noise or lack of experience.With the developments in computing and signal processing,computer-aided fast and accurate measurements, diagnosing and storing can be done in medical applications. For that reason, it becomes necessary to use advanced computer-aided methods for auscultation, storing, imaging and diagnosing of heart sounds fastly and accurately.
The purpose of this thesis is to obtaining the physiological heart sound from human body, converting them into electrical signals and sending these obtained signals to the computer wirelessly to be analysed using  digital signal processing techniques.
In this thesis, three sensors are designed and tried to obtain heart sound for human body. The first sensor is designed by unifying a microphone and a stethoscope. Stethoscope is used to mechanically obtain and amplify the physical heart sound from human body and microphone is used to convert physical heart sounds to the analog electrical signals. Output of the sensor is connected to the opamp amplifier to amplify low amplitude analog heart signals and to filter them from noise (human body noise, external ambient sounds, conversation sounds, electrical noise, etc.) sources. To be able to design this opamp circuit small and more portable, a single power supply circuit design has been chosen. Purpose of this circuit is to amplify low amplitude heart signal by 100 times and filter it between 10 Hz to 2000 Hz. Filtering bandwidth is chosen between 10 Hz to 2000 Hz because most of the important heart sound component is known to be in that band. The experiments performed using this sensor and opamp circuit showed that obtained heart sounds are very sensitive to other sound sources (or noise). When this sensor is used in loud area, ambient and conversation sounds are also amplified with heart sounds so it becomes hard to obtain desired heart sound signals. However, when used in silent area, this sensor is the best choise for obtaining desired heart sound signals from human body.
For the second sensor, a piezoelectric transducer is used to obtain mechanical heart sound signals and convert them to the analog electrical signals. Piezoelectric metarials converts the applied mechanic pressure, strain, vibration or force to the electric signal. Using this feature of piezoelectric metarials, heart sounds vibrations are converted into electrical signals. But output of the piezoelectric transducer has very high empedance (at the level of Mega-ohm) so amplifier opamp circuit need to be design very carefully in order to obtain heart sound signals properly. A JFET input opamp which has very high input empedance (at the level of Giga-ohm) is chosen to amplify and filter heart sound signal coming from piezoelectric sensor. But the main problem is that when using such high empedance levels (such as output of the piezoelectric sensor or input of the opamp ), the circuit becomes very sensitive to electrical noise so the circuit must be designed carefully, shielded and well-grounded. Otherwise the heart sound signal will be lost in noise and can not be obtained. The opamp circuit has two main job : amplifying the heart sound signal coming from piezoelectric sensor by 100 times (from order of mili-volt to volt ) and filtering the signal between 10 Hz to 2000 Hz (most of the significant heart sound component is in that bantwidth ). Main advantage of using this sensor is its small size, size of the sensor and opamp circuit is very compact and it can be attached to human body for all day usage without discomfort. Another advantage is that this sensor is not effected by ambient or conversation sounds, it only gather sounds and vibrations from human body. The main disadvantage of the sensor is that this sensor can be easily affected from electrical noise because output of piezoelectric sensor and input of the opamp has very high empadance and it makas the sensor unguarded to electrical noise. One of the other disadvantage is that while gathering the desired heart sounds, other sound sources like breathing and blood flow sounds are also gathered from human body and it makes difficult to recognize heart sound from the sound gethered by piezoelectric sensor and opapm circuit.
Third and last sensor used in this thesis study to obtain heart sound signals is an accelerometer. Accelerometer is used to measure vibrations caused by heart beat on the human skin. A very sensitive sensor is used, it can measure the vibration accuracy of 0.1*. A digital output accelerometer chip is used to measure heart sounds so no amplifier and filter circuit or analog to digital conversation is needed for this sensor. 4 wire SPI protocol is used to communicate between accelerometer chip and microcontroller. The main advantage of this sensor is that this sensor is not affected by electrical noise sources because of digital communication and is not affected by sound noise sources like ambient or conversation sounds, it only measures the vibration of heart beat. The main disadvantage of this sensor is that programming of SPI protocol is a bit tough to communicate between sensor and microcontroller. Other disadvantage of accelerometer sensor is that movement of human body is a noise sources for this sensor, for clean heart sounds measurements, human body needs to be stood still.
To acquire analog and digital heart sound signals from 3 designed sensor, a microcontroller system is used. If the used sensor is analog, it converts analog electric signals to digital using ADC ports of microprocessor or if the sensor output is digital, microcontroller communicates it via SPI protocol to collect heart sound signals. Microcontroller collects 2000 samples per second from sensors and saves them to a buffer to be sent, it means that microcontroller collects heart sounds at 2 Khz sampling rate. Every collected 500 samples of heart sound signal are sent to Wifi module via serial communication. When Wifi chip gets the data, it sends the data to the computer using TCP/IP protocol wirelessly.
Heart sound signals obtained by three different sensors and processed by microcontroller and WiFi module are sent to the computer wirelessly. Using the code written in Matlab, firstly TCP/IP protocol is set to wait for incoming connection request from Wifi module. When the request comes, written code starts the communication and waits for collecting heart sound signals. Incoming heart sound signals firstly normalized and then filtered to remove noise. Then using the mentioned algorithms in section 5, S1 and S2 heart sound components are tried to be segmented. Then segmented heart sound components S1 and S2 are shown in real time graph.