<<

DEGREE PROJECT IN MEDICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2018

Creating an individualized predictive model of PAO2 and PACO2 changes during voluntary static for sedentary subjects

Att skapa en individualiserad prediktiv modell av PAO2- och PACO2-förändringar under frivillig statisk apné för stillasittande personer

DIANA SVEA ANTHONY

KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES IN CHEMISTRY, BIOTECHNOLOGY AND HEALTH

Creating an individualized predictive model of PAO2 and PACO2 changes during voluntary for sedentary subjects

DIANA ANTHONY

Master in Medical Engineering Date: June 26, 2018 Supervisor: Mikael Gennser, Co-supervisor: Pawel Herman Examiner: Ola Eiken Swedish title: Att skapa en individualiserad prediktiv modell av PAO2- och PACO2-förändringar under frivillig statisk apné för stillasittande personer School of Engineering Sciences in Chemistry, Biotechnology, and Health

iii

Abstract

The primary aim of this study was to fill a gap in the literature in understanding maximal BH in untrained, non-divers by generating a predictive numerical model for PAO2 and PACO2 throughout BH. There have been little to no previous attempts at explicitly character- izing the influence of impermanent personal or environmental factors on PAO2 or PACO2 at BH breakpoint. The metabolic consump- tion of O2 and production of CO2 as measured through alveolar par- tial was observed over time during a voluntary maximum breath-hold for 18 members of the general population. The coefficient of determination was used to determine accuracy of the model in fit- ting participants’ BH data from this experiment. The volume of the last inhalation pre-BH, time to subjective breakpoint, and breath-to- breath calculated respiratory exchange ratio (RER) were identified as the most influential combination of key variables that improved PAO2 model fit (from R2 = 0.8591 to R2 = 0.8840). Clustering methods cou- pled with two sample t-tests or ANOVA were then used to identify survey responses most correlated to inter-BH similarities. These were barometric , age, height, , resting HR, smoker/ freed- iver/ scuba experience, and weekly frequency of engaging in physical exercise. The model was validated on testing data from an experienced free-diver, from non-rebreathing trials of a sample of the participants, and from simulated dives of 5 participants from research in the En- vironmental Department of Karolinska in 1994 [1]. It has been suggested that the presented model can be a valuable tool in de- veloping safer free diving practices. Furthermore, interesting trends in continuous HR, starting PACO2 values, and O2 consumption were observed and analyzed using statistical analysis. Findings were dis- cussed with connection to the underlying physiological principles that might explain the results obtained. iv

Acknowledgements

I would like to thank my supervisors, Dr. Mikael Gennser, and Pro- fessor Pawel Herman for providing me both guidance when I needed help, and their support when I needed encouragement. Their feed- back allowed me not only to feel confident pursuing this project, but also to find the best structure to make the most of this opportunity.

I would also like to thank Xiaogai Li, Brynar Hilmarsson, Linda Bjorgvins- dottir, Puja Romulus, Anna Pogosian, Quiantailang Yuan, and Quentin Chometon, for their review and input on my thesis. Lastly, thanks to Dillon Arey, with whom I discussed safer free-diving and what we as engineers might be able to do about it. Contents

1 Introduction 2 1.1 Shallow water blackout ...... 2 1.2 Literature review of BH modeling in ...... 2 1.3 Aim ...... 3

2 Methods 4 2.1 Pre-BH procedure ...... 4 2.2 BH experimental set-up ...... 4 2.3 Post-BH variable determination ...... 5 2.4 Data analysis ...... 5

3 Results 10 3.1 Explicit model of PAO2 and PACO2 during BH: itera- tion 1 ...... 10 3.2 Statistical testing to identify key variables for the model . 16 3.3 Incorporating key variables into model: iteration 2 . . . . 16 3.4 Incorporating survey responses in model: iteration 3 . . . 18 3.5 Model validation ...... 20 3.6 HR, O2 consumption, and starting PACO2 influence on BH...... 24

4 Discussion 26 4.1 Methodology ...... 26 4.2 Model evaluation ...... 27 4.3 Safe tool ...... 28 4.4 Indicator for maximum voluntary BH length ...... 29 4.5 Characterizing the training effect of repeated BH . . . . . 30 4.6 Machine learning with small, uncontrolled sample pop- ulation ...... 30 4.7 Future work ...... 31

v vi CONTENTS

5 Conclusion 33

Bibliography 34

A Background Information and Literature Study 37 A.1 in the lungs ...... 37 A.1.1 Pulmonary system basics ...... 37 A.1.2 in the body ...... 38 A.1.3 Carbon dioxide in the body ...... 39 A.2 Physical laws that govern physiological gas exchange . . 39 A.2.1 Hydrostatic pressure, Boyle’s Law, Charles’s Law 39 A.2.2 The diving reflex ...... 41 A.2.3 The Haldane and Bohr effects ...... 42 A.3 Breath-hold influence on gas-exchange in the literature . 43 A.3.1 Mechanical changes ...... 43 A.3.2 Hemodynamic changes ...... 43 A.3.3 Physiological changes ...... 44 A.4 Modeling gas exchange ...... 46 A.4.1 Artificial neural networks ...... 46 A.4.2 Relevant clustering techniques ...... 47 A.4.3 Existing physiological models ...... 49

B Final model inputs, outputs, and respective code 52

C Additional figures 53 CONTENTS 1

Abbreviations and Shorthand

Abbreviation Concept BH Breath-hold HR O2 Molecular oxygen PO2 of oxygen PAO2 Alveolar partial pressure of oxygen CO2 Molecular carbon dioxide PCO2 Partial pressure of carbon dioxide PACO2 Alveolar partial pressure of carbon dioxide LOC Loss of consciousness IVC Inspiratory vital capacity SD Standard deviation GLM General linear model NLM Nonlinear model atm Atmosphere mmHg Milimeters of mercury kPa Kilopascal SpO2 Peripheral oxygen saturation HD High dimensional SOM Self organizing map RER Respiratory exchange ratio SHLP Single hidden layer perceptron Chapter 1

Introduction

1.1 Shallow water blackout

Shallow water blackout, as referred to in this report, is a condition that causes loss of consciousness in freedivers upon returning to the surface after performing apnea (holding his/her breath) under water, not to be confused with the original definition of blurred consciousness as a result of in closed circuit oxygen . In many cases around the world every year, experienced swimmer or not, shallow water blackout has been fatal [2]. The deeper one dives, the higher the experienced, resulting in greater internal partial pressures of gases [3]. Loss of consciousness occurs when the brain experiences , which usually occurs when the partial pressure of oxygen in the lungs drops below 4kPa [4]. With the aid of increased ambient pressure during diving, a person might feel and behave fine, but upon returning to the surface, the decreased ambient pressure and sudden drop of partial pressure of oxygen, also known as hypoxia of ascent, can cause the swimmer to lose consciousness before surfacing and to drown.

1.2 Literature review of BH modeling in hu- mans

Modeling breath-hold (BH) processes in humans in the literature to date has been attempted on a variety of topics, including dissociation curves [5] [6], arterial and peripheral saturation over time

2 CHAPTER 1. INTRODUCTION 3

[6][7][8], lung compression [9], and vascular pressures [10]. These models range in ability to generalize well to larger populations. Those that may generalize well tend to be very complex, requiring many bio- logical inputs. There also exists many clinical studies that have studied partial pressures during BH [11][12][13][14][15][16]; however, only im- plicit understandings of can be derived from these studies. There exists a gap in the literature of an explicit, generalized relation- ship that grounds maximal BH in humans and explains inter- and in- trapersonal differences in BH. A continuous, personalized BH model of PAO2 and PACO2 levels would be very useful for free divers in or- der to plan safer dives. This brings the question, can the partial pres- sure of oxygen and carbon dioxide be numerically modeled accurately enough from non-invasive surface variables (without continuous mea- surement) to predict end-tidal alveolar gas pressures?

1.3 Aim

The aim of this thesis is to create an individualized model of O2 uptake and CO2 generation over time during prolonged voluntary apnea, and extrapolate it for conditions at depth. Furthermore, it is desired that individual details about a person can be clustered informatively to un- derstand their influence on the model, so that it may be used by any person to guide safer free diving practices. The process to fulfill this aim begins with determining whether or not there exists a universally characterized relationship of gas partial pressure changes during hu- man BH. Then, the inter and intra-individual factors that are most in- fluential on oxygen metabolism during BH for this sample population must be evaluated. Finally, the robustness of the blood gas model will be expanded by including these dependencies. Chapter 2

Methods

2.1 Pre-BH procedure

Each participant filled in a consent form and questionnaire, reporting their height, weight, gender, resting heart rate, previous 2 hour diet and caffeine intake, smoking//scuba experience level, and perceived fitness status. Then his/her inspiratory vital capacity (IVC) was measured using a handheld Spirobank three times and the largest value was used. The most relevant in Stockholm was recorded at the beginning of each participant’s testing.

2.2 BH experimental set-up

Participants breathed in a mouthpiece through a three-way plexi-valve that allowed for sampling from a Datax NormoCap 200 gas analyzer and also attachment to a 3.0L rebreathing bag. They used nose-clips for all testing, and had their continuous SpO2 and plethysmograph monitored on the earlobe via a Masimo Radical 7. The participant’s continuous PAO2 and PACO2 were recorded throughout each trial us- ing an AcqKnowledge data acquisition and analysis program coupled with a BioPac MP150.

Participants first breathed normally through the mouthpiece with- out the bag attached until a stable breathing frequency was estab- lished. Then, they inspired to prepare for BH, and the bag was at- tached to the last open port on the valve. Every 15 seconds, the par-

4 CHAPTER 2. METHODS 5

ticipant was allowed one exhalation into the bag for a gas sample, and then re-inhaled from the bag. Time was noted at the beginning and end of the BH, in addition to subjective moment of the first physiolog- ical breakpoint. At termination of BH, the participant exhaled, took the bag off of the valve, and continued breathing through the mouth- piece until a stable breathing frequency was established and the SpO2 returned to normal levels. From this moment, each participant was allowed to relax to full comfort before the next trial began. This was repeated for a total of four BH. For the fifth trial, a thirty second hy- perventilation period was added just prior to BH. The participant was instructed to terminate their BH when they reached the longest time of their previous four trials. Finally, the sixth BH was without hyper- ventilation and without re-breathing.

2.3 Post-BH variable determination

Variables pulled from AcqKnowledge from each trial include pre-BH PO2/PCO2/PAO2/PACO2 and average expired PACO2, breathing fre- quency, volume of last inhalation before BH, minimum O2 saturation and its time delay, overall BH time, time to first subjective breakpoint, plethysmograph curve, and post-BH expired PAO2/PACO2. The rest of the data analysis was performed in MATLAB using scripts written entirely by the author. From these variables, a breath-to-breath RER value for each trial was calculated, based on the relationship between expiratory PAO2 and PACO2, fraction of O2, inspiratory PAO2, and ambient pressure outlined in [17]. Finally, a continuous heart rate was calculated from the plethysmograph results. To remove re-breathing artifacts, a fifth-order polynomial was fit to the data to identify the po- sition of the first local minimum. The polynomial was not a great fit to predict the behavior of the data, but it was effective in locating this feature of interest.

2.4 Data analysis

