You are on page 1of 63

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

SIM UNIVERSITY SCHOOL OF SCIENCE AND TECHNOLOGY

AUTOMATED DETECTION OF SLEEP APNOEA ECG SIGNALS USING NON-LINEAR PARAMETERS

STUDENT: LIM LIANG FENG BENJAMIN (N0604073) SUPERVISOR: DR. RAJENDRA ACHARYA U. PROJECT CODE: JAN2009/BME/05

A project report submitted to SIM University in partial fulfilment of the requirements for the degree of Bachelor of Biomedical Engineering (Honours) NOVEMBER 2009

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

ACKNOWLEDGEMENTS I would like offer my sincerest gratitude to my supervisor, Dr. Rajendra Acharya, whose guidance, patience, support and encouragement right from the start to the end of this project enabled me to develop a greater understanding in this subject and without him, this thesis would not have been completed or written. I would also like to convey special thanks to Brett McLaren and Dylan Tan from ResMed Singapore Pte Ltd for their invaluable assistance and the wealth of literature they have provided me. Lastly I offer my regards and blessings to all of those who have supported or aided me in any respect throughout the length of my project.

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

ABSTRACT Sleep apnoea is a very common sleep disorder which is able to cause symptoms such as daytime sleepiness, irritability and poor concentration. Electrocardiography (ECG) provides information about the electrical activity of the heart. Characteristics such as non-stationary and non-linearity are that of an ECG signal. ECG signals can provide plenty of physiological information about the heart. Non-linear parameters such as Approximate Entropy (ApEn), Fractal Dimension (FD), Correlation Dimension (CD) and Hurst Exponent (H) were utilised to characterise ECG signals belonging to three respiratory events. These events are namely apnoea, hypopnoea and normal breathing. Using non-linear analysis to detect sleep apnoea can potentially do away with need of polysomnography (PSG). This system could be more favourable than PSG due to its less cumbersome nature. In this study, it was proven that this system is very promising approach in distinguishing apnoeas, hypopnoea and normal breathings. Artificial neural network (ANN) classifier was utilized to train these parameters. Recurrence plots and use of surrogate data were used to determine non-stationarity of time-series2 and non-linearity in the original ECG signal respectively. ANN classification produced an average classification accuracy of 90%, specificity and sensitivity of 95.24% and 100% respectively. 99.16% was also obtained for positive predictive value (PPV).

ii

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

TABLE OF CONTENTS Title ACKNOWLEDGEMENTS ABSTRACT TABLE OF CONTENTS CHAPTER ONE INTRODUCTION
1.1 Project Background

Page i ii iii

1 1 1 3 5 6 8 13 14

1.1.1 What is Sleep? 1.1.2 What is Sleep Apnoea? 1.1.3 Understanding Obstructive Sleep Apnoea (OSA) 1.1.4 Understanding Central Sleep Apnoea (CSA) 1.1.5 Understanding Electrocardiography (ECG) and its Signals 1.1.6 Detection of Sleep Apnoea Today
1.2 Objectives and Scope of Project 1.3Layout of Thesis Report

CHAPTER TWO MATERIALS AND METHODS 2.1 Data Collection 2.2 ECG Signal Analysis Methods 2.2.1 State Space Reconstruction 2.2.2 Estimation of Embedding Dimension, m 2.2.3 Estimation of Delay Time, 2.2.4 Approximate Entropy (ApEn) 2.2.5 Correlation Dimension (CD) 2.2.6 Largest Lyapunov Exponent (LLE) 2.2.7 Hurst Exponent (H) 2.2.8 Fractal Dimension (FD) 2.3 Back-Propagation Algorithm (BPA) iii 15 15 16 16 17 17 18 18 19 19 20

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

2.4 Recurrence Plots 2.5 Surrogate Data CHAPTER THREE RESULTS 3.1 Analysis of Non-Linear Parameters 3.2 Analysis of Classification Results 3.3 Analysis of Surrogate Data 3.4 Analysis of Recurrence Plots CHAPTER FOUR DISCUSSION CHAPTER FIVE CONCLUSIONS AND RECOMMENDATIONS FOR FUTURE WORK CHAPTER SIX REFLECTIONS REFERENCES MEETING LOGS

21 22

23 26 27 28

30

34

35 37 45

iv

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

INTRODUCTION 1.1 1.1.1 Project Background What is Sleep?

One third of our lives are spent sleeping. Sleep is an essential part of our lives that one cannot live without. In order for one to function well at work or at play, adequate amount of sleep is necessary. Sleep is a physical and mental resting condition in which an individual becomes relatively quiescent and unaware of the surroundings 5. In other words, sleep is a partial detachment from the world where most external stimuli are unable to trigger the senses.

Sleep can be defined based on two components, behavioural and physiological11. The behavioural component consists of characteristics such as lack of movement, slight movement, decreased response to external stimulation, elevated reaction time, quiescence, poor cognitive function etc. For the physiological component, findings are obtained from the use of electroencephalography (EEG), electrooculography (EOG) and electromyography (EMG) and also from other physiological changes in ventilation and circulation. Normal sleep comprises of rapid eye movement (REM) and non-REM (NREM) types. REM sleep represents dreaming stage of sleep, whereas NREM means that sleep that is further divided into 4 stages depending on the PSG results 95. Stage 1 NREM sleep can be considered as "drowsiness" where alpha waves of wakefulness are taken over by theta waves in EEG, and during which slow, rolling eye movements are seen with slightly reduced tonicity in EMG results and this is followed by K complexes characteristic of Stage 2 NREM sleep 95. Stages 3 and 4 of NREM sleep are reflected as slow-wave sleep where delta waves on EEG are dominant. In stage 3, delta waves consist of about 20% to 50% of the EEG, while in stage 4; delta waves consist of more than 50% of the EEG14.

1.1.2 What is Sleep Apnoea? Sleep apnoea is defined as the momentary cessation or absence of breathing when one is sleeping10. Apnoeas are presented as distinct pauses in breathing where each pause lasts more than 10 seconds63. Apnoea events are repeatedly occurring 1

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

during sleep in patients diagnosed with sleep apnoea. Sleep apnoea can be diagnosed by getting the patient to undergo a sleep study or in clinical terms, polysomnography (PSG). So what are the causes of sleep apnoea? It is still unknown but to look at it in a simple view, if the airway of person is too narrow then there will be a likelihood of obstruction, hence the problem can be solved by enlarging the airway81. Sleep apnoea is classified into 3 types. The 3 types of sleep apnoea are obstructive sleep apnoea, central sleep apnoea and mixed sleep apnoea and of all 3, obstructive sleep apnoea is the most common83. Mixed sleep apnoea is the combination of obstructive sleep apnoea and central sleep apnoea. It was noted that the prevalence of sleep apnoea for men and women is 2 % and 4 % respectively around the world 96. In Singapore, prevalence of obstructive sleep apnoea (most common sleep apnoea in Singapore) is about 15 %41. If a sleep apnoea sufferer does not wish to seek treatment, his or her condition can bring about hypertension, cardiovascular diseases, poor memory, obesity, impotency and headaches but fortunately owing to advances in medical science and technology, sleep apnoea can be treated in todays world83. Snoring can be considered a form of hypopnoea. Hypopnoea is defined by the American Academy of Sleep Medicine (AASM) as a decrease in airflow of 30 % or more or thoracoabdominal movement with an oxygen desaturation of 4 % or more25. In PSG, the main components that the physician usually look out for are apnoea and hypopnoea index (AHI) and respiratory disturbance index (RDI)76. AHI is the average number of apnoeas and hypopnoeas per hour while RDI is the average number of arousals per hour37. AHI and RDI are very similar but a RDI can present respiratory effort-related arousals (RERA) which is not an apnoea or a hypopnoea76. Usually before a sleep study, surveys or test are given to the patient to assess his or her condition. One of them is called the Stanford Sleepiness Scale (SSS) and it presents with a series of phrases and the patient gets to choose the one that fits best according to his or her present state of arousal37, 2
38

. Another test is called the

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Epworth Sleepiness Scale which provides information on chronic sleepiness as the patient will be asked on his or her chances of falling asleep when doing certain things like watching TV and riding in a bus44. 1.1.3 Understanding Obstructive Sleep Apnoea (OSA) In clinical terms obstructive sleep apnoea (OSA) is seen as a syndrome that is defined by the event of recurrence episodes of complete or partial obstruction of the upper airway when sleeping; these episodes often occurs in relation with daytime sleepiness and loud snoring31. During increased upper airways narrowing during sleep, symptomatic OSA is at the worst end of this spectrum as it is mostly due to the decrease in the awake pharyngeal dilator mechanisms with sleep onset55. The upper airway patency depends on the equilibrium between the tendencies to collapse caused by the subatmospheric intraluminal pressure during inspiration and the upper airway dilator muscle activity therefore the suction pressure of the upper airway is the crux to provoking blockage during sleep81. One feature of upper airway dilator muscles is stimulation occurring before respiratory pump muscle activation hence counterbalancing the collapsing force produced by the respiratory pump muscle but poor coordination will affect upper airway patency81. There are quite a number of risk factors for sleep apnoea. The most notable one is obesity. Risk of OSA can be increased to 10 to 14 fold and it is most common in middle age adults50. Another risk factor is age and that applies to adults above 65 years old87. Even craniofacial features of one can increase the risk of OSA and these include receded chin, high and narrow hard palate, lengthened soft palate and an anomalous overjet49. Intake of alcohol can aggravate the condition especially during bedtime as it decreases the activity of the genioglossus muscle and other dilator muscles that contribute to upper airway patency48, 49, 88. Other risk factors can include race (e.g. East Asians are prone to OSA), craniofacial deformities, smoking and low vital capacity15,
52, 93

In fact sleep disordered breathing such as OSA can be

worsened by factors like lack of sleep, supine position when sleeping, nasal congestion and sedatives30. 3

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

