ECG ja sen artefaktien korjaus algoritmisin menetelmin
Aho, Jyrki (2023)
Aho, Jyrki
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023102327867
https://urn.fi/URN:NBN:fi:amk-2023102327867
Tiivistelmä
Työn tarkoituksena oli tutkia, kuinka liikkuvalta kohdehenkilöltä voidaan kerätä ECG dataa usean sensorin avulla, sekä miten tämän kerätyn datan avulla voidaan kouluttaa neuroverkko korjaamaan ECG-käyriin liittyviä artefakteja. Eräs työn haasteista oli se, että sensoreita ei voitu synkronoida keskenään, minkä vuoksi oli kehitettävä uusi synkronointijärjestelmä. Ihmisen kehon koostumus ja sensorien sijoittelu vaikuttaa jonkin verran ECG-käyrien viiveisiin ja käyrän muotoihin, mikä sekin oli korjattava.
ECG- ja liikeanturidataa kerättiin kesällä 2021, jolloin suoritettiin erilaisia aktiviteetteja. Neuroverkkoa kouluttaessa käytettiin apuna myös Physionetistä saatavilla olevaa artefakti tietokantaa. Tämä ratkaisu osoittautui oikeaksi ja sen avulla neuroverkko onnistuttiin kouluttamaan tunnistamaan erilaisia ECG-käyriä.
Neuroverkko suunniteltiin mahdollisimman yksinkertaiseksi ja pieneksi, jotta sen voisi tarpeen vaatiessa siirtää esimerkiksi matkapuhelimeen. Lisäksi datan rajattu saatavuus oli myös yksi syy pitää neuroverkko rajatun kokoisena. Tämä kyseinen ratkaisu osoittautui tutkimuksen aikana oikeaksi ratkaisuksi, koska ilmeni että artefaktien korjaus kärsii, jos neuroverkon kasvattaa liian suureksi.
Työn lopussa vertaillaan valmiiden Python kirjastojen ECG-filtterien tuottamia tuloksia, sekä verrataan niitä kehitettyyn neuroverkkoon. Vertailtavat mallit perustuvat signaalinkäsittelyyn, koska yleisesti saatavilla olevat ECG-käyriin liittyvät neuroverkkomallit on suunniteltu analysoimaan ECG-käyriä. Vertailussa ilmeni, että kehitetty neuroverkko kykenee korjaamaan ECG-käyriin liittyviä artefakteja hieman paremmin, kuin löydetyt algoritmit, jotka oltiin varta vasten suunniteltu korjaamaan ECG-käyrien artefakteja. The purpose of my thesis was to investigate how ECG data can be collected from a moving target person with the help of several sensors, and how this collected data can be used to train a neural network to correct artifacts related to ECG waves. One of the challenges of the work was that the sensors could not be synchronized with each other, which is why a new synchronization system had to be developed. The composition of the human body and the positioning of the sensors cause delays and influence of the shape of the ECG waves, which also had to be corrected.
ECG and motion sensor data were collected in the summer of 2021, when various activities were performed. When training the neural network, the artifact database available from Physionet was also used as an aid. This solution turned out to be correct and with its help the neural network was successfully trained to recognize different ECG wave patterns.
The neural network was designed to be as simple and small as possible, so that it could be transferred to, for example, a mobile phone if necessary. In addition, the limited availability of data was also one of the reasons for keeping the neural network limited in size. This solution turned out to be the correct, because it appeared that artefact correction suffers if the neural network is made too large.
At the end of my thesis, I did compare the results produced by the existing ECG filters from Python libraries, as well as compare them to the developed neural network. The comparable models are based on signal processing, because commonly available neural network models related to ECG waveforms are designed to analyse ECG waves without artifacts. The comparison revealed that the developed neural network can correct artifacts related to ECG waves a little better than the existing algorithms, which were specifically designed to correct artifacts of ECG.
ECG- ja liikeanturidataa kerättiin kesällä 2021, jolloin suoritettiin erilaisia aktiviteetteja. Neuroverkkoa kouluttaessa käytettiin apuna myös Physionetistä saatavilla olevaa artefakti tietokantaa. Tämä ratkaisu osoittautui oikeaksi ja sen avulla neuroverkko onnistuttiin kouluttamaan tunnistamaan erilaisia ECG-käyriä.
Neuroverkko suunniteltiin mahdollisimman yksinkertaiseksi ja pieneksi, jotta sen voisi tarpeen vaatiessa siirtää esimerkiksi matkapuhelimeen. Lisäksi datan rajattu saatavuus oli myös yksi syy pitää neuroverkko rajatun kokoisena. Tämä kyseinen ratkaisu osoittautui tutkimuksen aikana oikeaksi ratkaisuksi, koska ilmeni että artefaktien korjaus kärsii, jos neuroverkon kasvattaa liian suureksi.
Työn lopussa vertaillaan valmiiden Python kirjastojen ECG-filtterien tuottamia tuloksia, sekä verrataan niitä kehitettyyn neuroverkkoon. Vertailtavat mallit perustuvat signaalinkäsittelyyn, koska yleisesti saatavilla olevat ECG-käyriin liittyvät neuroverkkomallit on suunniteltu analysoimaan ECG-käyriä. Vertailussa ilmeni, että kehitetty neuroverkko kykenee korjaamaan ECG-käyriin liittyviä artefakteja hieman paremmin, kuin löydetyt algoritmit, jotka oltiin varta vasten suunniteltu korjaamaan ECG-käyrien artefakteja.
ECG and motion sensor data were collected in the summer of 2021, when various activities were performed. When training the neural network, the artifact database available from Physionet was also used as an aid. This solution turned out to be correct and with its help the neural network was successfully trained to recognize different ECG wave patterns.
The neural network was designed to be as simple and small as possible, so that it could be transferred to, for example, a mobile phone if necessary. In addition, the limited availability of data was also one of the reasons for keeping the neural network limited in size. This solution turned out to be the correct, because it appeared that artefact correction suffers if the neural network is made too large.
At the end of my thesis, I did compare the results produced by the existing ECG filters from Python libraries, as well as compare them to the developed neural network. The comparable models are based on signal processing, because commonly available neural network models related to ECG waveforms are designed to analyse ECG waves without artifacts. The comparison revealed that the developed neural network can correct artifacts related to ECG waves a little better than the existing algorithms, which were specifically designed to correct artifacts of ECG.