Figure 2.1 gives a visual overview of the structure and direction of the analysis procedures after variable determination. 6 CHAPTER 2. METHODS oe.Bace n hwitrsigosrain htwr oe hogotti rcs,dntdby denoted process, this throughout was noted research were this that green of the observations in goal interesting terminating main show generation, the model 4 the how colors. and of in demonstrate non-green steps 3 performed 2 key procedures Branches on and different attention 1 four the boxes. Branches focusing to arrows correspond bold results. 1-4 with different Numbers achieved of structure. pursuit project in of parallel Overview 2.1: Figure CHAPTER 2. METHODS 7

After isolating BH-only data, noise and clipped values were re- moved and points of O2 measurements (every 15 seconds) were lo- cated via a function of the gradient of the smoothed signal. Both time- normalized and unnormalized datasets were regressed with a com- mon equation. PAO2 data was fit with a linear model, and the PACO2 data, which happened to be inherently less noisy, was fit with a lo- gistic growth equation. This follows branch 1 in Figure 2.1. Next, the same methods of curve-fitting were used on each BH separately. Comparison of the slopes of the diminishing PAO2 motivated using an interactions-based general linear model (GLM) in the next iteration. Comparison of the growing curves of PACO2 demonstrated a need for updated logistic equation coefficients for each participant in the next iteration.

Branch 2 describes analyzing secondary factors for incorporation in the model according to Figure 2.2. Pearson’s coefficient of correlation was calculated with a respective p-value between various key vari- ables and overall BH information (BH length, end PAO2, end SpO2, rate of O2 consumption), which was then used to determine the pres- ence of linear correlation (p < 0.05). Using an interactions-based GLM with a logarithmic link for PAO2, the likelihoods of selected key vari- ables were estimated and incorporated into the first model for PAO2 described above. The updates for the PACO2 model were more diffi- cult, as the relationship to physiological data to equation coefficients is not as clear. Therefore, a neural network was trained on the BH data and later used to estimate proper logistic growth coefficients from the previously identified key variables as input. These improvements rep- resent step 1 in Figure 2.2.

In parallel, also in branch 2, two different clustering methods were used to look for groupings/patterns in the sample population in order to analyze whether or not subjective survey responses could predict the values of key variables in the model. Missing data values were rep- resented as their own category with a numerical representation of 0, whereas positive responses were assigned on a positive integer scale. Survey data was clustered with k-means, and the distribution of key variable values of members of these clusters was investigated using a histogram analysis, two-tailed t-test, and ANOVA. Various self orga- nizing maps (SOM)s were then used to cluster overall BH data upon 8 CHAPTER 2. METHODS

Figure 2.2: Overview of model iterations. Iterations proceed in chronological order from right to left, but data input and final calcula- tions proceed from left to right. which a color mapping of survey data was used to visualize distri- bution of a survey variables across clusters. A second single hidden layer perceptron (SHLP) was used to estimate the value of a key vari- able from the survey clusters when significance was found (step 2 from Figure 2.2).

For validation of the model, 3 previously unseen testing datasets were used, after which the results from the model could be compared to observed measurements. These testing datasets were from an ex- perienced free-diver from this experiment, 9 other participants’ non- rebreathing trials from this experiment, and data from previously pub- lished research [1]. The only information missing from previous re- search necessary for this model was resting heart rate (HR) and fre- quency of physical exercise. These were estimated using the male group average from the sample population used in this experiment. Barometric pressure was estimated using a ratio of starting PAO2 val- ues.

Branch 3 demonstrates processing the continuous plethysmograph recording. First, the beat-to-beat HR was averaged over 6 beats. This CHAPTER 2. METHODS 9

signal was approximated with a polynomial, and a general pattern including features was extracted. Branch 4 demonstrates how data from the hyperventilation trials was used to understand the influence of starting PACO2 on longer BH and the influence of hyperventilation on the rate of O2 consumption. Chapter 3

Results

3.1 Explicit model of PAO2 and PACO2 dur- ing BH: iteration 1

The results of 16 variables collected for all 18 participants that were later used in analysis are shown in Tables 3.1, 3.2, 3.3, and 3.4.

Of the normalized data, a linear least squares model explains 90.93% of the PAO2 data variance (correlation coefficient = -0.9535). A nonlin- ear, logistic growth model explains 83.11% of the PACO2 data variance (correlation coefficient = 0.9116). The high goodness of fit for both nor- malized models suggests a possible universal relationship for alveolar pressures in BH, but cannot be used for a feasible predictive algorithm without knowing the BH length in advance.