OSA is also partly affected by familial and maybe genetic factors and studies found that a positive family history of OSA is a crucial risk factor for a raised AHI and related symptoms like snoring, apnoeas and daytime sleepiness49. Usually family and genetic studies use AHI to define a phenotype. But to have a more comprehensive diagnosis, a full PSG (partial PSG will be explained in a later section) together with other information derived from questionnaires like Epworth Sleepiness Scale should be done on the patient instead44, 49. As mentioned in the previous section, the cause of sleep apnoea is unknown and that of course will apply to OSA. Craniofacial morphology is thought to be a cause of OSA by decreasing airway patency49. Anatomical features that have been studied in OSA patients using techniques like cephalometry involve inferior displacement of the hyoid, elongation of the soft palate, hypertrophy of adenoids and tonsils etc54. The main symptoms of OSA are namely noisy irregular snoring, gasping for breath, other abnormal breathing sounds when sleeping, cessations in breathing during sleep, fatigue, feeling extremely sleepy during the day, decreased level of alertness, poor memory, change in personality (e.g. depression), morning headaches and obesity71. Hence ones health and work performance can deteriorate due to OSA. Usually when an OSA patient visits the doctor for the first time, continuous positive airway pressure (CPAP) will be offered to the patient as it is the first line of treatment and it is non invasive49. In todays context CPAP is typically used together with a nasal or full face mask in the range of 4 to 20 cm H20 (pressure). CPAP can come in forms of 2 modes; auto and fixed pressure modes. For patients that are prescribed with CPAP in fixed pressure mode, CPAP will be titrated in a sleep laboratory and fixed pressure adjustment will be done in the second half of the night after OSA has been diagnosed. CPAP opens up the entire airway due to high pressure, increasing functional residual capacity and decreases the afterload on the heart and may also increase the activity of the pharyngeal dilator.

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Another two treatment options are surgeries and oral appliances. Surgeries are usually not encouraged by doctors as the chances of recurrence are substantial and surgeries are often done on patients who disfavour CPAP and are CPAP incompliant. Surgeries vary from uvulopalatopharyngoplasty (UPPP) (most common surgery) to bariatric surgery49. Oral appliances are preferred over surgery by doctors as the latter is less effective and they are suited for patients who suffer from mild OSA or are CPAP incompliant. 1.1.4 Understanding Central Sleep Apnoea Central sleep apnoea (CSA) refers to both the pattern of a single event and the clinical disorder distinguished by recurrent episodes of apnoea when sleeping resulting from impermanent loss of ventilatory effort30, 49. A central apnoea refers to a period of least 10 seconds with the absence of airflow, during which no ventilator effort is present49. Muscles of the upper airway act as respiratory muscles, dilating or stiffening the pharynx when one inspires69. If there is reduced activity or loss of activity in the upper muscles and the diaphragam49, 70, a few consequences may occur. A total loss of electromyographic activity of the respiratory muscles would be expected during a central apnoea70. After the apnoea, normal ventilatory muscle activity will resume hence indicating that the neuronal output to the respiratory muscles stops during central apnoea and comes back at the end of the ventilatory pause49. Thus central apnoeas symbolizes a loss of inspiratory drive. CSA usually occurs in individuals who are down with serious illnesses 9. Thus illnesses or conditions that can cause CSA include bulbar poliomyelitis, cervical spine surgery complications, Parkinsons disease, severe arthritis, degenerative alterations in the cervical spine or base of skull, nasal obstruction such as allergic rhinitis58 and stroke affecting the brainstem (primary hypoventilation syndrome)9. Occurrence of central apnoea can also be caused by instability of ventilatory control49. Ventilation depends greatly on the metabolic control system during sleep 5

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

and the main stimulus to ventilation when sleeping is arterial partial pressure of carbon dioxide (PCO2) hence any drastic changes to PCO2 can lead to central apnoeas and in addition to that, any process that results to regular sleep-wake transitions over a night (e.g. insomnia) may increase the amount of central apnoeas. Hypercapnic respiratory failure can also play a part in the production of central apnoeas. The slope of ventilatory response to hypercapnia is a crucial variable in defining loop gain and the subsequent production of central apnoeas during sleep49. Hypercapnia means that there is abnormally high carbon dioxide in the blood whereas for hypocapnia, it means that there is abnormally low carbon dioxide in the blood. Idiopathic CSA is a form of CSA that does not have any connections with another disease9. It was noted that most apnoeas in idiopathic CSA patients are related with arousal-induced hyperventilation and subsequent hypocapnia10,
94

hence indicating

the importance of PCO2 during sleep49. Cheyne Stokes respiration is often associated with CSA and congestive heart failure. It demonstrates a crescendodecrescendo ventilatory pattern with a central apnoea or hypopnoea at nadir49. The symptoms of CSA can be separated into 2 categories, hypercapnic and nonhypercapnic49. Hypercapnic CSA produces symptoms such as respiratory failure, cor pulmonale, polycythemia, daytime sleepiness and snoring. Non-hypercapnic CSA produces symptoms such as daytime sleepiness, insomnia, mild and sporadic snoring, waking up at nights due to choking and/or shortness of breath and normal body habitus. There are a few ways to treat CSA. More popular types of treatment will be the use of oxygen, nasal CPAP and bilevel positive airway pressure (BiPAP) and all these treatments are dependent on the type of CSA9, 42. Certain types of CSA are treated with drugs to trigger breathing and these CSA patients conditions are due to a congestive heart failure therefore the aim will be to treat the heart failure9. 1.1.5 Understanding Electrocardiography (ECG) and its Signals

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

ECG records bioelectrical potentials at the body surface28 and hence it provides plenty of physiological information of the heart such as its electrical activity43. ECG is commonly used to aid in monitoring and identifying various changes or abnormalities of the heart, which includes cardiac arrhythmias and electrolyte changes. A normal ECG signal (refer to Figure 4) is represented by P waves, QRS complex, PR interval, ST segment, T wave, QT interval and a U wave43. The atria which are located at the upper chambers of the heart are activated when P wave appears while the PR interval also indicates atrial activity7. As for QRS wave, ST segment, QT segment and T wave, these components indicate ventricular activity. P wave is caused by atria normal depolarisation and the presence of this wave can determine normal sinus rhythm62. The presentation of QRS complex is caused by the occurrence of depolarisation of right and left ventricular muscle while T wave and ST segment are produced by the repolarisation of the ventricles62. QRS complex detection is crucial when it comes to automatic ECG signal analysis. This is because the detection of QRS complex can bring about a more thorough analysis of ECG signal which includes heart rate, ST segment etc7.

Changes in ECG signals can be related to sleep apnoea and these changes are caused by neuroautonomic and mechanical factors72. These changes are heart rate cyclic variations and cyclic variations in ECG amplitude or morphology. Figures 1 to 3 feature the ECG signals of apnoea, hypopnoea and normal breathing events.

Figure 1 ECG signal of an apnoea event

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Figure 2 ECG signal of a hypopnoea event

Figure 3 ECG signal of a normal breathing event

Figure 4 Components of a normal ECG signal62 1.1.6 Detection of Sleep Apnoea Today Classical neurophysiology sleep laboratories that first analysed sleep apnoea were often run by neurologists or psychiatrists performing investigations on primary disorders of brain function or psychiatric conditions73. Periodical sleep studies in the 1960s comprised of EEG, EMG and EOG in order to stage sleep and determine total sleep times, with strong interest in REM sleep and its latency, the latter reduced in endogenous depression8. In the olden days, OSA patients would appear to these laboratories with hypersomnolence and the first detailed reports came from neurophysiology units which noted that patients had repetitive apnoeas during sleep leading to arousals and sleep fragmentation on PSG33.

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

In today context, a full PSG is needed to be done before the physician is able to diagnose the patients sleep disorder condition (e.g. OSA, CSA). Polysomnographic signals of OSA and CSA can be seen in Figures 5 and 6. PSG is used for analysis and interpretation of numerous, simultaneous, physiological parameters39. In PSG, data are gathered using a combination of alternating current (AC) channels and direct current (DC) channels32. When preparing PSG, understanding of how the filters and sensitivity of the amplifiers can affect influence the data collected and how filters are used in order to do a proper recording is essential16, 32.

Figure 5 Polysomnographic signals of CSA12

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Figure 6 Polysomnographic signals of OSA40 The main components of PSG are EEG, EOG, EMG, ECG, pneumotachograph for measuring airflow (with the help of a nasal prong), non-invasive blood gas monitoring (oxygen saturation), inductance plethysmography to measure respiratory effort (using a abdominal effort belt wrapped around the patients abdomen) and lastly position sensor to detect the patients positions (e.g. lateral, supine) during sleep32. EEG, EOG, EMG and ECG are being recorded with the use of AC amplifiers where each amplifier consists of both high and low frequency filters while DC amplifiers are often used to record potentials like output from oximeter and output from transducers that contain endoesophageal pressure alterations. EEG presumably reflects local potential changes that are present on pyramidal cell soma and large apical dendrites of pryramidal cell neurons but it is unlikely to reflect action potentials of the neurons14. To record EEG, a gold cup electrode with a hole in the centre is usually utilized while silver-silver chloride electrodes can also be utilised to record EEG but there may be disadvantages such as increased maintenance and inability to stick the electrodes on the scalp32.

10

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

