From: W. Trevor King Date: Tue, 15 Mar 2011 18:11:39 +0000 (-0400) Subject: Add pulse oxymetry post and updated master Makefile for SCons builds. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=37284d95779aa440ca7c6da4a7a9ca38a73a5c75;p=blog.git Add pulse oxymetry post and updated master Makefile for SCons builds. --- diff --git a/.gitignore b/.gitignore index 365fa1e..ca58c1e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,17 +3,28 @@ /recentchanges # built by Makefiles inside posts/ -posts/Abax/*.pdf -posts/Abax/*/main.aux -posts/Abax/*/main.log -posts/Abax/*/main.out -posts/Abax/*/main.pdf -posts/Abax/*/main.toc -posts/drexel-thesis/*.pdf -posts/drexel-thesis/drexel-thesis/ +/posts/Abax/*.pdf +/posts/Abax/*/main.aux +/posts/Abax/*/main.log +/posts/Abax/*/main.out +/posts/Abax/*/main.pdf +/posts/Abax/*/main.toc +/posts/drexel-thesis/*.pdf +/posts/drexel-thesis/drexel-thesis/ /posts/Hooke/README.rst /posts/Hooke/hooke /posts/Hooke/html +/posts/Pulse_oxymetry/.sconsign.dblite +/posts/Pulse_oxymetry/fig/SfO2vR-theory.png +/posts/Pulse_oxymetry/main.aux +/posts/Pulse_oxymetry/main.bbl +/posts/Pulse_oxymetry/main.blg +/posts/Pulse_oxymetry/main.fls +/posts/Pulse_oxymetry/main.i* +/posts/Pulse_oxymetry/main.log +/posts/Pulse_oxymetry/main.n* +/posts/Pulse_oxymetry/main.out +/posts/Pulse_oxymetry/main.pdf /posts/problempack/problempack/ /posts/problempack/probs.pdf /posts/problempack/sols.pdf @@ -21,8 +32,8 @@ posts/drexel-thesis/drexel-thesis/ /posts/sawsim/README.rst /posts/sawsim/sawsim.pdf /posts/sawsim/sawsim/ -posts/Thesis/thesis/ -posts/Thesis/draft.pdf +/posts/Thesis/thesis/ +/posts/Thesis/draft.pdf /posts/XSLT/chapter/chapter.html /posts/XSLT/code/index.shtml /posts/Xmodmap/_Xmodmap diff --git a/Makefile b/Makefile index 6141a51..3acb440 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,23 @@ SUBDIRS = posts/Abax posts/drexel-thesis posts/Hooke posts/problempack \ posts/XSLT/chapter posts/XSLT/code TARGETS = all clean -all : +SCONS_SUBDIRS = posts/Pulse_oxymetry -$(TARGETS) : + +all : make-all scons-all +clean : make-clean scons-clean + +$(TARGETS:%=make-%) : @for i in $(SUBDIRS); do \ - echo "make $@ in $$i..."; \ - (cd $$i; $(MAKE) $(MFLAGS) $@); done + echo "make ${@:make-%=%} in $$i..."; \ + (cd $$i; $(MAKE) $(MFLAGS) ${@:make-%=%}); done + +scons-all : + @for i in $(SCONS_SUBDIRS); do \ + echo "scons in $$i..."; \ + (cd $$i; scons); done + +scons-clean : + @for i in $(SCONS_SUBDIRS); do \ + echo "scons -c in $$i..."; \ + (cd $$i; scons -c); done diff --git a/posts/Pulse_oxymetry.mdwn b/posts/Pulse_oxymetry.mdwn new file mode 100644 index 0000000..67dcc6b --- /dev/null +++ b/posts/Pulse_oxymetry.mdwn @@ -0,0 +1,18 @@ +My wife was recently reviewing some [pulse oxymeter][pox] notes while +working a round of anesthesia. It took us a while to trace the logic +through all the symbol changes and notation shifts, and my wife's +math-discomfort and my bio-discomfort made us more cautios than it +turns out we needed to be. There are a number of nice [review +articles][art] out there that I turned up while looking for explicit +derivations, but by the time I'd found them, my working notes had +gotten fairly well polished themselves. So here's +[[my_contribution|pdf]] to the pulse-ox noise ;). Highlights include: + +* Short and sweet (with pictures) +* Symbols table +* Baby steps during math manipulation + +[pox]: http://en.wikipedia.org/wiki/Pulse_oximeter +[art]: http://journals.lww.com/anesthesiology/Citation/1989/01000/Pulse_Oximetry.19.aspx + +[[!tag tags/theory]] diff --git a/posts/Pulse_oxymetry/SConstruct b/posts/Pulse_oxymetry/SConstruct new file mode 100644 index 0000000..306becd --- /dev/null +++ b/posts/Pulse_oxymetry/SConstruct @@ -0,0 +1,11 @@ +import os + +env = Environment(ENV=os.environ) + +main = env.PDF('main.tex') +SfO2vR_theory = env.Command( + 'fig/SfO2vR-theory.png', 'fig/SfO2vR-theory.py', 'python $SOURCE') +env.Depends(main, SfO2vR_theory) + +view = env.Alias('view', [main], 'xpdf -z page $SOURCE') +env.AlwaysBuild(view) diff --git a/posts/Pulse_oxymetry/fig/SPO2vR.png b/posts/Pulse_oxymetry/fig/SPO2vR.png new file mode 100644 index 0000000..b2a0c3c Binary files /dev/null and b/posts/Pulse_oxymetry/fig/SPO2vR.png differ diff --git a/posts/Pulse_oxymetry/fig/SfO2vR-theory.py b/posts/Pulse_oxymetry/fig/SfO2vR-theory.py new file mode 100755 index 0000000..cdcdde5 --- /dev/null +++ b/posts/Pulse_oxymetry/fig/SfO2vR-theory.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +import matplotlib +matplotlib.use('Agg') +from pylab import * + +# 1 = HbO2 +# 2 = HHb +# a = 660 nm +# b = 940 nm + +#author = 'Mendelson' +author = 'King' + +if author == 'Mendelson': + e1a = 0.12 + e2a = 0.86 + e1b = 0.29 + e2b = 0.20 +else: + e1a = 0.10 + e2a = 0.83 + e1b = 0.29 + e2b = 0.17 + +if author == 'Mendelson': + def SfO2(R): + return (-e2a+e2b*R)/(e1a-e2a + (e2b-e1b)*R) +else: + def SfO2(R): + return 1./(1 + (R*e1b-e1a)/(e2a-R*e2b)) + +R = linspace(0.4, 4, 100) +figure(figsize=(4,4)) +plot(R, SfO2(R), 'k.') +title('Theory') +xlabel('R') +ylabel('SfO2') + +target = __file__[:-2] + 'png' +print target +savefig(target, dpi=300) diff --git a/posts/Pulse_oxymetry/fig/absorbtion.png b/posts/Pulse_oxymetry/fig/absorbtion.png new file mode 100644 index 0000000..cca6e77 Binary files /dev/null and b/posts/Pulse_oxymetry/fig/absorbtion.png differ diff --git a/posts/Pulse_oxymetry/fig/ac-dc.png b/posts/Pulse_oxymetry/fig/ac-dc.png new file mode 100644 index 0000000..3f28f52 Binary files /dev/null and b/posts/Pulse_oxymetry/fig/ac-dc.png differ diff --git a/posts/Pulse_oxymetry/main.bib b/posts/Pulse_oxymetry/main.bib new file mode 100644 index 0000000..3ab909e --- /dev/null +++ b/posts/Pulse_oxymetry/main.bib @@ -0,0 +1,25 @@ +@article { tremper1989, + author = "Tremper, Kevin K. and Barker, Steven J.", + title = "Pulse Oximetry", + year = 1989, + month = jan, + journal = "Anesthesiology", + issn = "0003-3022", + volume = 70, + number = 1, + pages = "98--108", + url = "http://journals.lww.com/anesthesiology/Citation/1989/01000/Pulse_Oximetry.19.aspx", +} + +@article { mendelson1989, + author = "Mendelson, Yitzhak and Kent, Joel C.", + title = "Variations in Optical Absorbtion Spectra of Aduly and Fetal Hemoglobins and ITs Effect on Pulse Oximetry", + year = 1989, + month = aug, + journal = "IEE Transactions on Biomedical Engineering", + issn = "0018-9294", + volume = 36, + number = 8, + pages = "844--848", + url = "http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=30810", +} diff --git a/posts/Pulse_oxymetry/main.tex b/posts/Pulse_oxymetry/main.tex new file mode 100644 index 0000000..8a4a7b7 --- /dev/null +++ b/posts/Pulse_oxymetry/main.tex @@ -0,0 +1,499 @@ +\documentclass{article} + +\usepackage{amsmath} % align and other math niceties +\usepackage{makeidx} % indexing +\makeindex % we don't actually use indexing, but having this here + % triggers Scons' call to makeindex +\usepackage[intoc]{nomencl} % nomenclature/symbol/abbreviation indexing +\makenomenclature + +\usepackage[super,sort&compress,comma]{natbib} % fancy citation extensions +% super selects citations in superscript mode +% sort&compress automatically sorts and compresses compound citations +% (\citep{a,b,...}) +% comma seperates multiple citations with commas rather than the +% default semicolons. +\bibliographystyle{unsrtnat} % number citations in the order referenced + +\usepackage{subfig} % compound figures +\usepackage{graphicx} % include graphics + +\usepackage[final]{hyperref} % hyper-links +\hypersetup{colorlinks} +\hypersetup{pdfauthor={W. Trevor King}} +\hypersetup{pdftitle={Pulse Oximetry}} +\hypersetup{pdfsubject={Pulse Oximetry}} +\title{Pulse Oximetry} +\date{\today} +\author{W. Trevor King} + +% parenthesis, for example (some stuff] would be \p({some stuff}] +\newcommand{\p}[3]{\left#1 #2 \right#3} +% concentration shortcut +\newcommand{\C}[1]{\ensuremath{\p[{#1}]}} +% the proper d to be used in derivatives and integrals +\newcommand{\dd}{\ensuremath{\mathrm d}} +% derivative of #2 with respect to #1 +\newcommand{\deriv}[2]{\ensuremath{\frac{\dd{#2}}{\dd{#1}}}} +% average of #1 +\newcommand{\avg}[1]{\ensuremath{\left\langle {#1} \right\rangle}} % average +% units without preceding value +\newcommand{\bareU}[1]{\textnormal{#1}} +% units shortcut +\newcommand{\U}[1]{\textnormal{\ \bareU{#1}}} + +% chemicals and molecules +\newcommand{\Ox}{\ensuremath{\mathrm O_2}} +\newcommand{\Hb}{\ensuremath{\mathrm{Hb}}} +\newcommand{\HHb}{\ensuremath{\mathrm{HHb}}} +\newcommand{\dysHb}{\ensuremath{\mathrm{dysHb}}} +\newcommand{\MHb}{\ensuremath{\mathrm{MHb}}} +\newcommand{\CO}{\ensuremath{\mathrm{CO}}} +\newcommand{\Hg}{\ensuremath{\mathrm{Hg}}} + +\newcommand{\xO}[1]{\ensuremath{{\mathrm{#1}}_{\Ox}}} + +% partial pressure PiO2 +\newcommand{\PxO}[1]{\xO{P#1}} +\newcommand{\PO}{\PxO{}} +\newcommand{\PiO}{\PxO{\mathit i}} + +% saturation SiO2. Also O2Sat +\newcommand{\SxO}[1]{\xO{S#1}} +\newcommand{\SO}{\SxO{}} +\newcommand{\SiO}{\SxO{\mathit i}} + +% functional saturation +\newcommand{\SOf}{\xO{S_{\mathit f}}} + +% content CoO2. Also O2CT. +\newcommand{\CoO}{\xO{Co}} + +% Beer-Lambert law coefficients +\newcommand{\Iol}{\ensuremath{I_{0 \lambda}}} +\newcommand{\Il}{\ensuremath{I_\lambda}} +\newcommand{\Iacl}{\ensuremath{I_{AC\lambda}}} +\newcommand{\Idcl}{\ensuremath{I_{DC\lambda}}} +\newcommand{\exl}[1]{\ensuremath{\epsilon_{#1 \lambda}}} +\newcommand{\eil}{\exl{i}} +\newcommand{\cdcx}[1]{\ensuremath{c_{DC#1 \lambda}}} +\newcommand{\cdci}{\cdcx{i}} +\newcommand{\cacx}[1]{\ensuremath{c_{AC#1}}} +\newcommand{\caci}{\cacx{i}} +\newcommand{\edcxl}[1]{\ensuremath{\epsilon_{DC#1 \lambda}}} +\newcommand{\edcil}{\edcxl{i}} +\newcommand{\eacxl}[1]{\ensuremath{\epsilon_{AC#1 \lambda}}} +\newcommand{\eacil}{\eacxl{i}} +\newcommand{\eiA}[1]{\ensuremath{\epsilon_{AC#1,660}}} +\newcommand{\eiB}[1]{\ensuremath{\epsilon_{AC#1,940}}} +\newcommand{\Ldc}{\ensuremath{L_{\mathrm{DC}}}} + +% use most of the page +\topmargin -0.5in +\headheight 0.0in +\headsep 0.0in +\textheight 9.5in % leave a bit of extra room for page numbers +\oddsidemargin -0.5in +\textwidth 7.5in + +\begin{document} + +\maketitle + +\section{Oxygen content} + +The circulatory system distributes oxygen (\Ox) throughout the body. +The amount of \Ox\ at any given point is measured by the \Ox\ content +(\CoO), usually given in $\frac{\bareU{mL \Ox at BTP}}{\bareU{dL blood}}$ +(BTP is my acronym for body temperature and pressure). Most +transported \Ox\ is bound to +\href{http://en.wikipedia.org/wiki/Hemoglobin}{hemoglobin} (\Hb), but +there is also free \Ox\ disolved directly in the plasma and cytoplasm +of suspended cells. +\nomenclature{\Ox}{Molecular oxygen} +\nomenclature{\CoO}{Oxygen content of blood} +\nomenclature{BTP}{Body temperature and pressure} +\nomenclature{\Hb}{Hemoglobin monomer} +\nomenclature{\SO}{Fractional \Ox\ saturation} +\nomenclature{\PO}{\Ox\ partial pressure} +\begin{equation} + \CoO = a\C{\Hb}\SO + b\PO \;, \label{eq:CoO-symbolic} +\end{equation} +where \SO is the \Hb's \Ox\ saturation and \PO is the \Ox\ partial +pressure. Don't worry about the coefficients $a$ and $b$ yet, we'll +get back to them in a second. + +The amound of dissolved \Ox is given by its +\href{http://en.wikipedia.org/wiki/Partial_pressure}{partial pressure} +(\PO). Partial pressures are generally given in \bareU{mm} of mercury +(\Hg) at standard temperature and pressure +(\href{http://en.wikipedia.org/wiki/Standard_conditions_for_temperature_and_pressure}{STP}). +Because the partial pressure changes as blood flows through the body, +an additional specifier $i$ may be added (\PiO) to clarify the +measurement location. \nomenclature{\Hg}{Mercury} +\nomenclature{STP}{Standard temperature and pressure} +\nomenclature{\PiO}{\Ox\ partial pressure at location $i$} +\begin{center} +\begin{tabular}{ccl} + $i$ & Full symbol & Location descriptor \\ + a & \PxO{a} & arterial \\ + p & \PxO{p} & peripheral or pulsatile \\ + t & \PxO{t} & tissue \\ + v & \PxO{t} & venous \\ +\end{tabular} +\end{center} + +\Ox\ is carried in the blood primarily through binding to hemoglobin +monomers (\Hb), with each monomer potentially binding a single \Ox. +Oxygen saturation (\SO) is the fraction of hemoglobin monomers (\Hb) +that have bound an oxygen molecule (\Ox). +\begin{equation} + \SO = \frac{\C{\Hb\Ox}}{\C{\Hb}} \;. \label{eq:SO} +\end{equation} +\SO, as a ratio of concentrations, is unitless. It is often expressed +as a percentage. \C{\Hb} is often given in \bareU{g/dL}. As with +partial pressures, an additional specifier $i$ may be added (\SiO) to +clarify the measurement location (\SxO{a}, \SxO{p}, \ldots). +\nomenclature{\SiO}{\Ox\ saturation at location $i$} + +Now we can take a second look at our \Ox\ content formula +(Eq.~\ref{eq:CoO-symbolic}). The coefficient $a$ must convert +\bareU{g/dL} to $\frac{\bareU{mL \Ox\ at BTP}}{\bareU{dL blood}}$. +Using the molecular weight of \Hb\ and the +\href{http://hyperphysics.phy-astr.gsu.edu/hbase/kinetic/idegas.html}{volume + of a mole of ideal gas at STP}. +\begin{align} + \C{\Hb} &= \chi\frac{\bareU{g \Hb}}{\bareU{dL}} + \cdot\frac{1\U{mol \Hb}}{17\U{kg \Hb}} + \cdot\frac{1\U{mol \Ox}}{1\U{mol \Hb}} + \cdot\frac{22.4\U{L ideal gas}}{1\U{mol ideal gas}} \\ + &= 1.32 \frac{\bareU{mL \Ox}}{\bareU{g \Hb}} \cdot \chi +\end{align} +where $\chi$ is a pure number. Therefore, $a=1.32 \frac{\bareU{mL + \Ox}}{\bareU{g \Hb}}$. The powers that be seem to have used a +slightly different STP, since the more commonly used value is 5\% +higher at $1.39$. + +The coefficient $b$ must convert \bareU{mm \Hg\ at STP} to +$\frac{\bareU{mL \Ox\ at BTP}}{\bareU{dL blood}}$. Empirical +experiments (?) give a value of +$b=0.003\frac{\bareU{mL \Ox\ at BTP}} + {\bareU{dL blood $\cdot$ mm \Hg\ at STP}}$. +Now we can write out the familiar form +\begin{equation} + \CoO = + 1.39 \frac{\bareU{mL \Ox}}{\bareU{g \Hb}} \C{\Hb}\SO + + 0.003\frac{\bareU{mL \Ox\ at BTP}} + {\bareU{dL blood $\cdot$ mm \Hg\ at STP}} + \PO \;. \label{eq:CoO} +\end{equation} +Reasonable levels are +\begin{center} +\begin{tabular}{rl} + $\C{\Hb}$ & $14\frac{\bareU{g \Hb}}{\bareU{dL blood}}$ \\ + $\SO$ & 98\% \\ + $\PO$ & $100\U{mm \Hg\ at STP}$ \\ + $1.39 \frac{\bareU{mL \Ox}}{\bareU{g \Hb}} \C{\Hb}\SO$ & + $19.1\frac{\bareU{mL \Ox\ at BTP}}{\bareU{dL blood}}$ \\ + $0.003\frac{\bareU{mL \Ox\ at BTP}} + {\bareU{dL blood $\cdot$ mm \Hg\ at STP}} + \PO$ & + $0.299\frac{\bareU{mL \Ox\ at BTP}}{\bareU{dL blood}}$ +\end{tabular} +\end{center} +Because the dissolved \Ox\ has such a tiny contribution (1.5\% of the +total in my example), it is often measured at BTP rather than STP. +Sometimes it is dropped from the calculation entirely. We focus on +the more imporant $\C{\Hb}\SO$ in the next section. + +\section{Oxygen saturation} + +The preceding discussion used $\C{\Hb}\SO$ to represent the +concentration of \Hb\Ox\ complexes (Eqs.~\ref{eq:SO} and +~\ref{eq:CoO}). This was useful while we were getting our bearings, +but now we will replace that term with a more detailed model. Let us +sort the \Hb\ monomers into species +\begin{center} +\begin{tabular}{ll} + \Hb & all hemoglobin monomers \\ + \Hb\Ox & monomers complexed with \Ox \\ + \HHb & reduced \Hb\ (not complexed with \Ox) \\ + \dysHb & dys-hemoglobin (cannot complex with \Ox) \\ + \MHb & \href{http://en.wikipedia.org/wiki/Methemoglobin}{methemoglobin} \\ + \Hb\CO & \href{http://en.wikipedia.org/wiki/Carboxyhemoglobin} + {carboxyhemoglobin} +\end{tabular} +\end{center} +\nomenclature{\Hb\Ox}{\Hb\ monomers complexed with \Ox} +\nomenclature{\HHb}{Reduced \Hb\ (not complexed with \Ox)} +\nomenclature{\dysHb}{Dys-hemoglobin (cannot complex with \Ox)} +\nomenclature{\MHb}{Methemoglobin} +\nomenclature{\Hb\CO}{Carboxyhemoglobin} +These species are related as follows +\begin{align} + \C{\Hb} &= \C{\Hb\Ox} + \C{\HHb} + \C{\dysHb} \\ + \C{\dysHb} &= \C{\MHb} + \C{\Hb\CO} + \text{other broken forms} +\end{align} + +Because modern two-color pulse-oximeters don't measure \SO exactly, +the related quantity that they \emph{do} measure has been given a name +of its own: the \emph{functional} saturation (\SOf). +\nomenclature{\SOf}{Functional \Ox\ saturation} +\begin{equation} + \SOf = \frac{\C{\Hb\Ox}}{\C{\Hb\Ox} + \C{\HHb}} \;. \label{eq:funcSO} +\end{equation} +Rephrasing our earier saturation in Eq.~\ref{eq:SO}, we see +\begin{equation} + \SO = \frac{\C{\Hb\Ox}}{\C{\Hb}} + = \frac{\C{\Hb\Ox}} + {\C{\Hb\Ox} + \C{\HHb} + \C{\dysHb}} \;. \label{eq:fracSO} +\end{equation} +To avoid confusion with \SOf, our original \SO\ is sometimes referred +to as the\emph{fractional} saturation. + +\section{The Beer-Labmert law} + +So far we've been labeling and defining attributes of the blood. The +point of this excercise is to understand how a pulse oximeter measures +them. People have known for a while that different hemoglobin +complexes (\Hb\O, \HHb, \MHb, \Hb\CO, \ldots) have differnt absorbtion +spectra (Fig.~\ref{fig:absorbtion}), and they have been using this +difference since the 1930's to make pulse-oximeters based on two-color +transmittance measurements\citep{tremper1989}. + +\begin{figure} + \begin{center} + \includegraphics[width=0.6\textwidth]{fig/absorbtion} + \end{center} + \caption{Absorbance spectra for assorted hemoglobin + species\citep{tremper1989}.\label{fig:absorbtion}} +\end{figure} + +By passing different wavelengths of light through perfused tissue, we +can measure the relative quantities of the different \Hb\ species. +The basis for this analysis comes from the +\href{http://en.wikipedia.org/wiki/Beer\%E2\%80\%93Lambert_law}{Beer-Lambert + law} +\begin{equation} + I = I_0 e^{-c \epsilon L} \;, \label{eq:BL} +\end{equation} +where $I_0$ is the incident intensity (entering the tissue), $I$ is +the tranmitted intensity (leaving the tissue), $c$ is the tissue +density (concentration), $\epsilon$ is the extinction coefficient +(molar absorbtivity), and $L$ is the tissue thickness. Rephrasing the +math as English, this means that the intensity drops off exponentially +as you pass through the tissue, and more tissue (higher $c$ or $L$) or +more opaque tissue (higher $\epsilon$) mean you'll get less light out +the far side. This is a very simple law, and the price of the +simplicity is that it brushes all sorts of things under the rug. +Still, it will help give us a basic idea of what is going on in a +pulse-oximeter. + +Rather than treat the the tissue as a single substance, lets use the +Beer-Labmert law on a mixture of substances with concentrations $c_1$, +$c_2$, \ldots and extinction coefficients $\epsilon_1$, $\epsilon_2$, +\ldots. +\begin{equation} + I = I_0 e^{-(c_1 \epsilon_1 + c_2 \epsilon_2 + \ldots) L} \;. +\end{equation} + +We also notice that the intensities and extinction coefficients may +all depend on the wavelength of light $\lambda$, so we should really +write +\begin{equation} + \Il = \Iol e^{-(c_1 \exl{1} + c_2 \exl{2} + \ldots) L} + \;. \label{eq:BL-lambda} +\end{equation} +\nomenclature{\Iol}{Intensity of incident light at wavelength $\lambda$} +\nomenclature{\Il}{Intensity of transmitted light at wavelength $\lambda$} +\nomenclature{$c_i$}{Concentration of species $i$} +\nomenclature{\eil}{Extinction coefficient of species $i$ at + wavelength $\lambda$} +\nomenclature{$L$}{Length of tissue through which light must pass} + +Once isolated, a simple spectroscopy experiment can measure the +extinction coefficient $\eil$ of a given species across a range of +$\lambda$, and this has been done for all of our common \Hb\ flavors. +We need to play with Eq.~\ref{eq:BL-lambda} to find a way to extract +the unknown concentrations, which we can then use to calculate the +\SO\ (Eqs.~\ref{eq:funcSO} and \ref{eq:fracSO}) which we can use in +turn to calculate \CoO\ (Eq.~\ref{eq:CoO}). + +Note that by increasing the number of LEDs (adding new $\lambda$) we +increase the number of constraints on the unknown $c_i$. A +traditional pulse-oximeter uses two LEDs, at $660\U{nm}$ and +$940\U{nm}$, to measure \SOf (related to $\C{\Hb\Ox}$ and $\C{\HHb}$). +More recent designs called +\href{http://en.wikipedia.org/wiki/Co-oximeter}{pulse CO-oximeters} +use more wavelengths to allow measurement of quanties related to +additional species (approaching the end goal of measuring \SO). +\nomenclature{LED}{Light emitting diode} + +Let us deal with the fact that there is a lot of stuff absorbing light +that is not arterial blood (e.g. venous blood, other tissue, bone, +etc). The good thing about this stuff is that it's just sitting there +or moving through in a smooth fasion. Arterial blood is the only +thing that's pulsing (Fig.~\ref{fig:ac-dc}). + +\begin{figure} + \begin{center} + \includegraphics[width=0.6\textwidth]{fig/ac-dc} + \end{center} + \caption{AC and DC transmission + components\citep{tremper1989}.\label{fig:ac-dc}} +\end{figure} + +During a pulse, the pressure in the finger increases and non-arterial +tissue is compressed, changing $L$ and $c_i$ from their trough values +to peak values $L'$ and $c_i'$. Since the finger is big, the +fractional change in width $\dd L/L=(L'-L)/L$ is very small. Assuming +the change in concentration is even smaller (since most liquids are +fairly incompressible), we have +\begin{align} + \deriv{L}{\Il} + &= \deriv{L}{}\p({\Iol e^{-(c_1 \exl{1} + c_2 \exl{2} + \ldots) L}}) + = \deriv{L}{}\p({\Iol e^{-X L}}) + = -X \Iol e^{-X L} + = -X\Il \\ + \frac{\dd \Il}{\Il} &= -X \dd L \;, \label{eq:dI-I-naive} +\end{align} +where $X=c_1 \exl{1} + c_2 \exl{2} + \ldots$ is just a placeholder to +reduce clutter. \dd \Il is the AC amplitude (height of wiggle top of +the detected light intensity due to pulsatile arterial blood), while +\Il is the DC ampltude (height of the static base of the detected +light intensity due to everything else). This is actually a fairly +sneaky step, because if we can also use it to drop the DC compents. +Because we've assumed fixed concentrations (incompressible fluids), +and there is no more DC material comming in during a pulse (by +definition), we can pull out the effective $L$ for the DC components +does not change. Separating the DC and AC components and running +through the derivative again, we have +\nomenclature{\cdci}{Concentration of the $i$th DC species at + wavelength $\lambda$} \nomenclature{\caci}{Concentration of the + $i$th AC species at wavelength $\lambda$} +\nomenclature{\edcil}{Extinction coefficient of the $i$th DC species + at waveleng th $\lambda$} \nomenclature{\eacil}{Extinction + coefficient of the $i$th AC species at waveleng th $\lambda$} +\nomenclature{\Ldc}{DC finger width} +\begin{align} + \deriv{L}{\Il} + &= \deriv{L}{}\p({ + \Iol e^{-(\cdcx{1}\edcxl{1} + \cdcx{2}\edcxl{2} + \ldots) \Ldc + -(\cacx{1}\eacxl{1} + \cacx{2}\eacxl{2} + \ldots) L}}) \\ + &= \Iol e^{-(\cdcx{1}\edcxl{1} + \cdcx{2}\edcxl{2} + \ldots) \Ldc} + \deriv{L}{}\p({e^{-(\cacx{1}\eacxl{1} + \cacx{2}\eacxl{2} + \ldots) L} + }) \\ + &= \Iol Y \deriv{L}{}\p({e^{-Z L}}) + = -Z \Iol Y e^{-Z L} + = -Z \Il \\ + \frac{\dd \Il}{\Il} &= -Z \dd L \;, \label{eq:dI-I} +\end{align} +where $Y=e^{-(\cdcx{1}\edcxl{1} + \cdcx{2}\edcxl{2} + \ldots) \Ldc}$ +and $Z=\cacx{1}\eacxl{1} + \cacx{2}\eacxl{2} + \ldots$ are just +placeholders to reduce clutter. Note that Eq.~\ref{eq:dI-I} looks +just like Eq.~\ref{eq:dI-I-naive} with the translation $X\rightarrow +Z$. This means that if we stick to using the AC-DC intensity ratio +($\frac{\dd \Il}{\Il}$) we can forget about the DC contribution +completely\footnote{ +If the changing-$L$-but-static-$\Ldc$ thing bothers you, you can +imagine insteadthat $\Ldc$ grows with $L$, but \cdci shrinks +proportially (to conserve mass). With this proportionate stretching, +there is still no change in absorbtion for that component so +$\deriv{}{L}\exp(-\cdci\edcil L)=0$ and we can still pull the DC +terms out of the integral as we did for Eq.~\ref{eq:dI-I}.}. + +Taking a ratio of these amplitudes at two different wavelengths, we +get optical density ratio +\nomenclature{$R$}{Optical density ratio} +\begin{equation} + R = \frac{\frac{AC_{660}}{DC_{660}}}{\frac{AC_{940}}{DC_{940}}} + = \frac{\frac{\dd I_{660}}{I_{660}}}{\frac{\dd I_{940}}{I_{940}}} + = \frac{-Z_{660} \dd L}{-Z_{940} \dd L} + = \frac{Z_{660}}{Z_{940}} \;, +\end{equation} +because $\dd L$ (the amount of finger expansion during a pulse) +obviously doesn't depend on the color light you are using ;). +Plugging back in for $Z$, +\begin{equation} + R = \frac{\cacx{1}\eiA{1} + \cacx{2}\eiB{2} + \ldots} + {\cacx{1}\eiB{1} + \cacx{2}\eiB{2} + \ldots} \;. +\end{equation} +Assuming, for now, that there are only two species of \Hb, \Hb\Ox and +\HHb, we can solve for $\cacx{1}/\cacx{2}$. +\begin{align} + R &= \frac{\cacx{1}\eiA{1} + \cacx{2}\eiA{2}} + {\cacx{1}\eiB{1} + \cacx{2}\eiB{2}} \\ + R(\cacx{1}\eiB{1} + \cacx{2}\eiB{2}) + &= \cacx{1}\eiA{1} + \cacx{2}\eiA{2} \\ + \cacx{1} (R\eiB{1} - \eiA{1}) &= \cacx{2} (\eiA{2} - R\eiB{2}) \\ + \frac{\cacx{1}}{\cacx{2}} &= \frac{\eiA{2} - R\eiB{2}}{R\eiB{1} - \eiA{1}} + \;. +\end{align} +So now we know $\C{\Hb\Ox}/\C{\HHb}$ in terms of the measured quantity +$R$. + +Plugging in to Eq.~\ref{eq:funcSO} to find the functional saturation +\begin{align} + \SOf &= \frac{\C{\Hb\Ox}}{\C{\Hb\Ox} + \C{\HHb}} + = \frac{1}{1 + \frac{\C{\HHb}}{\C{\Hb\Ox}}} + = \frac{1}{1 + \frac{\cacx{2}}{\cacx{1}}} + = \frac{1}{1 + \frac{R\eiB{1} - \eiA{1}}{\eiA{2}-R\eiB{2}}} + \;. \label{eq:SOfvR} +\end{align} + +As a check, we can rephrase this as +\begin{align} + \SOf &= \frac{1}{1 + \frac{R\eiB{1} - \eiA{1}}{\eiA{2} - R\eiB{2}}} + = \frac{\eiA{2} - R\eiB{2}}{\eiA{2} - R\eiB{2} + R\eiB{1} - \eiA{1}} \\ + &= \frac{\eiA{2} - \eiB{2}R}{\eiA{2} - \eiA{1} + (\eiB{1} - \eiB{2})R} + = \frac{-\eiA{2} + \eiB{2}R}{\eiA{1} - \eiA{2} + (\eiB{2} - \eiB{1})R} + \;, +\end{align} +which matches \citet{mendelson1989}, Eq.~8 with the translations +$\SOf\rightarrow\SxO{p}$, $R\rightarrow R/IR$, +$\eiA{2}\rightarrow\epsilon_R(\HHb)$, +$\eiB{2}\rightarrow\epsilon_IR(\HHb)$, +$\eiA{1}\rightarrow\epsilon_R(\Hb\Ox)$, and +$\eiB{1}\rightarrow\epsilon_IR(\Hb\Ox)$. + +And that is the first-order explaination of how a pulse-oximeter +measures the functional saturation! + +Reading extinction coefficients off Fig.~\ref{fig:absorbtion}, I get +\begin{align} + \epsilon_{\Hb\Ox,660} &= \eiA{1} = 0.10 \\ + \epsilon_{\HHb,660} &= \eiA{2} = 0.83 \\ + \epsilon_{\Hb\Ox,940} &= \eiB{1} = 0.29 \\ + \epsilon_{\HHb,940} &= \eiB{2} = 0.17 +\end{align} +which are comfortingly close to those given by \citet{mendelson1989} +in their Table~1. The corresponding $\SOf(R)$ plot can be seen in +Fig.~\ref{fig:SfOvR-theory}. + +\begin{figure} + \begin{center} + \subfloat[]{\label{fig:SfOvR-experiment} + \includegraphics[width=0.48\textwidth]{fig/SPO2vR}} + \subfloat[]{\label{fig:SfOvR-theory} + \includegraphics[width=0.40\textwidth]{fig/SfO2vR-theory}} + \end{center} + \caption{Comparison of (a) an experimental calibration + curve\citep{tremper1989} with (b) a theoretical calibration curve + calculated using Eq.~\ref{eq:SOfvR}. This is why it's a good idea + to use an empirical calibration curve ;).\label{fig:SfOvR}} + % concave theoretical SfO2vR theory curve supported by + % mendelson1989, Fig. 4. +\end{figure} + +%, because LEDs are finicky, it's hard to know how bright they are +%without looking ;). Therefore, we'd like to work $\Iol$ out of the +%picture. As blood pulses through the finger, imagine that the +%concentrations + +\printnomenclature + +\phantomsection +\addcontentsline{toc}{section}{References} +\bibliography{main} + +\end{document}