Of the unnormalized PAO2 data (Figure 3.1), a linear least squares model explains 85.91% of the variance (correlation coefficient = -0.9269). Of the unnormalized PACO2 data (Figure 3.2, a logistics growth model explains 82.08% of its variance (correlation coefficient = 0.9060), and a mean squared error of 0.3296. A logarithmic growth curve (R2 = 0.8334) and a standard quadratic equation (R2 = 0.8451) were also fit. Physiologically, the logistic equation was deemed most appropriate since as PACO2 rises past a threshold, the blood-buffer system can store increasingly more CO2.

10

CHAPTER 3. RESULTS 11

RER

vrg RedB (bpm) end-BH HR average

vrg RpeB (bpm) pre-BH HR average

otne p2do (s) drop SpO2 continued

iiu p2(%) ( SpO2 minimum

V (L) IVC

atihldvlm (L) volume inhaled last

rahn rqec (/min) frequency breathing

rtbekon (s) breakpoint first

Hlnt (s) length BH

n AO (kPa) PACO2 End

n A2(kPa) PAO2 End

tr AO (kPa) PACO2 start

tr A2(kPa) PAO2 start

tr C2(kPa) PCO2 start tr O (kPa) PO2 start

0.49 0.410.21 0.42 0.12 0.250.19 0.78 0.55 0.10 0.32 0.270.50 0.60 0.69 22.44 0.31 4.041 0.45 0.10 0.4450.37 0.45 0.72 22.07 0.512 0.27 7.047 0.30 0 0.13 0.8630.57 0.70 0.70 10.21 0.172 0.45 5.5 0.22 0 4.111 0.190.33 2.845 0.29 0.59 12.7 1.229 3.069 0.16 0.41 5.999 0.153 0.35 4.872 8.7370.32 1.312 0 0.42 0.103 2.883 0.19 19.9 0.983 0.199 0.22 0.18 0.24 2.862 19 00.24 0.38 0.034 3.984 0.74 18.46 0.976 0.15 44.25 0.36 1.027 0.05 2.428 2.79 1.6430.29 0 0.53 3.693 0.74 5.094 0.327 2.563 0.024 0.06 0 0.40 0 0.40 6.1040.22 0 0.27 3.095 0.64 22.3 0.066 0.25 0.15 1.159 2.632 0.13 15.560.28 0.101 1.751 6.971 0.31 2.165 1.51 8.958 0 3.48 2.369 0 0.09 24.01 0.31 0.11 4.68 2.443 2.4070.34 0.75 0.67 18.25 0.058 0.182 4.854 4.578 0.24 0 32.4 0.42 0 0.068 0.05 4.929 0.832 0.48 2.117 2.47 13.75 8.108 0.244 1.389 1.155 0.39 6.578 0.45 0.021 0 0.784 0.723 0.415 1.30 27.09 4.487 0.141 10.24 9.899 4.6 0 0.29 13.97 6.185 1.849 0.057 1.999 13.44 0 0.067 6.769 11.98 4.886 2.15 0.968 1.099 0.275 0 6.577 0.059 0 2.176 0.052 5.604 8.466 1.361 3.421 4.63 5.208 6.668 5.408 0.09 0.096 ujc # Subject 103 19.04 1.21154 16.43 19.72 2.99 0.71201 6.40 16.48 19.57 3.30 6.58 0.65254 4.01 100.4 16.99 18.80 71.33 2.93 7.52 1.35 11.93267 5.74 125.8 17.00 1.323 19.59 70.5 2.77 4.63 6.57 0.95295 9.481 6.66 85.91 114.5 15.95 19.20 2.525 13.51 79.25 3.99 6.96 1.20 4.2 53.12 14.33305 4.93 68.05 90.58 17.13 1.76 19.19 0.62 79.38 37.61 2.89 7.00 1.33 3.85 11.65 15.6370 6.03 149.8 17.16 80.82 19.14 85.56 2.193 98 3.11 90.57 7.02 1.49 11.35 3.55 0.806 68.87411 5.02 126.5 17.85 19.53 85.73 72.95 9.599 83.71 2.77 7.70 0.92 11.04 0.739 9999 15.82 77.56461 6.85 5.83 152.7 18.00 1.993 19.55 75.14 139 2.29 3.9 6.35 0.67 0.674 70.37479 10.55 3.63 16.45 99.1 17.54 19.56 88.16 69.76 2.261 2.62 7.31 1.04 10.92 77 89.11 3.45 73.43527 6.21 1.02 161.3 17.62 18.98 96.82 84.36 90.67 2.84 20.14 7.37 1.34 0.664 13.59 17.98 9999639 4.02 81.25 149.3 16.89 2.14 19.50 6.47 86.96 96 2.97 6.94 0.90 4.21 0.82 90.27 10.02 188.5 17.34 13.43 69.58 27.33 5.80 163.7 3.00 79.27 9.025 3.1 9.822 60.54 94.5 76.61 4.55 2.695 0.759 90.3 5.65 82 4.11 6.48 0.625 84.29 75.43 142 9.78 12.74 9.76 9999 106.8 74.05 78.44 4.38 10.88 67.35 76.05 2.075 0.612 0.571 92.2 4.66 8.628 75.12 73.66 7.715 83.1 76.48 76.44 0.663 0.626 Table 3.1: Experimental datadeviation on (SD). rebreathing BH. For each participant, row 1 is the mean, row 2 is the standard 12 CHAPTER 3. RESULTS

4 08 .470.450137 .717112599 9976.9777.36.70.867 68.67 74.63 0.558 71.08 7.7 64.71 64.89 11.94 0.651 80.87 90.74 4.51 85.82 7 2.855 0.666 11.73 9999 16.68 85.65 84.19 0.697 9999 101.5 91.94 83.24 6.55 122.5 9.455 78.04 4.848 167.1 152 92.75 11.39 9.61 7.07 7.79 4.71 133.7 75.3 2.743 7503.347500.163.72 181.8 3.67 9.431 5.68 0.14 6.74 3.09 76.37 20.80 2.19 16.86 150.3 6.05 843 17.94 0.72 7.60 2.68 99.04 19.35 17.94 169.5 5.70 838 0.53 7.73 3.37 20.09 17.59 4.05 749 0.26 2.62 20.79 17.96 680 0.98 19.66 661 Subject #

.002 91349.8.503 78 04 99006444524995160.035 5.146 0.052 4.929 4.272 0.101 4.542 2.84 6.712 6.444 0.822 6.662 3.789 0.662 4.067 0 0.063 6.532 0 3.931 0.154 0 0 0.021 4.801 1.244 9999 1.569 3.448 9.256 0.1 30.41 2.553 18.55 17.83 1.424 0.97 0.10 10.11 0 16.29 0.35 0.329 12.49 0.58 4991.334997.680.45 2.454 0.05 0 0.10 44.73 0.25 0.974 34.11 0.85 0.24 0.50 1.789 0.12 0.28 28.29 0.06 28.78 0.79 0.19 0.10 0.14 0.40 0.11 0.96 0.29 0.09 0.24 0.07 0.21 0.35 0.09 0.27 start PO2 (kPa)

start PCO2 (kPa)

start PAO2 (kPa) al .:Eprmna aao erahn Hcontinued BH rebreathing on data Experimental 3.2: Table start PACO2 (kPa)

End PAO2 (kPa)

End PACO2 (kPa)

BH length (s)

first breakpoint (s)

breathing frequency (/min)

last inhaled volume (L)

IVC (L)

minimum SpO2 ( %)

continued SpO2 drop (s)

average HR pre-BH (bpm)

average HR end-BH (bpm)

RER

CHAPTER 3. RESULTS 13

RER

vrg RedB (bpm) end-BH HR average

vrg RpeB (bpm) pre-BH HR average

otne p2do (s) drop SpO2 continued

iiu p2(%) ( SpO2 minimum

V (L) IVC

atihldvlm (L) volume inhaled last

rahn rqec (/min) frequency breathing

rtbekon (s) breakpoint first

Hlnt (s) length BH

n AO (kPa) PACO2 End

n A2(kPa) PAO2 End

tr AO (kPa) PACO2 start

Table 3.3: Experimental data from hyperventilation trials

tr A2(kPa) PAO2 start

tr C2(kPa) PCO2 start tr O (kPa) PO2 start

20.18 0.8520.35 0.24 19.2620.01 2.08 0.57 18.7619.95 2.34 7.88 0.99 19.3020.18 1.80 2.74 6.03 0.75 19.3220.35 1.94 5.53 7.23 0.55 122.00 18.3320.04 73.00 2.92 8.30 5.66 0.88 28.52 177.00 19.3520.09 114.00 23.79 2.48 1.43 7.15 6.14 0.66 138.00 19.3220.33 3.37 131.00 31.97 1.57 4.63 6.02 5.43 0.57 102.00 19.1320.18 2.19 42.76 4.20 2.16 5.48 90.92 7.01 0.51 35.64 155.00 19.6220.02 9999 3.85 65.84 11.54 1.69 1.26 7.22 7.06 0.65 147.00 19.29 13.12 13.7120.19 108.70 141.00 80.90 64.52 41.59 1.56 3.55 4.48 94.94 9999 6.00 0.62 160.00 19.09 12.5220.25 0.48 1.90 9999 93.75 1.79 5.83 6.08 108.30 88.94 6.92 0.68 122.00 19.43 74.26 54.3920.36 0.77 9999 3.90 7.24 1.65 4.48 0.60 90.90 1.90 7.09 1.00 170.00 19.24 24.4620.56 100.00 86.91 12.09 51.86 146.63 1.71 5.70 9999 6.46 0.42 62.89 3.45 169.00 19.40 12.0020.15 93.31 2.30 128.00 93.20 0.53 2.22 6.47 5.42 82.19 6.14 0.48 60.48 202.00 18.39 85.9620.04 2.31 9999 4.21 94.94 0.74 3.07 11.18 4.36 91.89 5.69 0.38 153.00 18.90 20.71 0.73 130.00 5.65 57.03 76.86 11.49 33.61 1.81 4.98 2.49 7.42 149.00 19.22 104.17 10.28 101.70 9999 9999 0.69 84.86 73.08 1.69 5.88 90.63 7.26 4.11 195.00 11.02 4.38 33.06 0.59 137.00 81.08 34.81 3.78 120.00 2.38 6.16 144.00 76.91 74.07 0.53 78.91 2.48 9999 11.46 0.53 7.19 7.70 4.66 192.00 22.12 144.00 5.68 90.63 23.65 2.97 174.00 130.15 81.88 71.09 4.47 156.00 86.08 77.86 65.41 13.54 0.53 4.71 0.57 8.08 1.99 6.55 99.67 91.84 72.46 105.63 4.51 85.95 81.08 9.92 0.42 11.74 0.70 81.31 101.01 102.04 92.02 77.92 12.74 0.56 0.45 128.75 70.75 0.48 ujc # Subject 103 154 201 254 267 295 305 370 411 461 479 527 639 661 680 749 838 14 CHAPTER 3. RESULTS

3 96 .91.232 .863 3.05.61.427 .18.81.26.25.30.54 0.58 58.03 80.21 66.52 92.02 0.81 11.62 81.30 0.65 5.96 89.88 74.44 80.21 95.98 4.51 89.29 0.53 8.68 4.71 0.59 11.64 65.65 80.86 2.77 74.07 79.87 70.09 2.76 0.71 16.04 5.68 65.50 61.22 58.56 4.66 9.96 134.00 8.80 2.71 69.28 0.69 8.82 82.90 90.00 1.67 16.13 89.29 6.38 84.88 0.50 94.00 8.52 10.74 5.65 63.00 77.52 132.00 56.18 89.89 7.78 4.21 64.00 14.96 6.13 2.90 56.60 97.00 6.84 85.89 10.03 3.85 3.23 2.36 24.08 13.08 16.82 16.56 5.02 61.00 89.87 7.51 4.20 3.20 1.47 115.00 61.00 17.26 116.00 13.66 0.49 8.53 4.63 2.47 3.44 4.96 47.88 19.65 18.21 11.02 0.37 5.50 11.76 2.81 838 1.21 77.00 58.78 20.76 17.11 108.00 14.80 0.98 9.74 2.53 680 4.20 43.08 20.04 17.68 0.91 6.45 12.47 2.26 661 60.00 19.47 18.19 0.62 7.61 2.99 639 4.98 19.99 16.77 0.78 10.76 3.35 461 19.43 16.87 0.64 2.08 411 19.88 17.64 0.48 201 19.96 0.73 154 19.41 103 Subject #

start PO2 (kPa)

start PCO2 (kPa)

start PAO2 (kPa)

start PACO2 (kPa) trials non-rebreathing from data Experimental 3.4: Table

End PAO2 (kPa)

End PACO2 (kPa)

BH length (s)

first breakpoint (s)

breathing frequency (/min)

last inhaled volume (L)

IVC (L)

minimum SpO2 ( %)

continued SpO2 drop (s)

average HR pre-BH (bpm)

average HR end-BH (bpm)

RER CHAPTER 3. RESULTS 15

Figure 3.1: PAO2 linear model with the following form: PAO2(t) = -0.0776*t + 17.524. Upon histogram analysis not pictured here, the residuals were found to be normally distributed around 0.

Figure 3.2: PACO2 logistics model on the unnormalized dataset. The equation takes the following form: PACO2(t) = 7.1261/(1 + 1.4110*exp(-0.0295*t)) 16 CHAPTER 3. RESULTS

3.2 Statistical testing to identify key variables for the model

Scatterplots were used to visually analyze results of correlation test- ing (Figure 3.3), along with Pearson’s correlation coefficient and cor- responding p-value. These calculations can be seen in Table 3.5. Cor- relations with p-values less than 0.05 were accepted as significant and used in choosing independent variables for future iterations of a GLM and nonlinear model (NLM).

Figure 3.3: Scatter plots showing correlation for three key variables chosen for next iteration incorporation into gas models. These scat- terplots include data from all BH, including repeated measurements from the same participant.

3.3 Incorporating key variables into model: iteration 2

Different GLMs were created using various combinations of these sig- nificant variables from Table 1, and the one with the highest R2 value was identified as best. This model identified the combination of vol- ume of the last inhalation, RERs, and time to subjective breakpoint as having the strongest correlation to the PAO2 data (Table 3.6) with an improved adjusted R2 value of 0.884. This explains an additional 2.5% of the data compared to iteration 1.

In order to incorporate the same dependencies into the nonlinear PACO2 model, a SHLP (1 hidden layer, 5 nodes) was used to relate the aforementioned 3 key variables to updates in the 3 coefficients of the CHAPTER 3. RESULTS 17 4.07E-01 2.39E-02 1.56E-01 9.77E-02 1.36E-02 5.60E-02 1.02E-01 2.09E-02 4.57E-02 5.36E-01 4.24E-01 4.48E-01 2.96E-01 3.77E-03 2.26E-056.73E-02 1.58E-04 8.88E-03 2.60E-01 4.50E-01 7.59E-01 2.21E-01 7.64E-01 3.14E-02 2.67E-02 5.44E-03 1.90E-02 1.53E-024.65E-04 1.26E-02 6.23E-04 1.12E-03 4.09E-02 8.81E-03 4.40E-03 Variable 1time to first breakpoint BH length 7.42E-01 Variable 2IVC BH1RER BH2 BH3 slope of BH4 PAO2 1.61E-01 6.11E-02 BH5 min saturation 9.18E-02 BH6 volume of last inhaleRERstart PAO2 BH length IVCavg start HRvolume of last inhaleend PACO2 BH length slope of slope PAO2 of PAO2 BH length 4.89E-01 6.62E-02 BH length 4.34E-01 1.62E-01 6.32E-02 8.20E-02 end PAO2 4.52E-01 4.28E-01 8.38E-01 2.71E-01 5.49E-01 1.06E-01 2.71E-01 4.07E-01 2.68E-01 Table 3.5: P-valuescorrespond of to Pearson’s the key correlation variables eventually testingare chosen shown of for in iteration bold. key 2 of variables the for model. P-values each significant BH at alpha group. = 0.05 The first three rows 18 CHAPTER 3. RESULTS

Table 3.6: General linear model for PAO2 data, iteration 2, where x1 is time, x2 is volume of last inhalation, x3 is calculated RER, and x4 is time to subjective breakpoint.

Term Coefficients Intercept 26.188 x1 -0.110 x2 0.027 x3 -22.423 x4 -0.001 x1*x3 0.064 x2*x3 2.453 x2*x4 -0.011 x3*x4 0.064 logistic growth equation. K-folds cross validation with 10 folds was used to determine an appropriate training over 10,000 epochs, result- ing in a mean overall cross validation error of 5.04%. The final network was trained on all the trial data involved in making the first models.

3.4 Incorporating survey responses in model: iteration 3

Next, an effort to predict values for the three identified key variables using the survey data was performed via clustering methods described in section 2.4, and the corresponding difference in means testing re- sults are seen in Table 3.7. A two sample t-test was used in the case of k=2 clusters, and a standard ANOVA was used for k=3 clusters. Sample ANOVA results for k=3 with respect to the 3 key variables can be seen in Figure 3.4. Note that for the sake of simplicity, all BH were treated as independent samples in this testing. This resulted in clusters where there was no overlap of the same participant’s BH data across multiple clusters. This means that for each participant, all of one par- ticipant’s BH data was found in the same cluster, as expected.

To update the results from K-means, various SOMs were used to look at influence of survey responses on overall BH information as CHAPTER 3. RESULTS 19

Figure 3.4: Sample ANOVA results of distributions of key variables across 3 clusters using k-means clustering.

Table 3.7: Significance testing results from clustering with k-means

Key Variable k P-Value Volume of last inhalation 2 3.7994e-05 3 1.5364e-04 RER 2 2.3176e-04 3 2.7289e-04 Time to subjective breakpoint 2 3.0587e-21 3 3.3854e-37 a type of sensitivity analysis to remove unnecessary inputs. Each BH was mapped from a 16-dimensional space (inspired PO2, inspired PCO2, end PAO2, end PACO2, resting breathing frequency, minimum satura- tion, time of continuing saturation drop, BH length, time to first break- point, inhaled BH volume, average HR before BH, average HR after BH, IVC, start PAO2, start PACO2, calculated RER) to a 2-dimensional grid. Influence of survey responses were color coded and overlain onto the grid for visual analysis (Figure 3.5). Color clusters represent similarities in specific survey responses correlating with similarities in BH information. These color maps helped determine which of the sur- vey variables might be most important to include in the predictions.

From the SOM analysis, age, barometric pressure, height, weight, resting HR, smoker/freediver/scuba experience, and frequency of phys- ical exercise per week were found to map to clusters of BH data. An- other SHLP with identical architecture to the first perceptron was used to map these survey variables (6) to the previously identified key vari- ables (3), seen in step 2 of Figure 2.2 for the third version of the models. The mean overall cross validation error for this network was 12.28%. Results from this model were used in iteration 2: directly as input for 20 CHAPTER 3. RESULTS

Figure 3.5: Self Organizing Map displaying influence of BH number in 6-level color coding. Physical proximity in this 2D figure represents overall similarity in the high dimensional (HD)-BH-data space (N = 16). Red represents the 5th BH, which was with hyperventilation, and green represents the 6th, which represents non-rebreathing trials. As expected, these two groups have mapped themselves into nearby clus- ters, whereas trials 1-4 do not seem to be correlated with other patterns in BH data. Black, blue, cyan, and magenta represent BHs 1-4, respec- tively.

PAO2 prediction, and indirectly through the first neural network to determine coefficients for logistic growth for predicting PACO2 data (step 1 from Figure 2.2).

3.5 Model validation

Sample model predictions for two different participants with identi- cal dive profiles can be seen in Figures 3.6. Additionally, in Figure 3.7, two different dive profiles for the same participant are compared. With these models, persons who plan to engage in some sort of free- diving activity can input their own information about themselves, and receive an individualized dive profile that shows whether or not they CHAPTER 3. RESULTS 21

will surface within a safe threshold from suffering a L.O.C..

Figure 3.6: Identical dive profiles for two different participants yield different results, with the participant on the left surfacing closer to the loss of consciousness (LOC) zone. The profile is as follows: 0.5m/s de- scent/ascent speed, 20m max depth, and 30s bottom time. Error bars are shown on the ending partial pressures as the mean average error plus one standard deviation from the non-rebreathing trials. Dotted curves represent PAO2, solid curves reprsent PACO2.

Results from testing the model on data from an experienced freed- iver and from the non-rebreathing trials can be seen in Tables 3.8, 3.9, and 3.5, respectively. For validation in a depth setting, data from [1] was used as test- ing data. Linér presented average data for 5 male participants for a 20m dive with descent rate of 1m/s and ascent rate of 0.667m/s, with a bottom time of 20s. The model predicted end PAO2 and PACO2 with 24.81% and 4.32% error, respectively, corresponding to ±2.22kPa and ±0.25kPa. Linér also presented data upon arriving at 20m and departing 20m, which matched model predictions (PAO2 and PACO2 respectively) with 2.53% and 61.98% at 20s, and 2.75% and 10.27% at 40s. 22 CHAPTER 3. RESULTS

Figure 3.7: Different dive profiles for the same participant. The profile on the left is 0.5m/s rate of descent and ascent, max depth of 20m, bot- tom time of 30s. The profile on the right is 0.3m/s rate of descent and ascent, max depth of 10m, with a bottom time of 45s. Dotted curves represent PAO2, solid curves reprsent PACO2.

Table 3.8: Model predictions on experienced free-diver trials. There was a large error in PAO2 predictions. Last inhaled volume data was missing for his trials, so these numbers are based on the group av- erage, which may be inaccurate for his case. His minimum satura- tion was overpredicted by the model. Bypassing the first network and directly inputting his measured minimum SpO2 yielded an error of 60.11%, which is almost 12% lower than the full model prediction. It is however, still a gross overestimate of what was actually measured.

Trial Gas Predicted end Measured end Percent Absolute partial pressure partial pressure Error Error (kPa) (kPa) (%) (kPa) 1 O2 6.20 4.28 44.9 1.92 2 O2 4.60 3.71 23.9 0.89 3 O2 4.42 3.18 39.18 1.24 4 O2 6.41 3.73 72.12 2.69 Mean 5.41 3.72 45.03 1.69 St. Dev 1.08 0.39 17.43 0.69 1 CO2 7.61 7.13 6.67 0.48 2 CO2 7.63 6.59 15.79 1.04 3 CO2 7.63 7.13 7.08 0.50 4 CO2 7.60 7.42 2.42 0.18 Mean 7.62 7.07 7.99 0.55 St. Dev 0.61 0.30 4.86 0.31 CHAPTER 3. RESULTS 23

Table 3.9: PAO2 model prediction errors on non-rebreathing trials

Participant Predicted end Measured end Percent Absolute partial pressure partial pressure Error (%) Error (kPa) (kPa) (kPa) 103 12.34 10.761 14.7 1.58 154 8.64 7.608 13.58 1.03 201 11.45 12.466 8.19 -1.02 411 9.07 9.737 6.9 -0.67 461 8.63 11.759 26.65 -3.13 639 10.12 8.532 18.64 1.59 661 8.55 7.509 13.84 1.04 680 10.48 10.026 4.49 0.45 838 7.77 7.781 0.08 -0.01 Mean 9.67 9.58 11.90 1.17 St. Dev 1.52 1.84 7.99 0.89

Table 3.10: PACO2 model prediction errors on non-rebreathing trials

Participant Predicted end Measured end Percent Absolute partial pressure partial pressure Error (%) Error (kPa) (kPa) (kPa) 103 5.85 4.981 17.48 0.87 154 7.44 6.452 15.31 0.99 201 5.26 4.2 25.29 1.06 411 6.70 5.503 21.82 1.20 461 6.75 4.96 36.09 1.79 639 6.20 5.016 23.65 1.19 661 8.02 6.844 17.17 1.18 680 5.94 6.128 2.99 -0.18 838 6.94 6.38 8.79 0.56 Mean 6.57 5.61 18.73 1.00 St. Dev 0.85 0.88 9.62 0.45 24 CHAPTER 3. RESULTS

3.6 HR, O2 consumption, and starting PACO2 influence on BH

Other interesting and significant results from this research are pre- sented here, even though the significance was not enough to justify incorporation into the aforementioned predictive model.

A continuous heart rate was calculated for each trial, and a smooth signal and indicator presence was able to be obtained for various tri- als for 14 different participants. In some cases, the participant’s HR increased at the beginning of the BH before decreasing. In these cases, the time from the first maximum HR to minimum HR was used as the time to indicator. Each participant’s time to indicator (sample shown in Figure 3.8) was averaged, along with their respective BH lengths. A significant correlation (p = 0.0185) was found, suggesting the presence of an HR-indicator on an individual scale. The percentage of BH time that it took to reach the first minimum for all trials was analyzed using a histogram (Figure 3.9) in addition to calculating the mean (47.08%) and standard deviation (18.15%). This distribution of variance was large enough to discredit the possibility of using HR as a global nu- merical indicator of BH behavior.

Figure 3.8: Example of HR indicator ( during beginning of BH to turning point, with the remaining BH time having an increasing HR). CHAPTER 3. RESULTS 25

Figure 3.9: Fraction of total BH time to reach minimum heart rate

Additionally, the effect of the starting PACO2 on BH length was investigated. The difference between the starting PACO2 values from the longest and shortest BH was shown to be significant (one sample t- test, p=0.0120). Then the same approach was taken using the first and fourth BH, where no significance was found (p=0.2134). There were 15 out of 18 participants who followed a continuously decreasing start PACO2 from BH 1 to 4, and the remaining 3 participants exhibited the opposite trend. In participants who displayed the decreasing trend, significance was found in both longest-shortest and BH 1-4 tests (p= 0.0019, 0.0016).

Lastly, the starting volume of O2 in the lungs could be calculated from reference values of functional residual capacity [18], volume of last inhalation, initial PO2, ending PAO2, and barometric pressure. It was found that each participant consumed on average 729mL O2 dur- ing their BH (range 344mL - 1013mL). The increase during hyperven- tilation was an average 51.2mL more than non-hyperventilation trials. There was no significant difference found (paired t-test, p=0.0849) be- tween the rates of O2 consumption from the longest non-hyperventilation BH and hyperventilation BH. Chapter 4

Discussion

4.1 Methodology

The methods chosen for this experiment were appropriate insofar as they were non-invasive and did not require training. A re-breathing bag has been used in similar studies to measure alveolar gases, yet it has drawbacks. Allowing the breathing muscles to contract peri- odically can trick the body into a false sense of breathing, which can artificially extend the BH. Additionally, re-breathing mixes the alveo- lar gases which would not happen in the field, leading to a diminished influence of anatomical dead-space (150mL) in what was observed in this experiment than what one would expect. Furthermore, the data collection device introduced more ( 15cm from mouth to sampling line), which may have affected the measurements.

Variables investigated, both key for the model and from survey data, were chosen from what previous publications have identified as influential on BH. However, some of the error from linking the sur- vey responses to key variables might be in part due to the lack of understanding of how these factors interact. For example, does the frequency of physical training per week directly affect the volume of the last inhaled breath before BH? Does age affect the time to subjec- tive breaking point? Since many of these relationships are complicated and nonlinear, the ability to discern patterns via a neural network is a valuable tool. However, in the future, perhaps stronger physiological explanations would lead to identification of other, more relevant vari- ables that would yield more accurate results. It would be useful to

26 CHAPTER 4. DISCUSSION 27

direct efforts to better understanding the relationship between survey responses and key variables separately from understanding the rela- tionship between key variables and BH data, before being applied to a predictive model using the methods shown here.

Finally, for the purposes of this research, statistical testing was a useful tool, though not an end conclusion in itself. Due to the nature of working with large, highly variable, and repeated measure datasets, some of the analysis had been simplified in order to work with an automatic program, written by the author. In future work, it would be interesting to investigate applied statistics more heavily to see what kind of conclusions can be drawn about such a small sample of the general population.

4.2 Model evaluation

The results from the hyperventilation trials in the datasets were not used to create the model, because in practice, hyperventilation before an underwater BH is a dangerous thing to do and should be avoided. Furthermore, it introduces many physiological changes, not just low- ering starting PACO2, and so is not a controlled manipulation of only that one variable. All testing in this research was carried out at surface pressure. Extrapolation to scenarios of depth might introduce greater error, since the literature reports different ending alveolar gas pres- sures after identical BH carried out at surface and at depth. After a dive, PAO2 has been found lower than after the identical dive at sur- face [16] [14], which means that results from a predictive tool modeled from surface measurements would overestimate ending PAO2 values.

Results from the first time-normalized models are promising, al- ready explaining 91% and 83% of the variance in PAO2 and PACO2 data for 16 randomly chosen participants. This high degree of cor- relation points to some degree of universality among BH in humans. Regarding the final presented model, to what degree can it predict a safe dive? This is a difficult question, as there are many factors that contribute to a person’s ability to perform apnea that this study may not have considered. With average PAO2 percent errors on unseen, non-rebreathing data of around 11.9 ±7.99% (1 SD), if this model pre- 28 CHAPTER 4. DISCUSSION

dicts ending PAO2s of 6.237kPa or less, about 0.15% of users (15 in 10,000) will actually have an ending PAO2 lower than 4kPa, accord- ing to the 68-95-99.7 rule, while 99.85% will fall within 3 SD of the mean error. An even safer model would use 4 SD, where only 32 in 1 million (0.0032%) will have an end PAO2 less than 4kPa if the model predicts their end-value to be 7.125kPa. With these safety thresholds, this model can be viewed as a tool to understand safe max bottom times for new freedivers, swim training, or in other pools where BH is a popular hobby or challenge, but should not be relied on as the only safety consideration in the field.

Regarding validation on the data from [1], the results from section 3.5 of PAO2 data, which were accurate at 20 and 40s but 24.81% error at end-BH, provide evidence to the PAO2 model’s accuracy through- out the dive, perhaps losing accuracy during ascent. However, the large CO2 inaccuracies while at 20s and 40s suggest this model’s in- adequacy in explaining the time course of PACO2 build-up, even if it predicts the final value with relatively high accuracy (4.32%).

4.3 Safe dive planning tool

The application of this research is intended to create safer free-diving practices, and a safer environment for any form of BH . This research has resulted in a proof of concept for such a planning- tool (Figures 3.6 and 3.7). These individual dive profiles are exciting, though still preliminary. Further limitations of the model still include accounting for the differences in gas physiology during descent and ascent as previously mentioned, the effect of , humidity of breathed air, lung compression, and the effect of activity level through- out the dive, which poses the next big challenge for the application of this tool. A balance must be found between the importance of how precisely each of these factors is accounted for in a BH model while developing a robust, simple, and useful BH model that is accessible to all. It may be considered acceptable to work within somewhat of a black box, so long as all assumptions regarding the input are founded on solid physiological principles. CHAPTER 4. DISCUSSION 29

4.4 Indicator for maximum voluntary BH length

While the aforementioned models give some explanation of the vari- ance within partial pressures throughout BH, they do nothing to pre- dict maximum voluntary BH length. The survey data collected in this experiment was investigated for the presence of an indicator for max- imal BH prediction. The indicator observed in this research might be interpreted as a combination of the diving reflex factor, coupled with simultaneous sympathetic activation of the cardiovascular system. In experienced free-divers, bradycardia as a result of the diving reflex often occurs throughout the entire BH [19], but in the general pop- ulation, perhaps the sympathetic activation due to the stress of the BH overcomes the diving reflex partway through the BH, increasing the HR toward the end. There was no correlation (p=0.6007, p=0.1402 respectively) found between the pre-BH inspired volume and magni- tude of HR decrease or time-to-increase, in this experiment. This is important because a large filling of the lungs is expected to impair ve- nous return, lowering CO, but also increase in the chest cavity, potentially causing changes in HR. In these trials, no correlation between inhaled volume and change in HR provides support for the hypothesis that the decrease/increase in HR is due to the interplay between the diving reflex and sympathetic activation. The time until HR began increasing was found to be correlated with BH length (p = 0.0185).

Another indicator with a correlation in 4 out of the 6 BH trials (p = 0.000023-0.0089) to BH length was the subjectively noted time to the first breakpoint in the BH. However, using a subjective breakpoint as a predictor of final BH length is probably unwise, as in 25.5% of the total trials, this breakpoint was failed to be reported perhaps due to stress or distraction. Furthermore, at depth with the increased ambi- ent pressure, sensitivity to CO2 buildup is expected to change, causing this indicator to become unreliable in the field. 30 CHAPTER 4. DISCUSSION

4.5 Characterizing the training effect of re- peated BH

Various literature results have tried explaining the "training effect" of repeated BH, that is, that successive maximal BH become longer with repetition. Participants in this study reported feeling the BH became easier with time. With the significant effect that starting PACO2 had on BH time (p=0.0120), mostly seen from the hyperventilation trials, it was postulated that a slight unintentional hyperventilation was hap- pening in each participant as they prepared for a successive BH. In 83% of the participants, starting PACO2 decreased from the 1st to 4th BH (p=0.0019). Including the three participants with increasing PACO2 resulted in no signifiance (p = 0.2134). The literature has previously shown that the dependence of BH length on starting PACO2 values is nonlinear, with small changes in starting PACO2 having very little effect on BH length [20]. Therefore, any small changes observed on starting PACO2 in this experiment (0.172 ± 0.546kPa) should not be expected to affect BH length.

4.6 Machine learning with small, uncontrolled sample population

Both forms of supervised and unsupervised ML were used in this re- search. Traditionally, supervised ML is effective with large sample sizes with which to train on. However, in this research, with 10-fold cross validation used as the evaluation metric, SHLPs were quite ef- fective in predicting continuous outcomes on a relatively small sample size (n = 98 BH and 16 participants). A sigmoidal transfer function was used in the hidden and output layers, as it could not be assumed that the relationship between key variables and logistic coefficients was lin- ear, nor the relationship between survey responses and key variables. Cross validation errors of 12.28% on predicting key variables (n = 98 BH, step 2 in Figure 2.2) and 5.04% on predicting logistic coefficients (n = 60 BH, step 1 in Figure 2.2) is promising for continued use of these methods in future models. CHAPTER 4. DISCUSSION 31

Unsupervised ML proved very useful in this research to under- stand HD data without having to test for statistical significance on every possible linear combination of dimensions. While in this re- search, that may have been possible due to a relatively small num- ber of dimensions, the same brute technique would not hold up in larger scale studies. Furthermore, SOM allows one to easily visualize relationship of a specific variable to a cluster formed from HD data, which might be hard to understand otherwise. Use of k- means followed by histogram analysis with traditional statistical test- ing methods confirmed significance in distribution of key variables among survey-based clusters. This showed that the participants could be clustered into meaningful groups regarding key variables. In this research, SOM proved to be a useful tool as a substitute sensitivity analysis to remove unnecessary inputs.

4.7 Future work

The large errors in the freediver’s predictions motivate creation of a similar model trained on experienced freediver data, as the presented model failed to predict his ability to tolerate high PACO2. One pos- sible idea to make this model into a more accurate safety tool for any individual would be to use it as a starting point while continuously collecting more BH data from the same individual. Then this starting model could continue to be trained on data from one person, enabling it to recognize personal patterns more effectively than it currently can, having been trained on group averages. Another important aspect of the model that needs to be considered is what happens on descent and ascent with varying rates. For example, a slow descent coupled with a quick ascent would reduce O2 consumption and might therefore be safer than equal rates of descent and ascent.

Furthermore, it would be interesting if similar methods could be used to understand risk factors for swimming induced (SIPE), another affliction of swimmers associated with stren- uous activity in cold water, leading to liquid buildup in the lungs. At this point, predicting incidence of SIPE or not would require dif- ficult monitoring systems, but rather than predicting incidence, ma- chine learning methods could be used retroactively to understand in- 32 CHAPTER 4. DISCUSSION

fluence of certain variables on incidence of SIPE. If data could be gath- ered retroactively and a network trained and cross validated on this data, then closer investigation of this network might identify heavily influencing variables, and thus narrow down the field and direct fu- ture research efforts towards the cause-and-effect relationship of these specific variables to SIPE. Chapter 5

Conclusion

This study confirms the prediction that PAO2 and PACO2 during BH in humans can be modeled from starting conditions without requiring continuous measurements. Furthermore, significance was found cor- relating impermanent personal and environmental factors to the BH, which allows the predictive model to be used by anyone and individu- alized for them. Thresholds were outlined with respective margins of safety from this model’s predictions, which may be useful in planning safer dives. Additionally, it has been shown that various forms of ma- chine learning can be used on physiological data from a small sample group and trained with relatively high accuracy.

33 Bibliography

[1] M H Linér. “Cardiovascular and pulmonary responses to breath- hold diving in humans”. In: Acta physiologica Scandinavica. Sup- plementum 620 (Feb. 1994), pp. 1–32. [2] Terry Maas. “SHALLOW WATER BLACKOUT: THE PROBLEM AND A POTENTIAL ”. In: Undersea and Hyperbaric Medical Society/. 75-78. Durham, NC: Diver’s Alert Network, June 2006. [3] National Oceanic and Atmospheric Administration. “Physics of Diving”. In: NOAA Diving Manual. Best Publishing Company, 2001, Chapter 2. ISBN: 0-941332-70-5. [4] P Lindholm and CEG Lundgren. “Alveolar gas composition be- fore and after maximal breath-holds in competitive divers”. In: Undersea Hyperbaric 33.6 (Aug. 2006), pp. 463–467. [5] Ranjan K. Dash, Ben Korman, and James B. Bassingthwaighte. “Simple accurate mathematical models of blood HbO2 and HbCO2 dissociation curves at varied physiological conditions: evalua- tion and comparison with other models”. en. In: European Jour- nal of Applied Physiology 116.1 (Jan. 2016), pp. 97–113. ISSN: 1439- 6319, 1439-6327. DOI: 10.1007/s00421-015-3228-3. URL: https : / / link . springer . com / article / 10 . 1007 / s00421-015-3228-3 (visited on 01/22/2018). [6] A D Farmery and P G Roe. “A model to describe the rate of oxy- haemoglobin desaturation during apnoea”. In: British Journal of Anaesthesia 76.2 (Feb. 1996), pp. 284–291. ISSN: 0007-0912. DOI: 10.1093/bja/76.2.284. URL: https://www.sciencedirect. com/science/article/pii/S0007091217439055 (visited on 02/16/2018).

34 BIBLIOGRAPHY 35

[7] Rachel M Lance et al. “The Dewey Monitor: Pulse oximetry can independently detect hypoxia in a diver”. In: Under- sea and 44.6 (2017), pp. 569–580. [8] Benjamin Kuch et al. A novel wearable apnea for con- tinuous plethysmographic monitoring of oxygen saturation and heart rate. Technical Volume 40 No. 1. : Institute of Clinical Physi- ology, CNR, Pisa, Feb. 2010, pp. 34–40. URL: http://dspace. rubicon-foundation.org/xmlui/bitstream/handle/ 123456789/9877/DHM_V40N1_8.pdf?sequence=1. [9] John R. Fitz-Clarke. “Lung compression effects on gas exchange in human breath-hold diving”. In: Respiratory Physiology & Neu- robiology 165.2 (Feb. 2009), pp. 221–228. ISSN: 1569-9048. DOI: 10. 1016/j.resp.2008.12.006. URL: http://www.sciencedirect. com/science/article/pii/S1569904808003479 (visited on 01/22/2018). [10] John R. Fitz-Clarke. “Computer simulation of human breath- hold diving: cardiovascular adjustments”. en. In: European Jour- nal of Applied Physiology 100.2 (May 2007), pp. 207–224. ISSN: 1439- 6319, 1439-6327. DOI: 10.1007/s00421-007-0421-z. URL: https : / / link . springer . com / article / 10 . 1007 / s00421-007-0421-z (visited on 01/22/2018). [11] Peter Lindholm et al. “Effects of fasting and carbohydrate con- sumption on voluntary resting apnea duration”. eng. In: Euro- pean Journal of Applied Physiology 100.4 (2007), pp. 417–425. URL: http://urn.kb.se/resolve?urn=urn:nbn:se:kth: diva-45327 (visited on 01/22/2018). [12] Claus-Martin Muth et al. “Arterial Blood Gases During Diving in Elite Apnea Divers”. In: International journal of sports medicine 24 (Mar. 2003), pp. 104–7. DOI: 10.1055/s-2003-38401. [13] Johan Andersson et al. “Diving response and arterial oxygen sat- uration during apnea and exercise in breath-hold divers”. In: Journal of applied physiology (Bethesda, Md. : 1985) 93 (Sept. 2002), pp. 882–6. DOI: 10.1152/japplphysiol.00863.2001. [14] MH Liner, M Ferrigno, and CE Lundgren. “Alveolar gas exchange during simulated breath-hold diving to 20 m | MEDSpace”. In: Undersea and Hyperbaric Medicine 20.1 (1993), pp. 27–37. URL: https: //medspace.mc.duke.edu/alveolar-gas-exchange- 36 BIBLIOGRAPHY

during-simulated-breath-hold-diving-20-m (visited on 01/22/2018). [15] Toni Breskovic et al. “Cardiovascular changes during underwa- ter static and dynamic breath-hold dives in trained divers”. en. In: Journal of Applied Physiology (Sept. 2011). DOI: 10 . 1152 / japplphysiol.00209.2011. URL: http://www.physiology. org/doi/full/10.1152/japplphysiol.00209.2011 (visited on 01/25/2018). [16] M. H. Liner and D. Linnarsson. “Intrapulmonary distribution of alveolar gas exchange during breath-hold diving in humans”. In: Journal of Applied Physiology 78.2 (Feb. 1995), pp. 410–416. ISSN: 8750-7587. DOI: 10 . 1152 / jappl . 1995 . 78 . 2 . 410. URL: http : / / www . physiology . org / doi / abs / 10 . 1152 / jappl.1995.78.2.410 (visited on 01/22/2018). [17] John B West. “Respiratory Physiology - the essentials”. In: Respi- ratory Physiology - the essentials. Baltimore: The Williams & Wilkins Company, 1974, p. 166. [18] J. Stocks and P. H. Quanjer. “Reference values for residual vol- ume, functional residual capacity and total lung capacity. ATS Workshop on Lung Volume Measurements. Official Statement of The European Respiratory Society”. en. In: European Respiratory Journal 8.3 (Mar. 1995), pp. 492–506. ISSN: 0903-1936, 1399-3003. URL: http://erj.ersjournals.com/content/8/3/492 (visited on 05/08/2018). [19] Guillaume Costalat et al. “The oxygen-conserving potential of the diving response: A kinetic-based analysis”. eng. In: Journal of Sports Sciences 35.7 (Apr. 2017), pp. 678–687. ISSN: 1466-447X. DOI: 10.1080/02640414.2016.1183809. [20] H Rahn and T Yokoyama. Physiology of Breath-Hold Diving and the of Japan. Technical. US Office of Naval Research, 1965. (Visited on 05/20/2018). Appendix A

Background Information and Lit- erature Study

A.1 Gas exchange in the lungs

A.1.1 Pulmonary system basics The pulmonary system is responsible for transferring O2 from the air we breathe to our bloodstream to be used as fuel for metabolism, while transporting CO2, a metabolic waste product, from the bloodstream outside the body. Gas exchange happens in the alveoli, which are air filled sacs lined with . Alveoli fill with oxygen-rich air when the surrounding inter-costal muscles and diaphragm pull the chest cage open, allowing fresh air to enter. Each alveolus is surrounded by a network of capillaries that carry carbon dioxide rich blood from the right side of the heart. Due to the extremely large combined cross sectional area of these capillaries, blood flow here is very slow. This al- lows the body to exchange its CO2 for O2 through an endothelial layer, about one cell thick, by allowing the gases to diffuse down their con- centration gradients (Figure A.1). Not all alveoli need to be perfused all the time, which saves energy. O2-rich blood leaving the alveolar networks returns to the left side of the heart, where it is pumped to the systemic circulation.

During a BH, there are many different stimuli that cause the body to break the BH and breathe again. Most prominent of these stimuli is the effect of the increased PCO2 as a by-product of metabolism in

37 38 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

Figure A.1: Gas exchange in the alveolus [1] the blood and lungs. When the PCO2 rises to 60mmHg while other factors remain normal, it usually feels like it is time to breathe again and exhale [2]. Usually this occurs when the PO2 is around 30mmHg, a minimum necessary for proper brain function.

However, the aforementioned PCO2 threshold can vary if other variables also vary. For example, inflating the lungs to an absolute maximum prior to BH can increase the PCO2 threshold from 60mmHg to 76mmHg. On the other hand, a different example shows that if the PO2 were as low as 50mmHg to start the BH, a person would termi- nate their BH with a PCO2 of 50mmHg [2].

A.1.2 Oxygen in the body PAO2 is determined not only by the fraction of oxygen in the air we breathe, but also by how much oxygen can be carried away from the lungs by hemoglobin in the blood. Hemoglobin is a peptide with four subunits that each have an iron ion capable of being oxidized to carry an oxygen molecule. Each red blood cell has millions of hemoglobin proteins that can each carry 4 O2 molecules through the body. Hemoglobin can also bind to CO2 and carbon monoxide, and there are different physiological variables that influence its affinity for each of these molecules that will be discussed further in Appendix section 3.3. Some examples of things that influence hemoglobin’s affinity for O2 are the release of CO2 in the blood, the bicarbonate buffer system, acid/base regula- tion in the blood, relations of both O2 and CO2 within a hemoglobin unit, and temperature [3]. An alveolar PO2 of about 25mmHg usually causes loss of consciousness (LOC) with normocapnia, but in hypocap- APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 39

nic conditions, can occur at about 40mmHg [4].

A.1.3 Carbon dioxide in the body CO2 can be stored in the human body in more ways than O2 can. It can be dissolved in the blood, much like in an unopened can of soda. It can be stored in the bicarbonate buffering system, and it can also be bound to hemoglobin. In the bicarbonate buffer system, CO2 reacts with water in the blood to form carbonic acid, which can dissociate to form a bicarbonate ion and a hydrogen ion (Figure A.2). As a buffer, carbonic acid resists sudden changes in pH, which keeps the blood at a constant level of 7.4. This is how the majority of CO2 is stored in the blood, and these stores have a very large capacity.

Figure A.2: One example of CO2 storage in blood: the bicarbonate buffer system

Hyperventilation will result in removing a lot of CO2 from the body through the lungs, relatively lowering the arterial and alveolar PCO2, which can cause the blood to become alkaline. It also allows BH divers to hold their breath longer, since it takes longer for the PCO2 to build up to its breathing-threshold. However, hyperventilation does not reduce the rate of oxygen metabolism or relatively increase the PO2, which means that the longer BH will deplete PO2 to levels much lower than a non-hyperventilated BH would have done (Figure A.3).

A.2 Physical laws that govern physiological gas exchange

A.2.1 Hydrostatic pressure, Boyle’s Law, Charles’s Law There are well accepted laws of physics that help explain the behavior of gases with changing pressures. Hydrostatic pressure is the pres- sure that an unbroken column of fluid exerts on the surface at the bot- 40 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

Figure A.3: The effects of hyperventilation on lowering PCO2 before a BH [5] tom of the column, due to gravity. It increases with the density of the fluid and the height of the column. At sea level, humans experience a hydrostatic pressure of 1atm, or 760mmHg due to the air in the atmo- sphere (Figure A.4). Furthermore, under water, every 10m of sea water introduces another 1 atm of pressure on an object submerged there.

Figure A.4: Atmospheric pressure shown as the weight of a column of air [6]

The effect of these ambient pressure changes on the lungs can be described by Boyle’s Law and Charles’s Law. Boyle’s Law shows a nonlinear inverse relationship between pressure and the volume of a gas, while Charles’s Law shows a direct, linear proportional relation- ship between the volume of a gas and its temperature. Boyle’s Law APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 41

explains why the lungs shrink in volume when you dive and expe- rience a greater ambient pressure (Figure A.5). Given the change in volume, it follows that the partial pressures of gases inside the lungs increase with increasing depth. It is, however, an insufficient increase when it comes to deep human BH diving, as the theoretical expected increase in PACO2 is not observed. This is why it is important to con- sider factors like CO2 in the blood and changes with BH [7].

Figure A.5: Visualization of Boyle’s law

A.2.2 The diving reflex The diving reflex is a generally accepted phenomenon observed in both humans and other diving mammals. Upon submersion in wa- ter, certain oxygen conserving physiological changes occur [8]. The heart rate slows (bradycardia), the peripheral vessels constrict, diges- tion halts, and overall metabolism slows. BH is also a stimulus for the diving reflex, regardless of submersion status. However, the response is much greater with submersion, and especially in cold water. Stud- ies have found that cold water facial immersion augmented the BH induced bradycardia from a 21% decrease to a 33% decrease, with a corresponding augmented increase in blood pressure from 34% to 42% [8]. The same study showed that during a BH in air, the arterial oxy- gen saturation decreased by 6.8%, whereas with facial submersion, it only decreased by 5.2%, indeed demonstrating an oxygen conserving effect of the diving reflex. When divers go deep enough, bradycardia 42 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

also has an effect on overall CO, decreasing the flow to a minimum of around 3L/min [9].

A.2.3 The Haldane and Bohr effects The Haldane and Bohr effects describe the response of hemoglobin to various gas conditions. When there is lots of O2 in the blood, such as in , hemoglobin proteins release hydrogen ions into the blood, decreasing its own affinity for CO2. This allows hemoglobin to unbind CO2 more easily, resulting in its expulsion from the body through the lungs [3]. This is known as the Haldane effect. The Bohr effect describes an opposite pattern, namely when blood PCO2 levels rise. An increase in PCO2 in the blood causes hemoglobin’s affinity for O2 to decrease, allowing for unloading of O2 to the sur- rounding tissues [3]. See Figure A.6 for a visualization of these effects on the dissociation curve of O2.

Figure A.6: Hemoglobin affinity for O2: O2 dissociation curve with shifts [10] APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 43

A.3 Breath-hold influence on gas-exchange in the literature

A.3.1 Mechanical changes

Perfusion At the surface, before a BH, inhaling the lungs to a large volume in- creases intrapulmonary pressure, which in turn decreases venous re- turn and therefore the cardiac index [11]. However, the added ambient pressure of depth during an underwater dive can also counteract this pressure gradient, leaving cardiac performance largely unchanged at 20m [11].

Ventilation During a dive, the effect of increasing compression on the lung de- creases the surface area of the alveoli available for gas exchange. Past a certain depth (critical level of compression), the lungs will fully col- lapse and prevent any further gas exchange [9]. At this depth, the arterial and venous PO2 levels are the same.

A.3.2 Hemodynamic changes Since BH is a stimulus for the diving reflex, a BH condition in the body will cause peripheral and an increased blood pres- sure. This is true for both a static and dynamic (SA and DA). Mean arterial pressure (MAP) has been found to increase throughout the entire duration of apnea, peaking at the termination of the BH [12]. The same researchers found that the rate of increase in MAP was greater during DA than SA, but the final MAP was lower. Recovery proceeded faster in the SA group (4 minutes compared to 10), demon- strating a different recovery, perhaps influenced by the higher levels of lactic acid and a faster oxygen desaturation. Heart rate was shown to be decreasing in all three groups at the end of apnea, but it is impor- tant to remember that all participants were trained divers.

Submersion alone increases , due to the shift of blood from the legs to the chest that results from the changing ambient pres- sure force from mainly gravity to hydrostatic (Figure A.7). This helps 44 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

Figure A.7: Submersion induced blood shift to chest to evenly distribute PCO2 within the lung, which suggests some sort of mechanical coupling between the lungs and heart responsible for mixing the gases in the lungs. [13]. This increase in cardiac output can cause an extra liter of blood to pass through the pulmonary circula- tion, resulting in around a 50mL increase in O2 uptake [11]. Coupled with the compression of the lung on a dive, this increase in pulmonary perfusion has an even greater impact, due to the relative increase in perfusion due to the shrinking size of the lung [2].

A.3.3 Physiological changes

At surface When is blocked, CO2 tension rises in the body. However, the flow of CO2 from the blood to the lungs, VCO2, actually decreases with time during a surface BH, reaching almost 0. This is due to the falling level of O2 over time, which induces the Haldane effect. If dur- ing a dive, the higher PCO2 in the lungs due to their compression [11] also decreases VCO2. After about 30s of BH, pulmonary exchange of CO2 becomes almost negligible [13].

The effect of diet has also been investigated with respect to BH. It is known that using a based fuel source generates less CO2 per O2 metabolized than would using a carbohydrate based fuel source (Figure A.8). This can be characterized by a respiratory exchange ratio APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 45

(RER) less than 0.8. It has been shown that prior exercise can deplete carbohydrate stores, reducing the sequential RER of that participant [14]. These authors have shown that the effect of this RER shift on BH has shown to cause a participant to feel the urge to breathe at a lower PO2. The time spent in apnea for both the control and lipid metabolism groups was about the same, but the PO2 levels at break- point were lower, showing that lipid metabolism actually metabolized O2 faster [14]. The same authors later hypothesized and showed that if the carbohydrate stores could be replenished post exercise and prior to BH, then it would be possible to shorten the time of the BH and fin- ish with higher, safer PO2 [4]. Fasting itself decreases the rate of O2 consumption and even more decreases the rate of CO2 production [4], so it can prolong a BH time. However, perhaps then it also increases your risk of experiencing hypoxia, or hypoxia of ascent.

Figure A.8: Effect of diet composition on respiratory exchange ratio

During dive It is known that PO2 is lower after surfacing from a dive than a BH of the same length on the surface [11] [13], despite the fact that O2 metabolism decreases with depth [9]. The authors of [9] looked into the alveolar flux of O2 for a dive. They found that during descent, O2 flux from the lungs increases slightly and then switches from be- ing perfusion-dependent to -dependent (on surface area of alveoli), though this mainly occurs right before total lung collapse. At depth, the O2 flux remains mostly constant, with the increased am- bient pressure keeping the blood fully saturated. However, during ascent, alveolar PO2 decreases rapidly due to the decreasing ambient pressure, which in turn decreases the O2 flux from the lungs to the blood. Reduced pulmonary circulation further decreases this O2 flux [11].

CO2 on the other hand, is interesting in different ways. Although 46 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

at surface, CO2 is usually transfered from the blood to the lungs for expulsion, adding ambient pressure by going deep can cause the flux of CO2 to reverse, flowing into the blood from the lungs [4][9][11]. Usually during ascent, this trend reverses itself and CO2 is pushed back into the lungs, but would still finish with a lower PCO2 than had he/she stayed at the surface throughout the BH [11]. In other words, during a BH dive, the amount of CO2 in the lungs increases less than during a surface BH. One explanation for this is that the blood has an extraordinary large CO2 capacity via multiple buffering systems or dissolution of CO2 in plasma [7]. This is one of many adaptations that allow humans to perform extremely long and deep dives on a single breathe without major increases in their respiratory drive. It is inter- esting that the CO2 tolerance of a person can be trained, as with ex- perienced BH divers. Experienced free divers can push through the discomfort of CO2 buildup, able to resist twice the burden that non- experienced divers can [4]. These divers rely on their hypoxic drive as their respiratory drive, whereas the general population relies on per- ception of hypercapnia.

A.4 Modeling gas exchange

A.4.1 Artificial neural networks Artificial neural networks are useful tools for capturing patterns in ei- ther HD data or big data that are otherwise unable to be or very dif- ficult to understand with conventional methods. These networks are first trained on known input-output pairs and optimized by minimiz- ing an overall error. Transfer functions are used to transform the input through hidden layers into various representations of the output. Sig- moidal transfer functions can be used on normalized data in order to predict continuous outputs. Upon reaching the output after the final transformation, an error is calculated. The direction and magnitude of this error propagated backwards through the network via gradient de- scent, and is used with the delta rule to update the respective that transformed the input in each layer [15] (Figure A.9). This is re- peated for a certain number of epochs to minimize the validation error. Validation error is different from training error in that it is calculated on a previously unseen, yet known input-output pair. It is used in place of training error only in order to prevent overfitting of the model. APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 47

K-folds cross validation is a method of splitting the training data into k-subsets in order to train on k-1 subsets, and test for an overall er- ror in the kth subset. This is repeated so that each input is used as a validation dataset only once, and the errors from all k-iterations are averaged for an estimate of network error [16].

Figure A.9: Sample fully connected neural network with one hid- den layer. This figure demonstrates how weights are used to trans- form inputs to a new form, which are then thresholded via a sig- moidal function (a). In the case of this research, the hidden layer had 5 nodes. This figure is from [17] and may be shared under the following license: https://creativecommons.org/licenses/by/2.0/ No changes were made to this figure here.

A.4.2 Relevant clustering techniques In an effort to characterize certain trends in BH in humans, many inter- individual factors are collected in this study that might be linked to differences in max BH time, subjective breakpoints, final saturation levels after BH, or end tidal alveolar pressures, for example. Due to the complexity of interaction between the multiple variables that influ- ence metabolism and BH experiences, an exact numerical model that accounts for all of these differences will be difficult to create. For this reason, various forms of unsupervised machine learning will be used in this study to learn about the data before trying to characterize it numerically. In order to understand how the inter-individual factors relate to the data, the sample population must be grouped, or clus- tered, based on its similarities and/or variances. To the best of 48 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

knowledge of this research, this type of analysis of individual factors has not yet been applied to BH in humans.

Clustering with small sample sizes With a small sample size, the issue of variance singularity becomes a problem. If the variance is singular and the covariance matrix becomes singular, then variance in the data cannot be used to explain the distri- bution and effectively separate the data via its distributions any longer [18].

Instead, options of what can be done include using the centroid or normal distance between data points, such as in K-means. Or, self organizing maps can be used on smaller subsets of descriptive factors coupled with histogram analysis of how these groups distribute key variables. Both of these methods will be used on the high dimensional (HD) input space in this study.

K-means clustering K-means clustering separates input feature vectors from each other based on the euclidean distance that separates them. Inputs are as- signed to the cluster to which they are closest based on their centroid, or averaging the distance between multiple samples. With the set of inter-individual factors collected in this study, it is not yet known whether it is relevant for the feature vectors to exist in a euclidean space or if some features should have more weight than others. For this reason, additional clustering methods will be evaluated in addi- tion to k-means.

Self Organizing Maps (SOM) Another valuable method of visualizing HD data is by using SOM. SOM is often used in fields of data compression and pattern recog- nition where the human eye is incapable of otherwise observing any patterns [19]. Each feature in the HD input layer is connected to all the nodes in the 2D output, or visualization layer. Similar patterns become mapped to nearby or the same output neuron [20] via a similarity com- parison, such as euclidean distance, to a weight vector associated with APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 49

each output neuron. SOM can be implemented either supervised with a training data set or unsupervised, to observe similarities in HD data.

A.4.3 Existing physiological models A desire to understand the different systems that are responsible for all the aforementioned physiological changes during BH is one of the motivations for trying to create descriptive mathematically models. Another motivation is the desire to make predictions, with which we could develop safer protocols and more tools to allow people to en- gage in BH diving or swimming in safer ways. Table A.1, below, com- pares the purpose and outcomes of a few of the most recent and rele- vant models published in the literature on the subject.

Table A.1: Overview of models in the literature to be discussed in this section.

Year ReferenceModel Outcome Purpose Degree of Complexity 2016 [3] O2/CO2 dissocia- Calculate partial medium high tion curves pressures from saturation 1996 [21] SaO2 vs time in BH Predict rate of high medium low dissociation during BH 2017 [22] SpO2 vs time in BH Alarm when sat- low medium uration drops too low 2010 [23] SpO2 vs time in BH Alarm when sat- low low uration drops too low 2009 [9] Lung compression Predict max depth medium low vs time, depth for extreme free- dives 2007 [24] Blood pressures Characterize var- high medium during BH ious vascular high stresses N/A [2] PAO2/PACO2 vs Include ascent and low unknown time course for BH descent relation- dive ships

One of the most recent of these models that has been developed relates hemoglobin saturation to alveolar partial pressures in new dis- sociation curves [3]. This is a useful tool because it allows for the con- 50 APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY

version of simple, non-invasive SpO2 measurements into almost con- tinuous measures of internal gas partial pressures. In 1996, separate re- searchers have even developed a model for the rate of oxyhemoglobin desaturation during BH [21], which brings a new question, does de- saturation during BH correspond closely enough to alveolar partial pressures to be able to predict a loss of consciousness (LOC) thresh- old? Furthermore, is it even feasible that a drop in saturation provides enough warning time for a diver to safely return to surface? In 2017, researchers at Duke University attempted to answer this very question by proposing the Dewey Monitor [22]. The one significant drawback to this study is that to calculate warning time, the alarm was set to warn a diver when their SpO2 dropped to 80%. However, it is known that LOC does not occur until the saturation drops much further, leav- ing the warning system susceptible to the problem that all medical alarm based devices suffer from - the trade off between too many false alarms and yet being sensitive enough to not miss an adverse event. Given that medical alarms have continuously been ranked as the top in health-care technology in the last 4 years [25], this is no easy task.

Furthermore, this is a method which cannot yet be used at depth because even with the metabolic decrease in O2 throughout the BH, ambient pressure keeps hemoglobin fully saturated throughout most of the dive [23]. That reason, and the added issues of accurately record- ing plethysmography with peripheral vasoconstriction, encountered by the researchers in both [22] [23], make saturation a measurement difficult to use in BH diving.

The authors of [9] have developed a model to predict the depth at which lung collapse will occur, building on an old iteration of their model and updating it with the small changes in lung volume that oc- cur due to metabolism alone. However, this phenomenon only occurs at extreme depths, and the scope of this research is focused on a gen- eral, untrained, BH diving or swimming population.

The same group of researchers on another occasion have attempted to characterize vascular stresses in humans during deep dives [24]. While they found that these pressures can exceed 50mmHg in the sys- temic circulation, a known damage-causing limit in animals, the dive APPENDIX A. BACKGROUND INFORMATION AND LITERATURE STUDY 51

didn’t seem to affect pulmonary pressures to the same extent. One of the drawbacks to this model is that it is very complex, and requires knowledge of many different internal, individual variables in order to calculate peripheral vascular pressures. Furthermore, the aspect of the model that pertains to pulmonary system pressures only considers the total gas pressure in the alveoli, without specifying the different rates of exchange of each O2 and CO2 throughout the BH.

There exists a gap in the literature for a simple and general model for understanding the changes in alveolar partial pressures over time during a BH. One researcher, Arthur DuBois, at the University of Penn- sylvania attempted to create this model, including aspects for mod- eling partial pressures during descent and ascent of a dive [2]. The weaknesses of this model are in its assumptions of standard values for key variables and furthermore, the author chose a solution where the effect of in decreasing PCO2 on ascent is offset by the effect of blood flow raising it, which might not always be the case. For the duration of the bottom time of the dive, the DuBois model uses the Fick principle and the relationship between amount of a gas to its and volume to calculate PO2. Appendix B

Final model inputs, outputs, and respective code

Input to the model is a 9x1 column vector containing barometric pres- sure in hPa, age (years), height (cm), weight (kg), resting-HR (bpm), smoker status (0-no, 1-yes), freediver status (0-no, 1-yes), scuba ex- perience (0-no, 1-yes), and weekly frequency of engaging in physical exercise on a scale from 0 (none) to 4 (5+ days per week). The model then calculates an intermediary output of theoretical volume of last inhalation, breath-to-breath RER, and time to subjective breakpoint. These values are automatically used in the GLM and neural network to generate the NLM for PAO2 and PACO2 over time. In addition to the personal vector of inputs, the user must also input a rate of de- scent/ascent of the dive in meters/second, maximum depth (can be 0 for surface BH) in meters, and a total bottom time in seconds. The model will output a vector of PAO2 and PACO2 values every 0.2 sec- onds over the course of the input dive profile. All of the MATLAB code used to process, analyze, and generate the model used in this study can be found at https://github.com/dianasvea92/KTH_masters_thesis.

52 Appendix C

Additional figures

Results from SOM clustering of BH data and color-coded influence of survey responses can be seen in Figures C.1 and C.2b below.

53 54 APPENDIX C. ADDITIONAL FIGURES

(a) Barometric pressures (b) Ages (c) Heights

(d) Smoker status (e) Freediving experience (f) Scuba experience

(i) Frequency of physical (g) Weights (h) Resting HRs exercise

Figure C.1: Survey responses that showed some degree of clustering around the BH data - these variables were used in the model. Baro- metric pressures: Black, red, green as noticeable clusters representing <1000, 1020-1030, 1030-1040 hectopascals. Age: Blue and cyan repre- senting 25-29, 30-39 years. Heights: Green, magenta, red represent- ing 180-189, 160-169, 170-179cm groups. For smoker and freediving and scuba clusters, black and blue represent no and yes, respectively. Weights: magenta representing 80-89kg. Resting HRs: magenta and red representing 70-79, 80-89bpm groups. Frequency of exercise: Red, cyan, black representing >6x, 3-4x per week, and 0 times per week. APPENDIX C. ADDITIONAL FIGURES 55

(a) Consumed anything (b) Composition of what in recent 2 hours was consumed

Figure C.2: Examples of survey responses that did not show visual clustering around BH data. In these figures, black represents noth- ing consumed. There is no clear grouping of the composition of recent diet, with magenta representing a 60/30 split of carbs/, cyan rep- resenting a 30/60 split, and red representing 100% carbohydrates. 56 APPENDIX C. ADDITIONAL FIGURES

References

[1] Lumen Learning. Gas Exchange across Respiratory Surfaces | Bound- less Biology. URL: https://courses.lumenlearning.com/ boundless-biology/chapter/gas-exchange-across- respiratory-surfaces/ (visited on 03/08/2018). [2] Arthur B Dubois. “Breath Holding”. In: Graduate School of Medicine, University of Pennsylvania, pp. 90–100. [3] Ranjan K. Dash, Ben Korman, and James B. Bassingthwaighte. “Simple accurate mathematical models of blood HbO2 and HbCO2 dissociation curves at varied physiological conditions: evalua- tion and comparison with other models”. en. In: European Jour- nal of Applied Physiology 116.1 (Jan. 2016), pp. 97–113. ISSN: 1439- 6319, 1439-6327. DOI: 10.1007/s00421-015-3228-3. URL: https : / / link . springer . com / article / 10 . 1007 / s00421-015-3228-3 (visited on 01/22/2018). [4] Peter Lindholm et al. “Effects of fasting and carbohydrate con- sumption on voluntary resting apnea duration”. eng. In: Euro- pean Journal of Applied Physiology 100.4 (2007), pp. 417–425. URL: http://urn.kb.se/resolve?urn=urn:nbn:se:kth: diva-45327 (visited on 01/22/2018). [5] Wikipedia. Freediving blackout. en. Page Version ID: 821281616. Jan. 2018. URL: https://en.wikipedia.org/w/index. php?title=Freediving_blackout&oldid=821281616 (visited on 02/21/2018). [6] ChemBATZ. 13 states of matter. Aug. 2018. URL: http://chemistry- batz.wikispaces.com/13+states+of+matter (visited on 03/08/2018). [7] Claus-Martin Muth et al. “Arterial Blood Gases During Diving in Elite Apnea Divers”. In: International journal of sports medicine 24 (Mar. 2003), pp. 104–7. DOI: 10.1055/s-2003-38401. [8] Johan Andersson et al. “Diving response and arterial oxygen sat- uration during apnea and exercise in breath-hold divers”. In: Journal of applied physiology (Bethesda, Md. : 1985) 93 (Sept. 2002), pp. 882–6. DOI: 10.1152/japplphysiol.00863.2001. APPENDIX C. ADDITIONAL FIGURES 57

[9] John R. Fitz-Clarke. “Lung compression effects on gas exchange in human breath-hold diving”. In: Respiratory Physiology & Neu- robiology 165.2 (Feb. 2009), pp. 221–228. ISSN: 1569-9048. DOI: 10. 1016/j.resp.2008.12.006. URL: http://www.sciencedirect. com/science/article/pii/S1569904808003479 (visited on 01/22/2018). [10] Anesthesia UK and Chris Nickson. Oxygen Dissociation Curve. Sept. 2005. URL: http://www.frca.co.uk/article.aspx? articleid=100345 (visited on 02/21/2018). [11] MH Liner, M Ferrigno, and CE Lundgren. “Alveolar gas exchange during simulated breath-hold diving to 20 m | MEDSpace”. In: Undersea and Hyperbaric Medicine 20.1 (1993), pp. 27–37. URL: https: //medspace.mc.duke.edu/alveolar-gas-exchange- during-simulated-breath-hold-diving-20-m (visited on 01/22/2018). [12] Toni Breskovic et al. “Cardiovascular changes during underwa- ter static and dynamic breath-hold dives in trained divers”. en. In: Journal of Applied Physiology (Sept. 2011). DOI: 10 . 1152 / japplphysiol.00209.2011. URL: http://www.physiology. org/doi/full/10.1152/japplphysiol.00209.2011 (visited on 01/25/2018). [13] M. H. Liner and D. Linnarsson. “Intrapulmonary distribution of alveolar gas exchange during breath-hold diving in humans”. In: Journal of Applied Physiology 78.2 (Feb. 1995), pp. 410–416. ISSN: 8750-7587. DOI: 10 . 1152 / jappl . 1995 . 78 . 2 . 410. URL: http : / / www . physiology . org / doi / abs / 10 . 1152 / jappl.1995.78.2.410 (visited on 01/22/2018). [14] Peter Lindholm and Mikael Gennser. “Aggravated hypoxia dur- ing breath-holds after prolonged exercise”. en. In: European Jour- nal of Applied Physiology 93.5-6 (Mar. 2005), pp. 701–707. ISSN: 1439-6319, 1439-6327. DOI: 10.1007/s00421-004-1242-y. URL: https://link.springer.com/article/10.1007/ s00421-004-1242-y (visited on 01/22/2018). [15] Pawel Herman. Feed forward single layer networks. University lec- ture. Stockholm, Sweden, Feb. 2017. [16] Pawel Herman. Regularisation and Bayesian techniques for learning from data. University lecture. Stockholm, Sweden, Mar. 2017. 58 APPENDIX C. ADDITIONAL FIGURES

[17] Farid E Ahmed. “Artificial neural networks for diagnosis and survival prediction in colon cancer”. In: Molecular Cancer 4 (Aug. 2005), p. 29. ISSN: 1476-4598. DOI: 10.1186/1476-4598-4-29. URL: https://www.ncbi.nlm.nih.gov/pmc/articles/ PMC1208946/ (visited on 05/21/2018). [18] Alok Sharma, Piotr J. Kamola, and Tatsuhiko Tsunoda. “2D–EM clustering approach for high-dimensional data through folding feature vectors”. In: BMC Bioinformatics 18.16 (Dec. 2017), p. 547. ISSN: 1471-2105. DOI: 10.1186/s12859-017-1970-8. URL: https://doi.org/10.1186/s12859-017-1970-8 (vis- ited on 02/22/2018). [19] LAHEEB M. IBRAHIM, DUJAN T. BASHEER, and MAHMOD S. MAHMOD. “A comparison study for intrusion database (KDD99, NSL-KDD) based on self organization map (SOM) artificial neu- ral network”. In: Journal of Engineering Science and Technology 8 (Feb. 2013), pp. 107–119. [20] XiaoJuan Wu and Hongtan Liu. “Fault Diagnosis of Solid Oxide Fuel Cell Based on a Supervised Self-Organization Map Model”. In: Journal of Fuel Cell Science and Technology 12.3 (June 2015), p. 031001. ISSN: 1550-624X. DOI: 10.1115/1.4029070. URL: http : / / electrochemical . asmedigitalcollection . asme.org/article.aspx?articleid=1936143 (visited on 01/26/2018). [21] A D Farmery and P G Roe. “A model to describe the rate of oxy- haemoglobin desaturation during apnoea”. In: British Journal of Anaesthesia 76.2 (Feb. 1996), pp. 284–291. ISSN: 0007-0912. DOI: 10.1093/bja/76.2.284. URL: https://www.sciencedirect. com/science/article/pii/S0007091217439055 (visited on 02/16/2018). [22] Rachel M Lance et al. “The Dewey Monitor: Pulse oximetry can independently detect hypoxia in a rebreather diver”. In: Under- sea and Hyperbaric Medicine 44.6 (2017), pp. 569–580. [23] Benjamin Kuch et al. A novel wearable apnea dive computer for con- tinuous plethysmographic monitoring of oxygen saturation and heart rate. Technical Volume 40 No. 1. Italy: Institute of Clinical Physi- ology, CNR, Pisa, Feb. 2010, pp. 34–40. URL: http://dspace. APPENDIX C. ADDITIONAL FIGURES 59

rubicon-foundation.org/xmlui/bitstream/handle/ 123456789/9877/DHM_V40N1_8.pdf?sequence=1. [24] John R. Fitz-Clarke. “Computer simulation of human breath- hold diving: cardiovascular adjustments”. en. In: European Jour- nal of Applied Physiology 100.2 (May 2007), pp. 207–224. ISSN: 1439- 6319, 1439-6327. DOI: 10.1007/s00421-007-0421-z. URL: https : / / link . springer . com / article / 10 . 1007 / s00421-007-0421-z (visited on 01/22/2018). [25] “ECRI Institute Announces Top 10 Health Technology for 2015”. en-US. In: ECRI Institute (Nov. 2014). URL: https : / / www . ecri . org / Press / Pages / ECRI - Institute - Announces - Top - 10 - Health - Technology - Hazards - for-2015.aspx (visited on 02/16/2018).

TRITA TRITA-CBH-GRU-2018:58

www.kth.se