EOG refers to the reflection of the corneo-retinal potential difference moving within each eye16. While each eye represents the potential field within the head which acts as the volume conductor for that, it is noted that EOG in PSG does not measure eye muscle potentials changes14. EMG in PSG indicates the summation of activity occurring on many single motor end plates while ECG in PSG provides the prevalence of cardiac rhythm disturbances and associates these to breathing pattern and oxygen saturation14, 68. Pneumotachograph is the gold standard for the measurement of airflow with the aid of a nasal prong placed over the patient32. In the past, thermistors or thermocouples were utilized instead but in the present, it is more recognised to record the change in pressure to signify airflow4. Non-invasive blood gas monitoring or oxygen saturation monitoring can be done during sleep with help of commercially available devices (e.g. clip placed on the index finger). Respiratory inductance plethysmography (RIP) is often assumed to be a reliable and non-invasive measure of respiratory effort of the patient and if calibrated, it can produce a measure of tidal volume alterations32. Body position is often recorded because in the case of an OSA patient, OSA can be more severe and prevalent in supine position as compared to lateral position and this is done with the use of a position sensor placed on the patient and also with the use of a video monitor51. PSG can be classified into four types. Type 1 is a full PSG done in the hospital where the patient will be sleeping overnight at the sleep laboratory with the presence of sleep technicians. Type 2 involves a full ambulatory PSG (done overnight at home) where the accuracy of the study is likely to be compromised due to absence of sleep technicians. Type 3 is a partial PSG where it does not include electroneurologic channels but with only the measurements of airflow, respiratory effort, oxygen saturation and position sensor present73. Type 4 is a form of sleep study that only involves the measure of airflow (with a use of only a nasal prong) which is very inaccurate. It is essential to have EEG recorded during PSG as it can deny the physician certain information needed for the results to be accurate for example, REM sleep and the absence of real sleep time by which to divide the amount of respiratory events73, 23. 11

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Interpretation of PSG requires the review of clinical presentation, history and also the parametric analysis of the PSG32. So far, PSG has shown that it is a great tool for improving the understanding of sleep and its disorders but yet it is complex and laborious due to its multiple channels. Many studies have documented on the use of ECG to detect sleep apnoea during sleep but most of these studies focus on the detection of OSA. There are three main techniques to detect sleep apnoea from ECG and they are time domain (e.g. moving averages), frequency domain (e.g. Hilbert transform) and ECG morphology based (e.g. ECG pulse energy) techniques72.

Maier et al., did a comparison of three methods for extraction of respiratory events from single lead and multi lead ECG56. 90 patients were brought into this study and results showed that respiratory information retrieved from multi lead ECG can significantly improve ECG-derived respiration quality. Central apnoea detection from the median envelope of a lead-pair loop-angles was achievable with 85% sensitivity and 89% specificity. A study was done to compare 13 algorithms that were formed to detect sleep apnoea via ECG72. The top algorithms utilised the use of frequency-domain features to acquire heart rate changes and respiration effect on ECG waveform. 4 of the algorithms attained perfect scores in differentiating patients with and without apnoea. 2 of the algorithms attained an accuracy of more than 90% in detecting apnoeas during every minute of ECG recording. Roche et al., utilised heart-rate variability (HRV), power spectral density of the interbeat interval increment of very low frequencies and its percentage over the total power spectral density to aid in diagnosing patients who are suspected cases of OSA78. It was noted that a diagnostic sensitivity of 87% for the total power spectral density was achieved and the team also discovered a close connection with disease status for both percentage over the total power spectral density and power spectral density of the interbeat interval increment of very low frequencies. 12

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

A study done based on ECG based detection of OSA investigated on a hypothesis which states that since there is a larger reduction in breathing in apnoea events in contrast to hypopnoea events, there should be more distinct changes to the ECG physiological predictors during apnoea events compared to hypopnoea events and hence there is a likelihood that detection of hypopnoea events would be a tougher task compared to detection of apnoea events 66. This study also looked into the possible benefits of using two ECG leads compared to using a single ECG lead. Results produced revealed that the differentiating ability of the model from the apnoea data set was significantly greater compared to the model from the hypopnoea data set and also suggest that using additional ECG leads can lead to better ECG results. Using ECG, a group of researchers investigated on the automatic classification of sleep apnoea epochs20. This study is based on the collection of 70 single lead ECG results where half of them were used for training while the other half of them were used for independent testing. It was noted that features based on the power spectral density estimates of the R-wave maxima and R-R intervals are the most discerning. Classification of about 89% was attainable. A study was done on whether the extraction of ECG characteristics such as HRV and peak R area can be an alternative in diagnosing sleep apnoea59. 50 ECG recordings were used for analysis whereby they are split equally into training and testing data sets. More than 85% of accuracy in classifying apnoea events and normal events was attained. de Chazal et al., analysed an automated classification algorithm which handles short-duration epochs of surface ECG recordings attained from PSG studies and tried determining whether an epoch belongs to a period of sleep disordered respiration or normal respiration22. The algorithm was trained and tested on 70 overnight ECG data which contained normal and OSA subjects. The data were split evenly into training and testing data sets. The results were largely positive. Depending on the length of epochs, the classifier accurately classified between 87% (15 seconds epochs) and 91% (60 seconds epochs) of the epochs in every test set. 13

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Besides the use of PSG and ECG, other methods of detecting sleep apnoea had also been documented. Methods such as bispectral analysis65, flow spectral analysis34, fuzzy interference system64, empirical mode decomposition61 and even the use of physiological sensors connected via Bluetooth67 were documented.

1.2 Objectives and Scope of Project The main objective of this project is to implement a system that is capable of detecting sleep apnoea ECG signals automatically and this system will be able to replace PSG in terms of sleep apnoea diagnosis. Using this system, one could do away with the cumbersome nature of PSG. The other objective of this project is to achieve an accuracy of 85% or above in the classification of the different forms of respiratory events in sleep ECG signals of sleep apnoea subjects (i.e. to differentiate apnoeas, hypopnoeas and normal breathing). This project will utilise non-linear analysis approach to implement the system. Nonlinear parameters involved are Correlation Dimension (CD), Fractional dimension Hurst Exponent (H), Largest Lyapunov Exponent (LLE), Fractal Dimension (FD) and Approximate Entropy (ApEn). ECG recordings will be analysed and the use of a classifier will be used to classify the different forms of respiratory events. 1.3 Layout of Thesis The information on the ECG data used and the different ECG signal analysis methods are discussed in Chapter 2. The classifier used is also discussed in Chapter 2. Chapter 3 explains the results while Chapter 4 presents the discussion on the results of the work. Chapter 5 will conclude the thesis and it will also include recommendations for future work.

14

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

MATERIALS AND METHODS 2.1 Data Collection Data from two groups were used for this study. 25 subjects were recruited at random from patients visiting the Sleep Disorders Clinic at St Vincent's University Hospital, Ireland, for evaluation of suspected OSAS (Obstructive Sleep Apnoea Syndrome or sometimes called Obstructive Sleep Apnoea) (21 males and 4 females, age: 50 10 years, BMI: 31.6 4.0 kg/m, AHI: 24.1 20.3). This study was approved by the Hospitals Ethics Committee and written and informed consents were taken for all subjects. Every subject went through a standard overnight, attended PSG. After which an experienced sleep technologist carried out sleep staging according to Rechtschaffen and Kales rules77 and interpreted the respiratory events.

15

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

In another group at University College Dublin, 14 subjects with no known medical conditions were recruited from the general population (12 males and 2 females, age: 27 4 years, BMI: 25 4 kg/m2). The study was approved by the Universitys Ethics and written and informed consents were taken for all subjects. Standard sleep staging signals were recorded overnight with the use of a set of Grass amplifiers (from Astro-Med Inc, USA) during the subjects sleep. With the use of Somnolyzer 24x7 system6, sleep staging was carried out using Rechtschaffen and Kales rules 77. Lately a validation study using the large Siesta database discovered that the Somnolyzer attains similar inter-rater reliability with a human scorer as between two human scorers6.

450 sets of apnoea ECG data, 130 sets of hypopnoea ECG data and 130 sets of normal breathing ECG data were gathered from the two groups for this study. MATLAB19 and Chaos Data Analyzer84 were the two types of software used for data analysis.

2.2 ECG Signal Analysis Methods Using non-linear methods will help one understand ECG signals in a more effective way. The different nonlinear parameters, CD, LLE, FD, H and ApEn are explained below. 2.2.1 State Space Reconstruction The first step in non-linear time series analysis is state-space (phase-space) reconstruction. One-dimensional data y (n); n = 1,2,3,....., N , is viewed in an m -

dimensional Euclidean space, R m . An attractor is created by a path that joins the vectors in the state-space and this attractor maintains the topological properties of the original unidentified attractor.

16

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Method of delays is a popular method to reconstruct the state-space89. According to this method, m -dimensional vectors, x n in the state-space are produced from the time-delayed samples of the original signal, y (n) , as follows: x n = [ y (n), y ( n d ), y (n 2d ), ........, y ( n (m 1)d ] (1)

where d indicates embedding delay, and m indicates the embedding dimension (i.e. number of coordinates).

2.2.2 Estimation of Embedding Dimension, m The minimal sufficient embedding dimension, m can be achieved by using a method called false nearest neighbour (FNN)46. m was obtained as 10 in this study. Figure 7 illustrates the estimation of the embedding dimension for the study data using FNN method.

Figure 7 Result of estimation of embedding dimension for the ECG signals shown in Figures 1, 2 and 3. 2.2.3 Estimation of Delay Time, Fraser et al., have suggested using time delayed mutual information to find out the reasonable time delay27. Non-linear correlations in the time series are taken into consideration when mutual information method is used.

17

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Mutual information function for the ECG signal used in this study is given in Figure 8. It can be observed that the mutual information reaches its first minimum at = 10 . Time delay of 10 was obtained for the ECG signals (Figures 1, 2 and 3) used.

Figure 8 Delay estimation using average mutual information. 2.2.4 Approximate Entropy (ApEn) Approximate Entropy (ApEn) can be defined as the logarithmic likelihood that the data trends that are similar to each other will remain similar for the next comparison with an extended pattern. Thus ApEn offers a measure of regularity. The index for overall complexity and predictability of the time series is represented by ApEn.

In this study, ApEn determines the regularity of the ECG signals. Increase in regularity and predictability of the ECG signal will cause ApEn to decrease.

The method by Pincus et al.74 is being used to evaluate the ApEn in this study. ApEn results for various respiratory events are listed in Table 1.

2.2.5 Correlation Dimension (CD) The quantitative measure of the nature of trajectory is called Correlation Dimension (CD) and the ranges of CD signify various diseases3.

The CD of the attractor is calculated for HRV data using the following formula: 18

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

CD = lim

log C ( r ) r 0 log(r )

(2)

where the correlation integral C (r) is given by

C (r ) =
where

1 N2
,

( r X X )
x =1 y =1, x y x y

(3)

Xx

Xy

points of the trajectory in the phase space,

N number of data points in phase space r radial distance around each reference point
is the Heaviside function.

Xi

CD results for various respiratory events are listed in Table 1.

2.2.6 Largest Lyapunov Exponent (LLE) Largest Lyapunov Exponent (LLE) determines sensitivity of the system to initial conditions and it signifies the measure of predictability. If a positive Lyapunov exponent exists, it will signify chaos. A method proposed by Rosenstien et al.79 was used in this study. This method looks for nearest neighbour of each point in phase-space and traces their separation over certain time development. The LLE is calculated using a least squares fit to average line defined by:

y ( n) =

1 ln( bi ( n ) ) t

th where bi ( n ) represents the distance between i phase-space point and its nearest th . neighbour at n time step, and denotes the average overall phase space points.

LLE results for various respiratory events are listed in Table 1.

19

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

2.2.7 Hurst Exponent (H) Evaluation of the self-similarity and correlation properties of a signal is done using Hurst Exponent (H). It is the analysis of the smoothness of a fractal time series based on the asymptotic pattern of the rescaled range of the process. H is defined as, H = log( R / S ) / log(T ) where T represents the sample of data time length, R / S (4) represents the

corresponding value of rescaled range, R represents the difference between the maximum deviation from the mean and minimum deviation from the mean and S represents the standard deviation18. H results for various respiratory events are listed in Table 1. 2.2.8 Fractal Dimension (FD) FD determines dynamic signals complexity. A fractal is a group of points which, when looked at smaller scales, looks similar to the whole group [Mandelbrot,1983]. FD is a powerful tool for transient detection. FD has been used in ECG and EEG analysis to recognise and differentiate specific states of physiologic functions1. Let S be a compact subset of a metric space. For each > 0 , let N () be the smallest number of circles of radius needed to cover S. Lets say log N () log

= lim+
0

(5) In this research, Higuchis

exists, then

is called the fractal dimension of S.

algorithm has been used to evaluate FD36. FD results for various respiratory events are listed in Table 1. 2.3 Back-Propagation Algorithm (BPA) An Artificial Neural Network (ANN) classifier is used to analyse the performance of the five non-linear parameters (H, LLE, CD, FD, ApEn) in an automated pattern

20

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

recognition system. The computational goal of an ANN system is the solution to a specific type of non-linear optimisation issue29. In order to train ANNs, a supervised learning algorithm named back-propagation algorithm (BPA) is used35,
53, 85

. This algorithm is best suited for feed-forward

networks and it is used for automatic detection of unidentified class. BPA is an iterative gradient created to lessen the mean square error between the actual output and the wanted output45. The layered neurons that are between the input and output layers are called hidden layers or nodes. When BPA is in process, weights connected to the hidden layers are altered constantly, hence enabling the pre-selected neural network to learn. In this study, a four-layered feed-forward neural network with two hidden layers and eleven neurons were employed to process the data in each layer (refer to Figure 9). A learning constant, = 0.9 (step size control) was selected by trial and error. The binary outputs are 0 0, 0 1 and 1 0.

Hidden Layers 1 2 3 1 2 3 21

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Input 4 1 H 2 LLE 3 CD 4 FD 5 ApEn 9 10 11 Figure 9 Classification of ANN model 9 10 11 8 8 7 7 6 6 5 5 4

Output 1

2.4 Recurrence Plots The aim of recurrence plots is to expose non-stationarity of time-series2. Recurrence plots were originally introduced by Eckmann et al.24 as graphical methods for the diagnosis of drift and hidden periodicities during time progression, which are imperceptible otherwise.

Say xi is the i th point on the orbit in an m -dimensional space. The recurrence plot is an array of dots in an N N square, where a dot is positioned at ( i, j ) whenever x j is close enough to xi . In order to create a recurrence plot, m -dimensional orbit of xi is created. The ball of a radius r centred at xi in R m contains an adequate amount of other points x j of the orbit. Lastly a dot is plotted for every point ( i, j ) for which x j is in the ball of radius r centred at xi . Thus a recurrence plot is created. The plots will be symmetrical along the diagonal i = j , because xi is near to x j and vice versa. The recurrence plots of apnoea, hypopnoea and normal ECG signals (refer to Figures 1, 2 and 3) are shown in Figures 15 to 17. 22

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

2.5 Surrogate Data The aim of surrogate data is to examine for presence of non-linearity in the original ECG signal. Non-linearity must be present before the application of any non-linear analysis algorithms on the ECG data. The values computed for the original ECG data are compared against the surrogate data and if there is significant difference in non-linear parameters values, this will indicate that non-linearity is present in the original ECG signal90. The technique of using surrogate data in non-linear analysis is acquired by phase randomisation of the original data with spectral properties almost the same to the given data. Surrogate data possesses Fourier decomposition containing randomised phase components with identical amplitudes as the empirical data decomposition. This can be acquired with the use of Chaos Data Analyzer84.

RESULTS 3.1 Analysis of Non-Linear Parameters

23

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Features

Mean Standard Deviation Apnoea Hypopnoea

P Value

0.22291 0.02602 Largest Lyapunov 0.05717 Exponent (LLE) 0.02217 Correlation 3.8494 Dimension (CD) 0.637 Fractal Dimension -1.4864 (FD) 0.06064 Approximate Entropy 0.8306 (ApEn) 0.154 Table 1 Results of non-linear measures ECG signals

Hurst Exponent (H)

Normal Breathing 0.2086 0.61681 <0.0001 0.01883 0.02041 0.04821 0.03583 <0.0001 0.01850 0.02582 4.595 0.454 2.6635 <0.0001 0.223 -1.5273 -1.0775 <0.0001 0.02879 0.00819 0.85428 0.53835 <0.0001 0.08116 0.09443 of apnoea, hypopnoea and normal breathing

The above table presents with the different mean values of H, LLE, CD, FD and ApEn for apnoea, hypopnoea and normal breathing ECG signals. It can be observed from the table that the differences are statistically significant (p<0.0001). An indication of disorder in ECG signals is represented by ApEn. Hypopnoea and apnoea ECG signals have a greater ApEn value than the normal breathing (0.53835 0.09443) ECG signals. This is due to the chaotic nature of the abnormal signals (apnoea and hypopnoea). It can also be observed that ApEn values of hypopnoea (0.85428 0.08116) and apnoea (0.8306 0.154) ECG signals are relatively close to each other. From Table 1, it can be seen that normal breathing ECG signals are more predictable as compared to the abnormal ECG signals. This is due to the higher value of H for normal breathing (0.61681 0.02041) ECG signals. This also goes to show that apnoea (0.22291 0.02602) and hypopnoea (0.2086 0.01883) ECG signals are very unpredictable. Time series variability can be determined by CD. It can be seen from Table 1 that hypopnoea (4.595 0.454) ECG signals have the highest variability as compared to apnoea (3.8494 0.637) and normal breathing (2.6635 0.223) ECG signals.

24

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

In order to have more self-similarity in the ECG signal, a higher FD value needs to be attained. The type of ECG signals with the highest FD value is normal breathing (1.0775 0.00819) while apnoea (-1.4864 0.06064) and hypopnoea ECG signals (1.5273 0.02879) have slightly lower FD values. Indication of the divergence rate of trajectories rate in the phase space can be reflected by LLE. From Table 1, it can be observed that apnoea (0.05717 0.02217) ECG signals have the highest LLE value as compared to the other two types of ECG signals, hypopnoea (0.04821 0.01850) and normal breathing (0.03583 0.02582). The graphs below are presented with group means with 95% confidence intervals of apnoea, hypopnoea and normal breathing ECG signals based on the five different parameters. Note that A represents apnoea, B represents hypopnoea and C represents normal breathing.

Figure 10 Hurst Exponent

Figure 11 Largest Lyapunov Exponent

25

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Figure 12 Correlation Dimension

Figure 13 Fractal Dimension

Figure 14 Approximate Entropy

26

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

3.2 Analysis of Classification Results Sensitivity and specificity are the most commonly used statistics used for explain a diagnostic test. Sensitivity measures the amount of positives in a certain population of patients with the disease while specificity measures the amount of negatives in a certain population of patients without the disease26.

As false negative (FN) value falls, the level of sensitivity increases hence the probability of detecting the disease will increase. In order for the level of specificity to increase, false positive value (FP) must be lowered. Positive predictive value (PPV) of a test describes the probability of a patient who is positive in a test result actually contracted a disease86.

Training and testing data were used for ANN classification. 300 sets of training data were used for apnoea class. 90 sets of data were used for hypopnoea class and the same amount of data was also used for normal breathing class. During the testing stage, 40 sets for data were used for hypopnoea and the same amount of data was also used for normal breathing class. As for the apnoea class, 150 sets of data were used during the testing stage. Inputs used for the ANN classifier were H, LLE, CD, FD and ApEn. After the data was tested and trained, a graph was produced (refer to Figure 15). An average of 90% classification accuracy was achieved for ANN classifier (refer to Table 2). Sensitivity, specificity and PPV for ANN classifier are 100%, 95.24% and 99.16% respectively (refer to Table 3).

Classes Normal Hypopnoea Apnoea

Training 90 90 300 Average 27

Testing 40 40 150

ANN 100% 90% 80% 90%

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Table 2 Results of classification for ANN classifier

True Classifie r (TP)

True (TN)

False (FP)

False (FN) Sensitivity Specificity

Positive Predictive Accuracy (PPV)

Positive Negative Positive Negative

ANN

236

40

100%

95.24%

99.16%

Table 3 Sensitivity, specificity and PPV results for ANN classifier

Figure 15 Training data graph 3.3 Analysis of Surrogate Data To examine for non-linearity of sleep ECG signal, 10 sets of surrogate data were generated for each of the three classes. FD is obtained for both the original and surrogate data sets. Difference of FD between the surrogate and the original data was found to be more than 60%. Hence this result rejects the null hypothesis which indicates that the original data contains non-linear features.

28

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

3.4 Analysis of Recurrence Plots The recurrence plot of a normal breathing ECG signal has lesser squares but bigger squares than the recurrence plots of apnoea and hypopnoea ECG signals. This shows that normal breathing ECG signals are of lower frequency and periodicity than the other two types of ECG signals. It can also be said that recurrence plots of apnoea and hypopnoea ECG signals are more rhythmic than the recurrence plot of normal breathing. It can also be observed that the amount of frequency, periodicity and rhythm of the two abnormal ECG signals are almost the same due to their close similarity in the recurrence plots. Lastly the amount of correlation can be observed by analysing the colour bar of the recurrence plots. At one end of the colour bar, white indicates low correlation while at the other end of the colour bar, black indicates high correlation. In the recurrence plot of normal breathing ECG signal, it is noted that the its colour is leaning towards the red portion of the colour bar while in the recurrence plots of abnormal ECG signals, their colours are leaning towards the green portion of the colour bar. The colours of both abnormal ECG signals recurrence plots are very similar. Thus it is clear that the normal ECG signals have a lower correlation than abnormal breathing ECG signals and it also goes to show that apnoea and hypopnoea ECG signals have almost the same amount of correlation. Recurrence plots of apnoea, hypopnoea and normal breathing ECG signals are shown below.

29

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Figure 16 Recurrence plot of an apnoea ECG signal

Figure 17 Recurrence plot of a hypopnoea ECG signal

Figure 18 Recurrence plot of a normal breathing ECG signal

30

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

DISCUSSION It would be ideal to detect hypopnoea at an early stage for sleep apnoea patients. From Table 1, it can be observed that most of the non-linear parameters decreased during apnoea and hypopnoea respiratory events except for CD and ApEn thus indicating that apnoea and hypopnoea ECG signals are highly chaotic and have high variability. It can also be observed that apnoea ECG signals are slightly less chaotic and have a slightly lower variability than hypopnoea ECG signals. Reflex activation of the dilator muscles when reacting to airway obstruction tends to fail in OSAS patients and this failure is due to ventilatory control defects, retardation in reflex activation and defects in the arousal mechanisms13. Another two causes of airway obstruction during sleep in OSAS patients can be narrow anatomical structure of the pharynx at any level and anatomic abnormalities such as soft palate elongation and macroglossia. Any of these causes can lead to the occurrence of the 2 abnormal respiratory events, hypopnoea and apnoea. As a result, CD indicates high variability and ApEn indicates highly chaotic ECG signals in both of the abnormal respiratory events. Kowallik et al., did a study on the correlation between breath to breath variability and AHI in OSA patients47. The main aim of the study is to analyse the amount of breathing disturbance during non occluded breathing. The results were revealed and the team discovered that breathing in OSA patients is characterised by 2 characteristics, breathing disruptions and a greater variation in the pattern of normallength breaths. Figures 16 to 18 have shown indications that normal breathing ECG signals have lower periodicity and frequency than abnormal ECG signals. However in a study on evaluating a new automated measure of cardiopulmonary coupling (CPC) during sleep based on the use of a single lead ECG signal, it has noted that sleep apnoea has associations with both low-frequency oscillations in heart beat and low frequency 31

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

variations in ECG signals91. The cause of low frequency variations in ECG signals is due to the motion of chest wall during respiration. CPC utilises Fourier-based methods to analyse inter-beat (R-R) interval series and its linked ECG-derived respiration (EDR) signal. CPC presents two cardiopulmonary coupling regimes. One of which is high frequency coupling (0.1 0.4 Hz band) and it correlates to respiratory sinus arrhythmia while the other regime is low frequency coupling (0.01 0.1 Hz band) is associated with sleep apnoea. A study was done on automatic processing of single-lead ECG for the detection of OSA21. Night time examination of single-lead ECG recordings was done to detect major sleep apnoea and also to offer a minute-by-minute analysis of abnormal breathing. The two classifiers used in this study were linear and quadratic discriminants. The results indicated that normal ECG recordings can be drawn apart from the apnoea recordings with perfect success rate and a minute-by-minute classification accuracy of more than 90% was achieved. Mietus et al., presented an automated technique to detect and quantify OSA from single-lead ECGs based on periodic oscillations detection in cardiac inter-beat intervals that are frequently associated with extended cycles of sleep apnoea 60. This method utilises Hilbert transform of the sinus inter-beat interval time series. Their algorithm produced a classification accuracy of 93.3% for both sleep apnoea and normal subjects and accurately detected the presence or absence of sleep apnoea in 84.5% of the testing data. Corthout et al., did a study on the automatic screening of OSA solely with the use of ECG signal based on empirical mode decomposition (EMD) and wavelet analysis 17. Linear discriminant analysis was used as the classifier. Classification of ECG signals as apnoea types or non apnoea types was proven to be very accurate (with an accuracy of 90%) on a minute-by-minute basis. A method using empirical mode decomposition to detect OSA on tachogram was proposed61. In this study, linear discriminant analysis was also used as the classifier 32

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

to classify apnoeas on a minute-by-minute basis. The algorithm designed in this study presented with sensitivity of almost 89% and accuracy greater than 83%. In spite of these results, the set of features used in this study was much smaller than in other studies. A novel signal classification method that is designed for online detection of the presence or absence of normal breathing in PSG was studied92. Four ANNs were utilised in the classification of three respiratory events (apnoea, hypopnoea, normal breathing). The ANNs classifying preprocessed respiratory signals achieved an average classification accuracy of more than 90%. Shouldice et al., studied on the viability of detecting OSA in paediatric subjects using automated classification method based on the analysis of sleep ECG recordings82. The subjects underwent an overnight PSG. A modified quadratic discriminant analysis was used as the classifier to differentiate between apnoeas and normal breathings. A sensitivity of 85.7%, accuracy of 88% and a specificity of 90.9% were achieved for the training datasets. While in the case of testing datasets, a sensitivity of 85.7%, specificity of 81.8% and accuracy of 84% were achieved for testing datasets. The positive and negative predictive values for the testing datasets were 85.7% and 81.8% respectively. A study was done to compare different classifier algorithms that are used for automated detection of OSA75. The algorithms include ANN, artificial immune recognition system (AIRS), C4.5 decision tree and adaptive neuro-fuzzy interference system (ANFIS). Different types of analysis such as accuracy of classification, mean square error, specificity, sensitivity and area under the receiver operating characteristics curve (AUC) were employed. C4.5 decision tree managed to achieve the highest AUC value of 0.971. Considering the overall results of the comparison, C4.5 decision tree was rated the best classifier in the detection of OSA among the rest of the algorithms. It can be observed from the above studies that linear discriminant analysis appears to be a very popular classifier among many studies to be used in the automated 33

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

detection of OSA. It can also be observed that most of these studies managed to achieve classification accuracy of 90% or above. Looking at the percentages of classification accuracy from the above studies, it appears that automated detection of OSA using sleep ECG recordings on paediatric subjects is less effective than on adults. In this study, the level of sensitivity, specificity and PPV achieved better results than the studies discussed above. In this present study, a novel method is proposed to detect apnoea, hypopnoea and normal breathing ECG signals using non-linear parameters such as H, CD, FD and ApEn. In order to improve the efficiency, sensibility and specificity of this method, more training data, better features and a better classifier are needed.

34

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

CONCLUSIONS AND RECOMMENDATIONS FOR FUTURE WORK Sleep apnoea is a very common sleep disorder that can be characterised by an abnormally high level of AHI during sleep. ECG signals are useful in the detection of sleep apnoea. Study of the ECG signals using non-linear parameters method will greatly aid in the understanding of the inner dynamics of the system. Classification of apnoea, hypopnoea and normal breathing ECG signals was done using ANN classifier. The detection of respiratory (apnoea, hypopnoea or normal breathing) ECG signals managed to meet an accuracy of 90%, sensitivity of 100% and specificity of 95.24%. A PPV of 99.16% was also achieved. The significance of this study is that it provides a viable alternative for sleep physicians when it comes to diagnosing sleep apnoea due to its less cumbersome nature as compared to PSG. Accuracy of the proposed method is dependent on amount and quality of the training data, the thoroughness of the training imparted and the parameters used to characterise the input. More research has to be done on the use of sleep EOG, EMG or EEG signals to detect sleep apnoea. In this way more options can be catered to sleep physicians in terms of sleep apnoea diagnosis.

35

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

REFLECTIONS At the start of the project, I had a rough idea on what to expect for this project. I gathered plenty of literature regarding sleep apnoea from my previous company, ResMed Singapore Pte Ltd. The literature aided me well in my TMA 1 but I came to realise that though the literature I collected is useful, it does not focus much on the engineering aspect of this project. Hence I went onto the Internet to search for journal articles and books related to the engineering aspect of the project. During the analysis of the data, I did not know the rationale behind the generation of these data hence I found difficulty in interpreting the results. Eventually I read up on information pertaining to the type of data analysis I was doing and consulted my supervisor when I was in doubt. Chaos Data Analyzer was rather easy to use whereas for MATLAB, I faced some difficulties due to my poor knowledge of this program. I did not make enough effort to learn how to use the software. There was once when I was generating results for ANN classification on MATLAB, I was confused and frustrated due to my inability to generate the results. I spent about two weeks trying to solve the problem. Thus I decided to surf the Internet to read up on materials pertaining to MATLAB and also consulted my supervisor when I did not know how to use certain commands. Eventually I managed to generate the ANN classification results with ease. During the whole of this year, I realised that I have been procrastinating when it came to generation of data. I could have generated more data and perhaps achieved better results. According to my Gantt chart (refer to Table 4), I did not meet the 36

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

targets I set for myself. However I am still satisfied with myself because I spent a lot of effort performing a thorough literature search for my thesis and yet I am still able to complete my thesis two weeks before the deadline. There were times when I was facing difficulties writing my thesis but I managed to get through them with guidance from my supervisor. To conclude, even though I have put in a lot of effort in this project, I have to admit that my supervisor played a major role in this project. If not for his guidance, I would not be able to achieve good results for my data and also would not be able to complete my thesis on time.

Table 4 Gantt chart to monitor the flow of my tasks

37

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

REFERENCES
1. Acharya, UR, Faust, O, Kannathal, N, Chua, TL & Laxminarayan, S 2005,

Non-linear analysis of EEG signals at various sleep stages, Computer Methods and Programs in Biomedicine, vol. 80, no. 1, pp. 37-45.
2. Acharya, UR, Joseph, KP, Kannathal, K, Lim, CM & Suri, JS 2006, Heart rate

variability: a review, Med. Bio. Eng. Comput., vol. 44, no. 12, pp. 1031-1051. 3. Acharya, UR, Suri, JS, Spaan, JAE & Krishnan, SM 2007. Advances in Cardiac Signal Processing, Springer Verlang GmbH Berlin Heidelberg, New York.
4. American Academy of Sleep Medicine 1999, Sleep-related breathing

disorders

in

adults:

recommendations

for

syndrome

definition

and

measurement techniques in clinical research. The report of an American Academy of Sleep Medicine Task Force, Sleep, vol. 22, no. 5, pp. 667-689.
5. An

introduction

to

sleep

from

Talk

About

Sleep.

http://www.talkaboutsleep.com/sleep-disorders/archives/intro.htm
6. Anderer, P, Gruber, G, Parapatics, S, Woertz, M, Miazhynskaia, T, Klosch, G,

Saletu, B, Zeitlhofer, J, Barbanoj, MJ, Danker-Hopfe, H, Himanen, SL, Kemp, B, Penzel, T, Grozinger, M, Kunz, D, Rappelsberger, P, Schlogl, A & Dorffner, G 2005, An e-health solution for automatic sleep classification according to rechtschaffen and kales: validation study of the somnolyzer 24 x 7 utilizing the siesta database, Neuropsychobiology, vol. 51, no. 3, pp. 115133.
7. Anuradha, B & Reddy, VCV 2008, ANN for classification of cardiac

arrhythmias, Journal of Eng. and Applied Sci., vol. 3, no. 3, pp. 1-6.

38

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

8. Benca, RM, Obermeyer, WH, Thisted, RA & Gillin, JC 1992, Sleep and

psychiatric disorders. A meta-analysis, Arch. Gen. Psychiatry, vol. 49, pp. 651-668.
9. Blaivas, AJ & Zieve, D 2008, Central Sleep Apnea, Medline Plus Medical

Encyclopedia, last updated on 11th September.


10.Bradley, TD, Nicholas, WT, Rutherford, R & et al. 1986, Clinical and

physiological heterogeneity of the central sleep apnea syndrome, Am. Rev. Respir. Dis., vol. 134, pp. 217-221.
11. Bradley, WG 2004. Neurology in Clinical Practice Volume 2: The Neurological

Disorders, 4th edn, Butterworth Heinemann, Philadelphia.


12.Butkov, N & Lee-Chiong, TL 2007. Fundamentals of Sleep Technology,

Lippincott Williams & Wilkins, Philadelphia.


13.Byron, JB, Johnson, JT & Newlands, SD 2006. Head and Neck Surgery

Otolaryngology, Volume 1, 4th edn, Lippincott Williams & Wilkins, Philadelphia.


14.Chokroverty, S 1999. Sleep Disorders Medicine: Basic Science, Technical

Considerations and Clinical Aspects, 2nd edn, Butterworth-Heinemann, Boston.


15.Cistulli, P & Sullivan, CE 1993, Sleep apnea in Marfans syndrome, Am. Rev.

Respir. Dis., vol. 147, pp. 645-648.


16.Cooper, R, Osselton, JW & Shaw JC 1974. EEG Technology, 2nd edn,

Butterworths, London.
17.Corthout, J, Van Huffel, S, Mendez, MO, Bianchi, AM, Penzel, T & Cerutti, S

2008, Automatic screening of obstructive sleep apnea from the ECG based on empirical mode decomposition and wavelet analysis, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 1, pp. 3608-3611.
18.Dangel, S, Meier, PF, Moser, HR, Plibersek, S & Shen, Y 1999, Time series

analysis of sleep EEG, Computer Assisted Physics, vol. 14, pp. 93-95.
19.Data analysis software. http://www.mathworks.com/

39

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

20.de Chazal, P, Heneghan, C, Sheridan, E, Reilly, R, Nolan, P & OMalley, M

2000,

Automatic

classification

of

sleep

apnoea

epochs

using

the

electrocardiogram, Comput. In Cardiology, vol. 27, pp. 745-748.


21.de Chazal, P, Heneghan, C, Sheridan, E, Reilly, R, Nolan, Philip & OMalley,

M 2003, Automated processing of the single-lead electrocardiogram for the detection of obstructive sleep apnoea, IEEE Trans. On Biomed. Eng., vol. 50, no.6, pp. 686-696.
22.de Chazal, P, Penzel, T & Heneghan, C 2004, Automated detection of

obstructive sleep apnoea at different time scales using the electrocardiogram, Physiol. Meas., vol. 25, pp. 967-983.
23.Douglas,

NJ,

Thomas,

&

Jan,

MA

1992,

Clinical

value

of

Polysomnography, Lancet, vol. 339, pp. 347-350.


24.Eckmann, JP, Kamphorst, SO & Ruelle, D 1987, Recurrence plots of

dynamical systems, Europhys. Lett., vol. 4, pp. 973-977.


25.Fairbanks, DNF, Mickelson, SA & Woodson, BT 2002. Snoring and

Obstructive Sleep Apnea, 3rd edn, Lippincott Williams & Wilkins, Philadelphia.
26.Fletcher, SW 2005. Clinical Epidemiology: The Essentials, 4th edn, Lippincott

Williams & Wilkins, Philadelphia.


27.Fraser, AM & Swinney, HL 1986, Independent coordinates for strange

attractors from mutual information, Phys. Rev. A, vol. 33, pp. 1134-1140.
28.Garvey, JL 2006, ECG techniques and technologies, Emerg. Med. Clin. N

Am., vol. 24, pp. 209-225.


29.Golden, RM 1996. Mathematical Methods for Neural Network Analysis and

Design, MIT Press, Illinois.


30.Guilleminault, C & Dement W 1978. Sleep Apnea Syndromes, Alan R. Liss,

New York.
31.Guilleminault, C 1985, Obstructive sleep apnea: The clinical syndrome and

historical perspective, Med. Clin. N. America, vol. 69, pp. 1187-1203.


32.Guilleminault, C 2005. Sleep and its Disorders. Handbook of Clinical

Neurophysiology, Vol. 6, Elsevier B. V, Amsterdam.

40

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

33.Guilleminault, C, Tilkian, A & Dement, WC 1976, The sleep apnea

syndromes, Ann. Rev. Med., vol. 27, pp. 465-484.


34.Haia, T, Behbehani, H, Yen, FC, Lucas, EA & Burk, JR 1999, Sleep apnea

detection using flow spectral analysis and fuzzy logic, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 1, pp. 340.
35.Haykin, S 1995. Neural Networks: A Comprehensive Foundation, 2nd edn,

Macmillan, New York.


36.Higuchi, T 1988, Approach to an irregular time series on the basis of the

fractal theory, Physica D, vol. 31, no. 2, pp. 277-283.


37.Hoddes, E, Dement, WC & Zarcone, V 1972, The development and use of

the Stanford Sleepiness Scale (SSS), Psychophysiology, vol. 9, pp. 150.


38.Hoddes, E, Zarcone, V & Smythe, H 1973, Quantification of sleepiness: a

new approach, Psychophysiology, vol. 10, pp. 431-436.


39.Holland, JV, Dement, WC & Raynal, DM 1974, Polysomnography: A

Response to a Need for Improved Communication, 14th Annual Meeting of the Association for the Psychophysiological Study of Sleep, Jackson Hole, Wyoming, June, pp. 121.
40.Iber, C & Wang, K 2009, Cardiac monitoring during sleep, Sleep Med. Clin.,

vol. 4, pp. 373-384.


41.Information on Obstructive Sleep Apnoea from Singapore Health Services.

http://www.singhealth.com.sg/HealthMatters/TipsHealthyLiving/Apnoea/
42.Issa, F & Sullvian, C 1986, Reversal of central sleep apnea using nasal

CPAP, Chest, vol. 90, pp. 165-171.


43.John,

AD

&

Fleisher,

LA

2006,

Electrocardiography:

The

ECG,

Anesthesiology Clin., vol. 24, pp. 697-715.


44.Johns, MW 1991, A new method for measuring daytime sleepiness: The

Epworth Sleepiness Scale, Sleep, vol. 14, no. 6, pp. 540 545.
45.Keat, SC, Acharya, UR, Zhu, K, Lim, T-C, Yu, W-W, Subramaniam, T & Law,

C 2009, Automated identification of diabetes type-2 subjects with and without

41

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

neuropathy using eigenvalues, Proc. Ins. Mechan. Eng., Part H: Journal Eng. Med., vol. 224, pp. 1-10.
46.Kennel, MB, Brown, R & Abarbanel, HDI 1992, Determining embedding

dimension for phase-space reconstruction using a geometrical construction, Phys. Rev. A, vol. 45, pp. 3403.
47.Kowallik, P, Jacobi, I & Jirmann, A 2001, Breath-to-breath variability

correlates with apnea-hypopnea index in obstructive sleep apnea, Chest, vol. 119, no. 2, pp. 451-459.
48.Krol, RC, Knuth, SL & Barlett, DJ 1984, Selective reduction of genioglossal

muscle activity by alcohol in normal human subjects, Am. Rev. Respir. Dis., vol. 129, pp. 247-250.
49.Kryger, MH, Roth, T & Dement, WC 2005. Principles and Practice of Sleep

Medicine, 4th edn, Elsevier Saunders, Philadelphia.


50.Kuna, S 1991. Sleep and Respiration in Aging Adults, Elsevier, New York. 51.Lee, TLC 2006. Sleep: A Comprehensive Handbook, Wiley & Sons Inc, New

Jersey.
52.Li, KK, Powell, NB, Riley, RW & Guilleminault, C 2000, Obstructive sleep

apnea syndrome: A comparison between Far-East Asian and white men, Laryngoscope, vol. 110, pp. 1689-1693.
53.Lippman, RP 1989, Pattern classification using neural networks, IEEE

Communi. Mag., vol. 27, no. 11, pp. 47-50 & 59-64.
54.Lowe, AA, Ozbek, MM, Miyamoto, K & et al. 1997, Cephalometric and

demographic characteristics of obstructive sleep apnea: An evaluation with partial least squares analysis, Angle. Orthod., vol. 67, pp. 143 -153.
55.Lugaresi, E, Mondini, S, Zucconi, M, Montagna, P & Cirignotta, F 1983,

Staging of heavy snorers disease. A proposal, Bull. Eur. Physiopathol., vol. 19, pp. 590-594.
56.Maier, C, Rdler, V, Laguna, P & Dickhaus, H 2007, Dynamic analysis of

multi lead ECG recordings for detection and categorization of respiratory events during sleep, Comput. In Cardiology, vol. 34, pp. 493-496. 42

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

57.Mandelbrot, BB 1983. Geometry of Nature, Freeman, San Francisco. 58.McNicholas, W, Tarlo, S, Cole, P & et al. 1982, Obstructive apneas during

sleep in patients with seasonal allergic rhinitis, Am. Rev. Respir. Dis., vol. 126, pp. 625-628.
59.Mendez, MO, Ruini, DD, Villantieri, OP, Matteucci, M, Penzel, T, Cerutti, S &

Bianchi, AM 2007, Detection of sleep apnea from surface ECG based on features extracted by an autoregressive model, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 1, pp. 6105-6108.
60.Mietus, JE, Peng, CK, Ivanov, PC & Goldberger, AL 2000, Detection of

obstructive sleep apnea from cardiac interbeat interval time series, Comp. In Cardio., vol. 27, pp. 753-756.
61.Mijovi, B, Corthout, J, Vandeput, S, Mendez, M, Cerutti. S & Van Huffel, S

2001, Detection of obstructive sleep apnea by empirical mode decomposition on tachogram, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 2, 1645-1648.
62.Miller, RD, Eriksson, LI, Fleisher, LA, Wiener-Kronish, JP & Young, WL 2009.

Millers Anesthesia, 7th edn, Churchhill Livingstone, Philiadelphia.


63. Mindell, JA & Owens, JA 2003. A Clinical Guide to Pediatric Sleep: Diagnosis

and Management of Sleep Problems, Lippincott Williams & Wilkins, Philadelphia.


64.Nazeran, H, Almas, A, Behbehani, K, Burk, J & Lucas, E 2001, A fuzzy

inference system for detection of obstructive sleep apnea, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 2, pp. 1645-1648.
65.Ng, AK, Wong, KY, Tan, CH & Koh, TS 2007, Bispectral analysis of snore

signals for obstructive sleep apnea detection, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 1, pp. 6195-6198.
66.Nilsen, K, Zilberg, E, Burton, D & Ahsan, H 2008, Variations in the Accuracy

of the ECG based detection of obstructive sleep apnoea (OSA) for different numbers of ECG leads and categories of OSA events, Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 1, pp. 3492-3495.
67.Oliver, N & Flores-Mangas, F 2007, Healthgear: automatic sleep apnea

detection, Journal of Comm., vol. 2, no. 2, pp. 1-9.

43

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

68.Olmetti, F, La Rovere, MT, Robbi, E, Taurino, AE & Fanfulla, F 2007,

Nocturnal cardiac arrhythmia in patients with obstructive sleep apnea, Sleep Med., vol. 9, no. 5, pp. 475-480.
69. Onal, E, Lopata, M & OConnor, T 1981, Genioglossal and diaphragmatic

EMG responses to CO2 rebreathing in humans, J. Appl. Physiol., vol. 50, pp. 1052-1055.
70.Onal, E, Lopata, M & OConnor, T 1982, Pathogenesis of apnea in

hypersomnia-sleep apnea syndrome, Am. Rev. Respir. Dis., vol. 125, pp. 167-174.
71.Pascualy, RA & Soest, SW 2000. Snoring and Sleep Apnea: Sleep Well, Feel

Better, 4th edn, Demos Medical Publishing, New York.


72.Penzel, T, McNames, J, de Chazel, P, et al. 2002, Systematic comparison of

different algorithms for apnoea detection based on electrocardiogram recordings, Med. Biol. Eng. Comput., vol. 40, pp. 402-407.
73.Pepperell, JCT, Davies, RJO & Stradling, JR 2002, Sleep studies for sleep

apnoea, Physiol. Meas., vol. 23, pp. R39-R74.


74.Pincus, SM & Keefe, DL 1992, Quantification of hormone pulsatility via an

approximate entropy algorithm, Am. J. Physiol. , vol. 262, pp. E741E754.


75.Polat, K, Yosunkaya, S & Gunes S 2008, Comparison of different classifier

algorithms on the automated detection of obstructive sleep apnea syndrome, J. Med. Syst., vol. 32, no. 3, pp. 243-250.
76.Randerath, WJ, Sanner, BM & Somers, VK 2006. Sleep Apnea: Current

Diagnosis and Treatment, Karger Publishers, Basel.


77. Rechtschaffen, A & Kales, A 1968. A Manual of Standardized Terminology,

Techniques, and Scoring System for Sleep States of Human Subjects, U.S. Government Printing Office, Washington DC.
78.Roche, F, Duverney, D, Court-Fortune, I, et al. 2002, Cardiac interbeat

interval increment for the identification of obstructive sleep apnea, Pacing Clin. Electrophysiol., vol. 25, no. 8, pp. 1192-1199.

44

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

79. Rosenstien, M, Colins, JJ & De Luca, CJ 1993, A practical method for calculating largest Lyapunov exponents from small data sets, Physica D, vol. 65, pp. 117-134.
80.Roth, T, Roehrs, T, Zorick, F & et al. 1985, Pharmacological effects of

sedative-hypnotics, narcotic analgesics, and alcohol during sleep, Med. Clin. North. Am., vol. 69, pp. 1281-1288.
81.Saunders, NA & Sullivan, CE 1994. Sleep and Breathing, 2nd edn, Marcel

Dekker, New York.


82.Shouldice, RB, OBrien, LM, OBrien, C, de Chazel, P, Gozal, D & Heneghan,

C 2004, Detection of obstructive sleep apnea in pediatric subjects using surface lead electrocardiogram features, Sleep, vol. 27, no. 4, pp. 784-792.
83.Sleep

apnoea information from American Sleep Apnea Association.

http://www.sleepapnea.org/info/index.html
84.Sprott, JC & Rowlands, G 1995. Chaos Data Analyzer: The

Professional

Version, American Institute of Physics, USA.


85.Stamatios, VK 2000. Understanding Neural Networks and Fuzzy Logic

Basic Concepts and Applications, Prentice Hall of India, New Delhi.


86.Stein, JH 1998. Internal Medicine, 5th edn, Mosby, St. Louis. 87.Strohl, KP & Redline, S 1996, Recognition of obstructive sleep apnea, Am J

Respir. Crit. Care Med., vol. 154, pp. 279 -289.


88.Taasan, VC, Block, AJ, Boysen, PG & et al. 1981, Alcohol increase sleep

apnea and oxygen desaturation in asymptomatic men, Am. J. Med., vol. 71, pp. 240-245.
89.Takens, F 1981, Detecting Strange Attractors in Turbulence, In Rand, D &

Young, LS, Dynamical Systems and Turbulence, Edns, Springer, Berlin.


90. Theiler, J, Eubank, S, Longtin, A, Galdrikian, B & Farmer, JD 1992, Testing

for nonlinearity in time series: the method of surrogate data, Physica D, vol. 58, pp. 7794.

45

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

91.Thomas,

RJ, Mietus, JE, Peng, CK & Goldberger, AL 2005, An

electrocardiogram based technique to assess cardiopulmonary coupling during sleep, Sleep, vol. 28, no. 9, pp. 1151-1161.
92.Vrady, P, Micsik, T, Benedek, S & Beny, Z 2002, A novel method for the

detection of apnea and hypopnea events in respiratory signals, IEEE Trans. On Biomed. Eng., vol. 49, no. 9, pp. 936-942.
93.Wetter, D, Young, T, Bidwall, T & et al. 1994, Smoking as a risk factor for

sleep disordered breathing, Arch. Intern. Med., vol. 154, pp. 2219-2224.
94.Xie, A, Wong, B, Phillipson, EA & et al. 1994, Interaction of hyperventilation

and arousal in the pathogenesis of idiopathic central sleep apnea, Am. J. Respir. Crit. Care Med., vol. 150, pp. 489-495.
95.Yamamoto, LG, Inaba, AS, Okamoto, JK, Patrinos, ME & Yamashiroya, VK

2004. Case Based Pediatrics For Medical Students and Residents, AuthorHouse, Honolulu.
96.Young, T & et al. 1993, The occurrence of sleep-disordered breathing among

middle-aged adults, N. Engl. J. Med., vol. 328, no. 17, pp. 1230-1235.

MEETING LOGS 46

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 19/01/09 Time: 4:00PM to 4:30PM Venue: Ngee Ann Polytechnic Various types of sleep apnoeas, namely obstructive sleep apnoea and central sleep apnoea have been discussed. What to be done and expected for this project were discussed and they are implementing automated detection of sleep apnoeas using electroencephalography (EEG) signal and involving the use of various software such as MATLAB and Chaos Data Analyzer (CDA) (will be provided by Dr. Raj). A decision was reached to write a literature review on types of sleep apnoeas and detection of the various types of sleep apnoeas in the present day as the first part of this project and also, the review will be part of TMA 1. We agreed to meet up once my literature review is completed.

Date: 12/02/09 47

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Time: 4:00PM to 4:30PM Venue: Ngee Ann Polytechnic Discussion on what to be written for TMA 1 was done today. Instructions were given to use non-linear analysis approach in order to implement an automated detection of sleep disorders (to differentiate between OSA and CSA) instead of linear analysis because during time and frequency domains, the signals are not clear. Hence Dr. Raj instructed me to focus on entropy (variation approximate entropy) which features Correlation Dimension, Fractional Dimension, Hurst Exponent, Largest Lyapunov Exponent (LLE), Approximate Entropy (ApEn), phase plots and etc. We discussed and agreed that I will write a literature review on non-linear analysis under the section called Proposed approach and method to be employed for TMA 1. The literature review on various types of sleep apnoea is to be placed under the section called Investigation of Project Background. As for the section called Skills required to achieve my targets for TMA 1, we discussed and agreed to include MATLAB and other forms of software such as CDA software under the sub section named Methods.

Date: 12/03/09 48

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Time: 4:00PM to 4:30PM Venue: Ngee Ann Polytechnic We discussed and reached a decision to generate electrocardiography (ECG) data instead of electroencephalography (EEG) data because there will be more trends. And after the generation of ECG data, I may try generating EEG data. We also discussed on whether to use MATLAB or CDA software to generate data. I may have to use MATLAB if I am unable to install Windows XP on my laptop (my laptop is running on Windows Vista). I can go ahead with CDA software if Windows XP is successfully installed. Dr. Raj decided to write programs for MATLAB during the weekend in case I am unable to install Windows XP on my laptop. Dr. Raj transferred the ECG data for apnoea, hypopnoea and normal breathing onto my thumb drive. I agreed to meet up next week with Dr. Raj to install the CDA software onto my laptop if not I will transfer the MATLAB programs that Dr. Raj has written for me onto my laptop in order to generate the ECG data on MATLAB.

Date: 18/03/09 49

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Time: 11:30PM to 12:00PM Venue: Ngee Ann Polytechnic With Windows XP successfully installed on my laptop, Dr. Raj gave me the CDA software to install on my laptop. I was taught by Dr. Raj. on how to use the CDA software and was told to run on three parameters using the ECG data given to me. The three parameters are Hurst Exponent, Lyapunov Exponent and Correlation Dimension. We agreed to meet up once the generation of data is completed.

50

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 11/07/09 Time: 10:00AM to 10:45AM Venue: Ngee Ann Polytechnic Generation of data involving the 3 parameters (Hurst Exponent, Lyapunov Exponent and Correlation Dimension) was completed and presented to Dr. Raj. We discussed on the next step for this project. For each parameter, 450 sets of apnoea data, 130 sets of hypopnoea data and 130 sets of normal breathing data were generated. Hence Dr. Raj introduced me to a website

(http://www.physics.csbsju.edu/stats/anova_pnp_NGROUP_form.html) that is meant to generate data for analysis of variance (also known as ANOVA). But the actual purpose of utilising this website is to produce some values to be inserted into a table and at the same time plot graphs. This table will feature a range of input features to Artificial Neural Networks (ANN) classification model. The table will display values belonging to parameters such as Hurst Exponent, Lyapunov Exponent, Correlation Dimension, Fractal Dimension and Approximate Entropy (ApEn). These values will be grouped in 3 groups (apnoea, hypopnoea and normal breathing). Using this website, I have to use the generated data to find certain values such as mean value, standard deviation, p value and to plot graphs for group means with 95% confidence intervals. Each parameter has its own mean value, standard deviation, p value and graph. Dr. Raj guided me on the steps on how to generate the values and graphs on the website. As the data for Fractal Dimension and ApEn have not been generated, we discussed on how to generate these data. In order to generate these data, I have to use MATLAB to generate them. Dr. Raj guided me on the generation of these data. He gave me 2 MATLAB M-files meant for the data generation. One of the files which contains Higuchis algorithm is used to generate data for Fractal Dimension. The other file which contains ApEn algorithm is used to generate data for ApEn. Same amount of data were generated for these 2 parameters (i.e. 450 sets of apnoea data, 130 sets of hypopnoea data and 130 sets of normal breathing data). 51

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Once the graphs and the table featuring the range of input features to ANN classification model are ready (in Microsoft Word format), I will have to email the document to Dr. Raj for him to check through. We decided to arrange another meeting once he checks through the document. We will discuss on ANN classification on the next meeting.

52

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 18/08/09 Time: 5:45PM to 6:15PM Venue: Ngee Ann Polytechnic The graphs and the table featuring the range of input features to Artificial Neural Networks (ANN) classification model were done and submitted about week ago. Dr Raj had since approved it. We discussed on how to go about using ANN classification in this project. We decided to normalise the data generated for the 5 parameters (Hurst Exponent, Lyapunov Exponent, Correlation Dimension, Fractal Dimension and ApEn). Note that I have 450 sets of apnoea data, 130 sets of hypopnoea data and 130 sets of normal breathing data for each parameter. In order to perform normalisation for these data, I have to divide every single value (i.e. every set of data) with the largest value in each parameter regardless of the types of breathing (i.e. apnoea, hypopnoea and normal breathing). After which I have to split the normalised data into 2 separate groups (i.e. 2 separate Microsoft Excel sheets). One of which is testing data while the other is training data. Under training data, I will have to allocate 90 sets of normal breathing data, 90 sets of hypopnoea data and 300 sets of apnoea data. As for testing data, I will have to allocate 40 sets of normal breathing data, 40 sets of hypopnoea data and 150 sets of apnoea data. For training data, I will have to insert binary numbers. These binary numbers will be placed under a column named class. Under training data, there will be 7 columns. The first five columns belong to the 5 parameters while the last 2 columns will be named class (i.e. binary numbers). The binary numbers in the last 2 columns will follow in this pattern: 0 0, 0 1, 1 0 (space between the digits means that each digit is allocated to one column). 0 0 represents normal breathing, 0 1 represents hypopnoea and 1 0 represents apnoea. Hence the normalised data for apnoea, hypopnoea and normal breathing will be presented alternately in rows.

53

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

The allocation of normalised data in the testing data sheet will be the same as the training data sheet except with the absence of binary numbers. Hence there will only be 5 columns but the normalised data for apnoea, hypopnoea and normal breathing will still be presented alternately in rows (will follow the same pattern as the training data sheet). Dr. Raj and I decided to meet up once I am done with keying in the data for both training and testing data sheets.

54

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 13/09/09 Time: 6:00PM to 6:30PM Venue: Ngee Ann Polytechnic This meeting is a follow up to ANN classification. We discussed on the steps after the completion of the normalisation of the data of the 5 parameters. Dr. Raj instructed me to convert each of my training and testing data documents into .dat format and after which convert them to .mat format. I was given 2 .m format files by Dr. Raj to be run for on MATLAB. Training data (in .mat format) is to be run on one of the files while testing data (in .mat format) is to be run on the other file. Running of training data is to be done first follow by the running of testing data. ANN classifier was further explained to me by Dr. Raj. Terms such as hidden layer and connection weights were explained to me. After the running of both sets of training and testing data, numerical results will be shown on the command window of MATLAB. I will have to sieve out the numbers that are not in the order of the binary numbers mentioned in last meeting log. The numbers will actually be in decimals. Numbers less than 0.5 represent binary number 0 while numbers equal or less than 1 but equal to or more than 0.5 represent binary number, 1. From here I can find out the percentage of the accuracy of ANN classifier that is used to classify the types of breathing (i.e. apnoea, hypopnoea and normal breathing). Dr. Raj and I decided to meet up in about 2 weeks time to discuss further on my project.

55

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 26/09/09 Time: 12PM to 1PM Venue: SIM University The percentage of the accuracy of ANN classifier that is used to classify the types of breathing (i.e. apnoea, hypopnoea and normal breathing) has been calculated and it was 90%. After noting that, Dr. Raj explained and taught me on how to draw an ANN classification model. In my case, I will have to draw two hidden layers with each layer containing 11 neurons. Altogether there 4 layers in this model and arrows are needed to connect these layers. Basically an ANN classification model contains 3 sections and they are the input section, hidden layers section and lastly the output section. After which, I was told to produce a table which features the results of classification for ANN classifier. This table will feature the amount of training and testing data sets I have for each class (i.e. apnoea, hypopnoea and normal breathing), ANN classification accuracy for each class and the overall ANN classification accuracy. Lastly I was taught on how to calculate sensitivity, specificity and positive predictive value (PPV) for the ANN classifier. In order calculate these components, I will have to understand terms such as true positive, true negative, false positive and false negative. These terms were explained to me by Dr. Raj. With the understanding of these terms, I was taught on how to apply the formulas used to calculate the three components. Dr. Raj informed me that I can start writing my thesis once I have completed what he taught me today. He agreed to meet me up if I have any queries on my thesis.

56

Name: Lim Liang Feng Benjamin PI Number: N0604073 Thesis

Course Code: BME499 Capstone Project

Date: 17/10/09 Time: 10:30PM to 11:00PM Venue: Ngee Ann Polytechnic Over the past few weeks, I had conversed with Dr. Raj over emails on what I will be expected for my thesis. At this point in time, I have written my thesis up to the mid section of Results. I was unsure on what to write with regards to the results of my recurrence plots. Dr. Raj guided me on what to write for the results of my recurrence plots. He explained to me on how to study the plots by analysing characteristics such as periodicity, rhythm and frequency. After which I asked him for advice for the Discussion section of my thesis. He explained to be what are needed to be improved in order to get better results for this study. Examples are addition of more training data and use of better classifier. Having understood what he explained, I began to have a rough idea on how to write my discussion. Lastly I requested for guidance on how to prepare my poster for the upcoming presentation. He gave me some guidance on what to be expected for my poster. Things such as summarising of my thesis into key points for my poster were mentioned.

57

You might also like