From 3f3bb639cc4850e29aeef48a9ef31dd77d76e1c3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 3 May 2013 16:42:40 -0400 Subject: [PATCH] calibcant/theory.tex: Cleanup after de-appendicizing I added a new command \abs{} for absolute values, which uses \lvert and \rvert. This works better than |...|, because the lines stretch to enclose their argument. The nomencl package also refuses to add entries containing the pipe symbol to the nomenclature. --- src/apparatus/cantilever-calib.tex | 49 +- src/calibcant/overview.tex | 2 +- src/calibcant/procedure.tex | 6 + src/calibcant/theory.tex | 444 ++++++++++--------- src/cantilever-calib/contour_integration.tex | 10 +- src/cantilever-calib/integrals.tex | 37 +- src/local_cmmds.tex | 7 +- src/pyafm/stack.tex | 2 +- 8 files changed, 298 insertions(+), 259 deletions(-) diff --git a/src/apparatus/cantilever-calib.tex b/src/apparatus/cantilever-calib.tex index a8d33b0..d0a01e1 100644 --- a/src/apparatus/cantilever-calib.tex +++ b/src/apparatus/cantilever-calib.tex @@ -2,8 +2,9 @@ \label{sec:cantilever-calib:intro} In order to measure forces accurately with an AFM, it is important to -measure the cantilever spring constant. The force exerted on the -cantilever can then be deduced from it's deflection via Hooke's law +measure the cantilever spring constant $\kappa$\index{$\kappa$}. The +force exerted on the cantilever can then be deduced from it's +deflection via Hooke's law\index{Hooke's law} \begin{equation} F=-\kappa x \;. \label{eq:hooke} \end{equation} @@ -34,37 +35,42 @@ of the cantilever position $\avg{x^2}$ in order to estimate $\kappa$. \avg{A} \equiv \iLimT{A} \;. \end{equation}} -To find $\avg{x^2}$, the raw photodiode voltages $V_p(t)$ are -converted to distances $x(t)$ using the photodiode sensitivity -$\sigma_p$ (the slope of the voltage vs.~distance curve of data taken -while the tip is in contact with the surface) via +To find $\avg{x^2}$, the raw photodiode voltages +$V_p(t)$\index{$V_p(t)$} are converted to distances $x(t)$ using the +photodiode sensitivity $\sigma_p$\index{$\sigma_p$} (the slope of the +voltage vs.~distance curve of data taken while the tip is in contact +with the surface) via \begin{equation} x(t) = \frac{V_p(t)}{\sigma_p} \;. \label{eq:x-from-Vp} \end{equation} By keeping $V_p$ and $\sigma_p$ separate in our calculation of $\kappa$, we can gauge the relative importance errors in each -parameter and calculate the uncertainty in our estimated $\kappa$. +parameter and calculate the uncertainty in our estimated $\kappa$ +(\cref{sec:calibcant:discussion:errors}). In order to filter out noise in the measured value of $\avg{V_p^2}$ we fit the measured cantilever deflection to the expected theoretical -power spectral density ($\PSD_f$) of a damped harmonic oscillator -exposed to thermal noise -\nomenclature[PSD]{$\PSD_f$}{Power spectral density in - frequency space - \begin{equation} - \PSD_f(g, f) \equiv \normLimT 2 \magSq{ \Fourf{g(t)}(f) } - \end{equation}} -\nomenclature{$f$}{Frequency (hertz)} +power spectral density ($\PSD_f$\index{PSD@\PSD!in frequency space}) +of a damped harmonic oscillator exposed to thermal noise \begin{equation} \PSD_f(V_p, f) = \frac{G_{1f}}{(f_0^2-f^2)^2 + \beta_f^2 f^2} \;. \end{equation} -In terms of the fit parameters $G_{1f}$, $f_0$, and $\beta_f$, -the expectation value for $V_p$ is given by +In terms of the fit parameters $G_{1f}$\index{$G_{1f}$}, +$f_0$\index{$f_0$}, and $\beta_f$\index{$\beta_f$}, the expectation +value for $V_p$ is given by \begin{equation} \avg{V_p(t)^2} = \frac{\pi G_{1f}}{2\beta_f f_0^2} \;. \label{eq:Vp-from-freq-fit} \end{equation} +\nomenclature[PSDf]{$\PSD_f$}{Power spectral density in + frequency space + \begin{equation} + \PSD_f(g, f) \equiv \normLimT 2 \magSq{ \Fourf{g(t)}(f) } + \end{equation}} +\nomenclature{$f$}{Frequency (hertz)} +\nomenclature{$f_0$}{Resonant frequency (hertz)} + Combining \cref{eq:equipart_k,eq:x-from-Vp,eq:Vp-from-freq-fit}, we have \begin{align} @@ -73,10 +79,11 @@ have \label{eq:kappa} \end{align} A calibration run consists of bumping the surface with the cantilever -tip to measure $\sigma_p$, measuring the buffer temperature $T$ with a -thermocouple, and measuring thermal vibration when the tip is far from -the surface to extract the fit parameters $G_{1f}$, $f_0$, and -$\beta_f$. +tip to measure $\sigma_p$ (\cref{sec:calibcant:bump}), measuring the +buffer temperature $T$ with a thermocouple +(\cref{sec:calibcant:temperature}), and measuring thermal vibration +when the tip is far from the surface to extract the fit parameters +$G_{1f}$, $f_0$, and $\beta_f$ (\cref{sec:calibcant:vibration}). For a complete derivation of the procedure presented in this section, see \cref{sec:calibcant:theory}. The rest of \cref{sec:calibcant} diff --git a/src/calibcant/overview.tex b/src/calibcant/overview.tex index 07c5642..b297d77 100644 --- a/src/calibcant/overview.tex +++ b/src/calibcant/overview.tex @@ -15,7 +15,7 @@ reproduce here for easy reference: = \frac{2 \beta_f f_0^2 \sigma_p^2 k_BT}{\pi G_{1f}} \;. \end{align} where $\sigma_p$ is the photodiode sensitivity, $k_B$ is Boltzmann's -constant, $T$ is the absolute temperature. The remaining +constant, and $T$ is the absolute temperature. The remaining parameters---$G_{1f}$, $f_0$, and $\beta_f$---come from fitting the thermal vibration of the cantilever when it is far from the surface. diff --git a/src/calibcant/procedure.tex b/src/calibcant/procedure.tex index aa8512a..32ce4fa 100644 --- a/src/calibcant/procedure.tex +++ b/src/calibcant/procedure.tex @@ -1,5 +1,11 @@ \section{Calibcant} \label{sec:calibcant:procedure} + \subsection{Photodiode calibration} +\label{sec:calibcant:bump} + \subsection{Temperature measurements} +\label{sec:calibcant:temperature} + \subsection{Thermal vibration} +\label{sec:calibcant:vibration} diff --git a/src/calibcant/theory.tex b/src/calibcant/theory.tex index b8ae2d6..2b0f394 100644 --- a/src/calibcant/theory.tex +++ b/src/calibcant/theory.tex @@ -1,68 +1,40 @@ \section{Theory} \label{sec:calibcant:theory} -% TODO: deprecated in favor of sec:cantilever-calib:intro - -Rather than computing the variance of $x(t)$ directly, we attempt to -filter out noise by fitting the power spectral density (\PSD)% -\nomenclature[PSDa]{$\PSD$}{Power spectral density in angular - frequency space}\index{PSD@\PSD}\nomenclature{$\omega$}{Angular - frequency (radians per second)} of $x(t)$ to the theoretically -predicted \PSD\ for a damped harmonic oscillator (\cref{eq:model-psd}) -\begin{align} - \ddt{x} + \beta\dt{x} + \omega_0^2 x &= \frac{F_\text{thermal}}{m} \\ - \PSD(x, \omega) &= \frac{G_1}{(\omega_0^2-\omega^2)^2 + \beta^2\omega^2} \;, -\end{align} -\index{Damped harmonic oscillator} -where $G_1\equiv G_0/m^2$, $\omega_0$, and $\beta$ are used as the -fitting parameters (see \cref{eq:model-psd}).% -\index{$\beta$}\index{$\gamma$} The variance of $x(t)$ is then given -by \cref{eq:DHO-var} -\begin{equation} - \avg{x(t)^2} = \frac{\pi G_1}{2\beta\omega_0^2} \;, -\end{equation} -which we can plug into the equipartition theorem -(\cref{eq:equipart}) yielding -\begin{align} - \kappa = \frac{2 \beta \omega_0^2 k_BT}{\pi G_1} \;. -\end{align} -From \cref{eq:GO}, we find the expected value of $G_1$ to be +Our cantilever can be approximated as a damped harmonic +oscillator\index{damped harmonic oscillator} \begin{equation} - G_1 \equiv G_0/m^2 = \frac{2}{\pi m} k_BT \beta \;. \label{eq:Gone} -\end{equation} - - -\section{Theoretical power spectral density for a damped harmonic oscillator} -\label{sec:setup} - -Our cantilever can be approximated as a damped harmonic oscillator -\begin{equation} - m\ddt{x} + \gamma \dt{x} + \kappa x = F(t) \;, \label{eq:DHO} + m\ddt{x} + \gamma \dt{x} + \kappa x = F(t) \;, + \label{eq:DHO} % DHO for Damped Harmonic Oscillator \end{equation} -where $x$ is the displacement from equilibrium, - $m$ is the effective mass, - $\gamma$ is the effective drag coefficient, - $\kappa$ is the spring constant, and - $F(t)$ is the external driving force. +where $x$ is the displacement from equilibrium\index{$x$}, + $m$ is the effective mass\index{$m$}, + $\gamma$ is the effective drag coefficient\index{$\gamma$}, + $\kappa$ is the spring constant\index{$\kappa$}, and + $F(t)$ is the external driving force\index{$F(t)$}. During the non-contact phase of calibration, $F(t)$ comes from random thermal noise. + \nomenclature{$\beta$}{Damped harmonic oscillator drag-acceleration - coefficient $\beta \equiv \gamma/m$}\index{$\beta$}% + coefficient $\beta \equiv \gamma/m$} \nomenclature{$\gamma$}{Damped harmonic oscillator drag coefficient - $F_\text{drag} = \gamma\dt{x}$}\index{$\gamma$}% -\index{damped harmonic oscillator}% + $F_\text{drag} = \gamma\dt{x}$} \nomenclature{$\dt{s}$}{First derivative of the time-series $s(t)$ - with respect to time. $\dt{s} = \deriv{t}{s}$}% + with respect to time. $\dt{s} = \deriv{t}{s}$} \nomenclature{$\ddt{s}$}{Second derivative of the time-series $s(t)$ - with respect to time. $\ddt{s} = \nderiv{2}{t}{s}$}% + with respect to time. $\ddt{s} = \nderiv{2}{t}{s}$} -In the following analysis, we use the unitary, angular frequency Fourier transform normalization +In the following analysis, we use the unitary, angular frequency +Fourier transform normalization \begin{equation} \Four{x(t)} \equiv \frac{1}{\sqrt{2\pi}} \iInfInf{t}{x(t) e^{-i \omega t}}\;. \end{equation} \nomenclature{\Four{s(t)}}{Fourier transform of the time-series - $s(t)$. $s(f) = \Four{s(t)}$}\index{Fourier transform} + $s(t)$. + $s(f) = \Four{s(t)} + \equiv \frac{1}{\sqrt{2\pi}} \iInfInf{t}{s(t) e^{-i \omega t}}$ + }\index{Fourier transform} We also use the following theorems (proved elsewhere): \begin{align} @@ -81,9 +53,10 @@ We also use the following theorems (proved elsewhere): %\begin{equation} % x*y \equiv \iInfInf{\tau}{x(t-\tau)y(\tau)}. %\end{equation} -As a corollary to Parseval's theorem, we note that the one sided power spectral density per unit time (\PSD) defined by +As a corollary to Parseval's theorem, we note that the one sided power +spectral density per unit time (\PSD) defined by \begin{align} - \PSD(x, \omega) &\equiv \normLimT 2 \left| x(\omega) \right|^2 + \PSD(x, \omega) &\equiv \normLimT 2 \abs{x(\omega)}^2 &\text{\citep{PSD}} \label{eq:psd-def} \end{align} \index{PSD@\PSD} @@ -95,6 +68,15 @@ relates to the variance by = \iOInf{\omega}{\PSD(x,\omega)} \;, \label{eq:parseval-var} \end{align} where $t_T$ is the total time over which data has been aquired. +% +\nomenclature[PSDo]{$\PSD$}{Power spectral density in angular + frequency space + \begin{equation} + \PSD(g, w) \equiv \normLimT 2 \magSq{ \Four{g(t)}(\omega) } + \end{equation}} +\nomenclature{$\omega$}{Angular frequency (radians per second)} +\nomenclature{$\abs{z}$}{Absolute value (or magnitude) of $z$. For + complex $z$, $\abs{z}\equiv\sqrt{z\conj{z}}$.} We also use the Wiener-Khinchin theorem, which relates the two sided power spectral density $S_{xx}(\omega)$ @@ -112,144 +94,23 @@ where $r_{xx}(t)$ is defined in terms of the expectation value and $\conj{x}$ represents the complex conjugate of $x$. \nomenclature{$\conj{z}$}{Complex conjugate of $z$} - -\subsection{Fitting deflection voltage directly} - -In order to keep our errors in measuring $\sigma_p$ seperate from -other errors in measuring $\avg{x(t)^2}$, we can fit the voltage -spectrum before converting to distance. -\begin{align} - \ddt{V_p}/\sigma_p + \beta\dt{V_p}/\sigma_p + \omega_0^2 V_p/\sigma_p - &= F_\text{thermal} \\ - \ddt{V_p} + \beta\dt{V_p} + \omega_0^2 V_p - &= \sigma_p\frac{F_\text{thermal}}{m} \\ - \ddt{V_p} + \beta\dt{V_p} + \omega_0^2 V_p - &= \frac{F_\text{thermal}}{m_p} \\ - \PSD(V_p, \omega) &= \frac{G_{1p}} - { (\omega_0^2-\omega^2)^2 + \beta^2\omega^2 } \\ - \avg{V_p(t)^2} &= \frac{\pi G_{1p}}{2\beta\omega_0^2} - = \frac{\pi \sigma_p^2 G_{1}}{2\beta\omega_0^2} - = \sigma_p^2 \avg{x(t)^2} \;, -\end{align} -where $m_p\equiv m/\sigma_p$, $G_{1p}\equiv G_0/m_p^2=\sigma_p^2 G_1$. -Plugging into the equipartition theorem yeilds -\begin{align} - \kappa &= \frac{\sigma_p^2 k_BT}{\avg{V_p(t)^2}} - = \frac{2 \beta\omega_0^2 \sigma_p^2 k_BT}{\pi G_{1p}} \;. -\end{align} - -From \cref{eq:Gone}, we find the expected value of $G_{1p}$ to be -\begin{equation} - G_{1p} \equiv \sigma_p^2 G_1 = \frac{2}{\pi m} \sigma_p^2 k_BT \beta \;. - \label{eq:Gone-p} -\end{equation} - - -\subsection{Fitting deflection voltage in frequency space} - -Note: the math in this section depends on some definitions from -section \cref{sec:setup}. - -As yet another alternative, you could fit in frequency -$f\equiv\omega/2\pi$ instead of angular frequency $\omega$. But we -must be careful with normalization. Comparing the angular frequency -and normal frequency unitary Fourier transforms -\begin{align} - \Four{x(t)}(\omega) - &\equiv \frac{1}{\sqrt{2\pi}} \iInfInf{t}{x(t) e^{-i \omega t}} \\ - \Fourf{x(t)}(f) &\equiv \iInfInf{t}{x(t) e^{-2\pi i f t}} - = \iInfInf{t}{x(t) e^{-i \omega t}} - = \sqrt{2\pi}\cdot\Four{x(t)}(\omega=2\pi f) \;, -\end{align} -from which we can translate the \PSD -\begin{align} - \PSD(x, \omega) &\equiv \normLimT 2 \magSq{ \Four{x(t)}(\omega) } \\ - \begin{split} - \PSD_f(x, f) &\equiv \normLimT 2 \magSq{ \Fourf{x(t)}(f) } - = 2\pi \cdot \normLimT 2 \magSq{ \Four{x(t)}(\omega=2\pi f) } \\ - &= 2\pi \PSD(x, \omega=2\pi f) \;. - \end{split} -\end{align} -\nomenclature{$t$}{Time (seconds)} -\index{PSD@\PSD!in frequency space} -The variance of the function $x(t)$ is then given by plugging into -\cref{eq:parseval-var} (our corollary to Parseval's theorem) -\begin{align} - \avg{x(t)^2} &= \iOInf{\omega}{\PSD(x,\omega)} - = \iOInf{f}{\frac{1}{2\pi}\PSD_f(x,f)2\pi\cdot} - = \iOInf{f}{\PSD_f(x,f)} \;. -\end{align} -Therefore -\begin{align} - \begin{split} - \PSD_f(V_p, f) &= 2\pi\PSD(V_p,\omega) - = \frac{2\pi G_{1p}}{(4\pi f_0^2-4\pi^2f^2)^2 + \beta^2 4\pi^2f^2} - = \frac{2\pi G_{1p}}{16\pi^4(f_0^2-f^2)^2 + \beta^2 4\pi^2f^2} \\ - &= \frac{G_{1p}/8\pi^3}{(f_0^2-f^2)^2 + \frac{\beta^2 f^2}{4\pi^2}} - = \frac{G_{1f}}{(f_0^2-f^2)^2 + \beta_f^2 f^2} - \end{split} \\ - \avg{V_p(t)^2} &= \frac{\pi G_{1f}}{2\beta_f f_0^2} \;. -% = \frac{\pi G_{1p} / (2\pi)^3}{2\beta/(2\pi) \omega_0^2/(2\pi)^2} -% = \frac{\pi G_{1p}}{2\beta\omega_0^2} = \avg{V_p(t)^2} % check! -\end{align} -where $f_0\equiv\omega_0/2\pi$, $\beta_f\equiv\beta/2\pi$, and -$G_{1f}\equiv G_{1p}/8\pi^3$. Finally -\begin{align} - \kappa &= \frac{\sigma_p^2 k_BT}{\avg{V_p(t)^2}} - = \frac{2 \beta_f f_0^2 \sigma_p^2 k_BT}{\pi G_{1f}} \;. -\end{align} - -From \cref{eq:Gone}, we expect $G_{1f}$ to be -\begin{equation} - G_{1f} = \frac{G_{1p}}{8\pi^3} - = \frac{\sigma_p^2 G_1}{8\pi^3} - = \frac{\frac{2}{\pi m} \sigma_p^2 k_BT \beta}{8\pi^3} - = \frac{\sigma_p^2 k_BT \beta}{4\pi^4 m} \;. - \label{eq:Gone-f} -\end{equation} - - -% TODO: re-integrate the following - -% \begin{split} -% \PSD_f(V_p, f) = -% 2\pi\PSD(V_p,\omega) -% = \frac{2\pi G_{1p}}{(4\pi f_0^2-4\pi^2f^2)^2 + \beta^2 4\pi^2f^2} -% = \frac{2\pi G_{1p}}{16\pi^4(f_0^2-f^2)^2 + \beta^2 4\pi^2f^2} \\ -% &= \frac{G_{1p}/8\pi^3}{(f_0^2-f^2)^2 + \frac{\beta^2 f^2}{4\pi^2}} -% \end{split} \\ - -% = \frac{\pi G_{1p} / (2\pi)^3}{2\beta/(2\pi) \omega_0^2/(2\pi)^2} -% = \frac{\pi G_{1p}}{2\beta\omega_0^2} = \avg{V_p(t)^2} % check! - -%where $f_0\equiv\omega_0/2\pi$, $\beta_f\equiv\beta/2\pi$, and -%$G_{1f}\equiv G_{1p}/8\pi^3$. Finally - -%From \cref{eq:Gone}, we expect $G_{1f}$ to be -%\begin{equation} -% G_{1f} = \frac{G_{1p}}{8\pi^3} -% = \frac{\sigma_p^2 G_1}{8\pi^3} -% = \frac{\frac{2}{\pi m} \sigma_p^2 k_BT \beta}{8\pi^3} -% = \frac{\sigma_p^2 k_BT \beta}{4\pi^4 m} \;. -% \label{eq:Gone-f} -% \end{equation} - \subsection{Highly damped case} +\label{sec:calibcant:ODHO} -For highly damped systems, the inertial term becomes insignificant - ($m \rightarrow 0$). -This model is commonly used for optically trapped beads\citep{TODO}. -Because it is simpler and solutions are more easily available% -\citep{grossman05,TODO}, -it will server to outline the general approach before we dive into the -general case. +For highly damped systems, the inertial term in \cref{eq:DHO} becomes +insignificant ($m \rightarrow 0$). This model is commonly used for +optically trapped beads\citep{TODO}. Because it is simpler and +solutions are more easily available\citep{grossman05,TODO}, it will +serve to outline the general approach before we dive into the general +case. Fourier transforming \cref{eq:DHO} with $m=0$ and applying \cref{eq:four-deriv} we have % ODHO stands for very Over Damped Harmonic oscillator \begin{align} (i \gamma \omega + \kappa) x(\omega) &= F(\omega) \label{eq:ODHO-freq} \\ - |x(\omega)|^2 &= \frac{|F(\omega)|^2}{\kappa^2 + \gamma^2 \omega^2} \;. + \abs{x(\omega)}^2 &= \frac{\abs{F(\omega)}^2} + {\kappa^2 + \gamma^2 \omega^2} \;. \label{eq:ODHO-xmag} \end{align} \index{Damped harmonic oscillator!extremely overdamped} @@ -263,20 +124,21 @@ We compute the \PSD\ by plugging \cref{eq:ODHO-xmag} into \index{PSD@\PSD} Because thermal noise is white (not autocorrelated + Wiener-Khinchin -Theorem), we can denote the one sided thermal power spectral density -per unit time by +Theorem), we can write the one sided thermal power spectral density +per unit time as \begin{equation} \PSD(F, \omega) = G_0 = \normLimT 2 \magSq{F(\omega)} \;. \label{eq:GOdef} % label O != zero \end{equation} -Plugging \cref{eq:GOdef} into \cref{eq:ODHO-psd} we have +Plugging \cref{eq:GOdef} into \cref{eq:ODHO-psd-F} we have \begin{equation} \PSD(x, \omega) = \frac{G_0}{\kappa^2 + \gamma^2\omega^2} \;. + \label{eq:ODHO-psd-GO} \end{equation} This is the formula we would use to fit our measured \PSD, but let us go a bit farther to find the expected \PSD\ and thermal noise given -$m$, $\gamma$ and $\kappa$. +$\gamma$ and $\kappa$. Integrating over positive $\omega$ to find the total power per unit time yields @@ -285,8 +147,9 @@ time yields = \iOInf{\omega}{\frac{G_0}{\kappa^2 + \gamma^2\omega^2}} = \frac{G_0}{\gamma}\iOInf{z}{\frac{1}{\kappa^2 + z^2}} = \frac{G_0 \pi}{2 \gamma \kappa} \;, + \label{eq:ODHO-psd-int} \end{align} -where the integral is solved in \cref{sec:integrals}. +where the integral is solved in \cref{sec:integrals:highly-damped}. Plugging into our corollary to Parseval's theorem (\cref{eq:parseval-var}), \begin{equation} @@ -296,12 +159,13 @@ Plugging into our corollary to Parseval's theorem (\cref{eq:parseval-var}), Plugging \cref{eq:ODHO-var} into \cref{eq:equipart} we have \begin{align} \kappa \frac{G_0 \pi}{2 \gamma \kappa} &= k_BT \\ - G_0 &= \frac{2 \gamma k_BT}{\pi} \;. + G_0 &= \frac{2 \gamma k_BT}{\pi} \;. \label{eq:ODHO-GO} \end{align} -So we expect $x(t)$ to have a power spectral density per unit time given by +Combining \cref{eq:ODHO-psd-GO,eq:ODHO-GO}, we expect $x(t)$ to have a +power spectral density per unit time given by \begin{equation} - \PSD(x, \omega) = \frac{2}{\pi} + \PSD(x, \omega) = \frac{2}{\pi} \cdot \frac{\gamma k_BT}{\kappa^2 + \gamma^2\omega^2} \;. \label{eq:ODHO-psd} @@ -309,42 +173,52 @@ So we expect $x(t)$ to have a power spectral density per unit time given by \index{PSD@\PSD} \subsection{General form} +\label{sec:calibcant:SHO} The procedure here is exactly the same as the previous section. The integral normalizing $G_0$, however, becomes a little more complicated. -Fourier transforming \cref{eq:DHO} and applying \cref{eq:four-deriv} we have +Fourier transforming \cref{eq:DHO} and applying \cref{eq:four-deriv} +we have \begin{align} (-m\omega^2 + i \gamma \omega + \kappa) x(\omega) &= F(\omega) \label{eq:DHO-freq} \\ (\omega_0^2-\omega^2 + i \beta \omega) x(\omega) &= \frac{F(\omega)}{m} \\ - |x(\omega)|^2 &= \frac{|F(\omega)|^2/m^2} + \abs{x(\omega)}^2 &= \frac{\abs{F(\omega)}^2/m^2} {(\omega_0^2-\omega^2)^2 + \beta^2\omega^2} \;, \label{eq:DHO-xmag} \end{align} -where $\omega_0 \equiv \sqrt{\kappa/m}$ is the resonant angular -frequency and $\beta \equiv \gamma / m$ is the drag-aceleration -coefficient. -\index{Damped harmonic oscillator}\index{beta}\index{gamma} -\nomenclature{$\omega_0$}{Resonant angular frequency (radians per second)} -\index{$\omega_0$} - -We compute the \PSD\ by plugging \cref{eq:DHO-xmag} into \cref{eq:psd-def} +where $\omega_0 \equiv \sqrt{\kappa/m}$\index{$\omega_0$} is the +resonant angular frequency and $\beta \equiv \gamma / m$ is the +drag-acceleration coefficient.\index{Damped harmonic + oscillator}\index{$\gamma$}\index{$\kappa$}\index{$\beta$} + +\nomenclature{$\omega_0$}{Resonant angular frequency (radians per + second)} + +We compute the \PSD\ by plugging \cref{eq:DHO-xmag} into +\cref{eq:psd-def} \begin{equation} \PSD(x, \omega) - = \normLimT \frac{2 |F(\omega)|^2/m^2} + = \normLimT \frac{2 \abs{F(\omega)}^2/m^2} {(\omega_0^2-\omega^2)^2 + \beta^2\omega^2} \;. \label{eq:DHO-psd-F} \end{equation} \index{PSD@\PSD} Plugging \cref{eq:GOdef} into \cref{eq:DHO-psd-F} we have -\begin{equation} - \PSD(x, \omega) = \frac{G_0/m^2}{(\omega_0^2-\omega^2)^2 +\beta^2\omega^2}\;. - \label{eq:model-psd} -\end{equation} -Integrating over positive $\omega$ to find the total power per unit time yields +\begin{align} + \PSD(x, \omega) &= \frac{G_0/m^2}{(\omega_0^2-\omega^2)^2 +\beta^2\omega^2}\;, + \label{eq:model-psd} \\ + &= \frac{G_1}{(\omega_0^2-\omega^2)^2 +\beta^2\omega^2} \;, + \label{eq:model-psd-Gone} +\end{align} +where $G_1\equiv G_0/m^2$ consolidates the unknown fitting parameters +without loss of generality. + +Integrating over positive $\omega$ to find the total power per unit +time yields \begin{align} \iOInf{\omega}{\PSD(x, \omega)} &= \frac{G_0}{2m^2} @@ -352,22 +226,27 @@ Integrating over positive $\omega$ to find the total power per unit time yields = \frac{G_0}{2m^2} \cdot \frac{\pi}{\beta\omega_0^2} = \frac{G_0 \pi}{2m^2\beta\omega_0^2} = \frac{G_0 \pi}{2m^2\beta \frac{\kappa}{m}} \\ - &= \frac{G_0 \pi}{2m \beta \kappa} \;. + &= \frac{G_0 \pi}{2m \beta \kappa} \;, + \label{eq:DHO-psd-int} \end{align} -The integration is detailed in \cref{sec:integrals}. +where the integration is solved in \cref{sec:integrals:general}. By the corollary to Parseval's theorem (\cref{eq:parseval-var}), we have -\begin{equation} - \avg{x(t)^2} = \frac{G_0 \pi}{2m^2\beta\omega_0^2} \;. \label{eq:DHO-var} -\end{equation} +\begin{align} + \avg{x(t)^2} + &= \frac{G_0 \pi}{2m^2\beta\omega_0^2} \;, \label{eq:DHO-var} \\ + &= \frac{G_1 \pi}{\beta\omega_0^2} \;, \label{eq:DHO-var-Gone} +\end{align} Plugging \cref{eq:DHO-var} into the equipartition theorem (\cref{eq:equipart}) we have \begin{align} - \kappa \frac{G_0 \pi}{2m \beta \kappa} &= k_BT \\ - G_0 &= \frac{2}{\pi} k_BT m \beta \;. \label{eq:GO} + \kappa \frac{G_0 \pi}{2m \beta \kappa} &= k_BT \, \\ + G_0 &= \frac{2}{\pi} k_BT m \beta \;, \label{eq:GO} \\ + G_1 &\equiv \frac{G_0}{m^2} = \frac{2}{\pi m} k_BT \beta \;. \label{eq:Gone} \end{align} -So we expect $x(t)$ to have a power spectral density per unit time given by +Combining \cref{eq:model-psd,eq:GO}, we expect $x(t)$ to have a power +spectral density per unit time given by \begin{equation} \PSD(x, \omega) = \frac{2 k_BT \beta} { \pi m \p[{(\omega_0^2-\omega^2)^2 + \beta^2\omega^2}] }\;. @@ -375,16 +254,149 @@ So we expect $x(t)$ to have a power spectral density per unit time given by \end{equation} \index{PSD@\PSD} -As expected, the general form \cref{eq:DHO-psd} reduces to the -extremely overdamped form \cref{eq:ODHO-psd}. Plugging in for -$\beta\equiv\gamma/m$ and $\omega_0\equiv\sqrt{\kappa/m}$, +As expected, we can recover the extremely overdamped form +\cref{eq:ODHO-psd} from the general form \cref{eq:DHO-psd}. Plugging +in for $\beta\equiv\gamma/m$ and $\omega_0\equiv\sqrt{\kappa/m}$, \begin{align} \lim_{m\rightarrow 0} \PSD(x, \omega) &= \lim_{m\rightarrow 0} \frac{2 k_BT \gamma} - { \pi m^2 \p[{(\kappa/m-\omega^2)^2 + \gamma^2/m^2\omega^2}] } + { \pi m^2 \p[{\p({\frac{\kappa}{m}-\omega^2})^2 + \frac{\gamma^2}{m^2}\omega^2}] } = \lim_{m\rightarrow 0} \frac{2 k_BT \gamma} { \pi \p[{(\kappa-m\omega^2)^2 + \gamma^2\omega^2}] } \\ &= \frac{2}{\pi} \cdot \frac{\gamma k_BT}{\kappa^2 + \gamma^2\omega^2} \;. \end{align} + +\subsection{Fitting deflection voltage directly} +\label{sec:calibcant:voltage} + +In order to keep our errors in measuring $\sigma_p$ separate from +other errors in measuring $\avg{x(t)^2}$, we can fit the voltage +spectrum before converting to distance. Plugging \cref{eq:x-from-Vp} +into \cref{eq:DHO}, +\begin{align} + \frac{\ddt{V_p}}{\sigma_p} + \beta\frac{\dt{V_p}}{\sigma_p} + + \omega_0^2 \frac{V_p}{\sigma_p} + &= F(t) \\ + \ddt{V_p} + \beta\dt{V_p} + \omega_0^2 V_p + &= \sigma_p\frac{F(t)}{m} \\ + \ddt{V_p} + \beta\dt{V_p} + \omega_0^2 V_p + &= \frac{F(t)}{m_p} \;, +\end{align} +where $m_p\equiv m/\sigma_p$. This has the same form as +\cref{eq:DHO}, which can be rearranged to: +\begin{align} + \ddt{x} + \frac{\gamma}{m} \dt{x} + \frac{\kappa}{m} x &= \frac{F(t)}{m} \\ + \ddt{x} + \beta \dt{x} + \omega_0^2 x &= \frac{F(t)}{m} \;, +\end{align} +so the \PSD\ of $V_p(t)$ will be the same as the \PSD\ of $x(t)$, +after the replacements $x\rightarrow V_p(t)$ and $m\rightarrow m_p$. +Making these replacements in \cref{eq:model-psd-Gone,eq:DHO-var-Gone}, +we have +\begin{align} + \PSD(V_p, \omega) &= \frac{G_{1p}} + { (\omega_0^2-\omega^2)^2 + \beta^2\omega^2 } \\ + \avg{V_p(t)^2} &= \frac{\pi G_{1p}}{2\beta\omega_0^2} + = \frac{\pi \sigma_p^2 G_{1}}{2\beta\omega_0^2} + = \sigma_p^2 \avg{x(t)^2} \;, +\end{align} +where $G_{1p}\equiv G_0/m_p^2=\sigma_p^2 G_1$. +Plugging into the equipartition theorem yeilds +\begin{align} + \kappa &= \frac{\sigma_p^2 k_BT}{\avg{V_p(t)^2}} + = \frac{2 \beta\omega_0^2 \sigma_p^2 k_BT}{\pi G_{1p}} \;. +\end{align} + +From \cref{eq:Gone}, we find the expected value of $G_{1p}$ to be +\begin{equation} + G_{1p} \equiv \sigma_p^2 G_1 = \frac{2}{\pi m} \sigma_p^2 k_BT \beta \;. + \label{eq:Gone-p} +\end{equation} + +\subsection{Fitting deflection voltage in frequency space} +\label{sec:calibcant:frequency} + +As another alternative, you could fit in frequency +$f\equiv\omega/2\pi$ instead of angular frequency $\omega$. The +analysis will be the same, but we must be careful with normalization. +Comparing the angular frequency and normal frequency unitary Fourier +transforms +\begin{align} + \Four{x(t)}(\omega) + &\equiv \frac{1}{\sqrt{2\pi}} \iInfInf{t}{x(t) e^{-i \omega t}} \\ + \Fourf{x(t)}(f) &\equiv \iInfInf{t}{x(t) e^{-2\pi i f t}} + = \iInfInf{t}{x(t) e^{-i \omega t}} + = \sqrt{2\pi}\cdot\Four{x(t)}(\omega=2\pi f) \;, +\end{align} +from which we can translate the \PSD +\begin{align} + \PSD(x, \omega) &\equiv \normLimT 2 \magSq{ \Four{x(t)}(\omega) } \\ + \begin{split} + \PSD_f(x, f) &\equiv \normLimT 2 \magSq{ \Fourf{x(t)}(f) } + = 2\pi \cdot \normLimT 2 \magSq{ \Four{x(t)}(\omega=2\pi f) } \\ + &= 2\pi \PSD(x, \omega=2\pi f) \;. + \end{split} +\end{align} +\nomenclature{$t$}{Time (seconds)} +\index{PSD@\PSD!in frequency space} +The variance of the function $x(t)$ is then given by plugging into +\cref{eq:parseval-var} (our corollary to Parseval's theorem) +\begin{align} + \avg{x(t)^2} &= \iOInf{\omega}{\PSD(x,\omega)} + = \iOInf{f}{\frac{1}{2\pi}\PSD_f(x,f)2\pi\cdot} + = \iOInf{f}{\PSD_f(x,f)} \;. +\end{align} +Therefore +\begin{align} + \begin{split} + \PSD_f(V_p, f) &= 2\pi\PSD(V_p,\omega) + = \frac{2\pi G_{1p}}{(4\pi f_0^2-4\pi^2f^2)^2 + \beta^2 4\pi^2f^2} + = \frac{2\pi G_{1p}}{16\pi^4(f_0^2-f^2)^2 + \beta^2 4\pi^2f^2} \\ + &= \frac{G_{1p}/8\pi^3}{(f_0^2-f^2)^2 + \frac{\beta^2 f^2}{4\pi^2}} + = \frac{G_{1f}}{(f_0^2-f^2)^2 + \beta_f^2 f^2} + \end{split} \\ + \avg{V_p(t)^2} &= \frac{\pi G_{1f}}{2\beta_f f_0^2} \;. +% = \frac{\pi G_{1p} / (2\pi)^3}{2\beta/(2\pi) \omega_0^2/(2\pi)^2} +% = \frac{\pi G_{1p}}{2\beta\omega_0^2} = \avg{V_p(t)^2} % check! +\end{align} +where $f_0\equiv\omega_0/2\pi$, $\beta_f\equiv\beta/2\pi$, and +$G_{1f}\equiv G_{1p}/8\pi^3$. Finally +\begin{align} + \kappa &= \frac{\sigma_p^2 k_BT}{\avg{V_p(t)^2}} + = \frac{2 \beta_f f_0^2 \sigma_p^2 k_BT}{\pi G_{1f}} \;. +\end{align} + +From \cref{eq:Gone-p}, we expect $G_{1f}$ to be +\begin{equation} + G_{1f} = \frac{G_{1p}}{8\pi^3} + = \frac{\frac{2}{\pi m} \sigma_p^2 k_BT \beta}{8\pi^3} + = \frac{\sigma_p^2 k_BT \beta}{4\pi^4 m} \;. + \label{eq:Gone-f} +\end{equation} + + +% TODO: re-integrate the following + +% \begin{split} +% \PSD_f(V_p, f) = +% 2\pi\PSD(V_p,\omega) +% = \frac{2\pi G_{1p}}{(4\pi f_0^2-4\pi^2f^2)^2 + \beta^2 4\pi^2f^2} +% = \frac{2\pi G_{1p}}{16\pi^4(f_0^2-f^2)^2 + \beta^2 4\pi^2f^2} \\ +% &= \frac{G_{1p}/8\pi^3}{(f_0^2-f^2)^2 + \frac{\beta^2 f^2}{4\pi^2}} +% \end{split} \\ + +% = \frac{\pi G_{1p} / (2\pi)^3}{2\beta/(2\pi) \omega_0^2/(2\pi)^2} +% = \frac{\pi G_{1p}}{2\beta\omega_0^2} = \avg{V_p(t)^2} % check! + +%where $f_0\equiv\omega_0/2\pi$, $\beta_f\equiv\beta/2\pi$, and +%$G_{1f}\equiv G_{1p}/8\pi^3$. Finally + +%From \cref{eq:Gone}, we expect $G_{1f}$ to be +%\begin{equation} +% G_{1f} = \frac{G_{1p}}{8\pi^3} +% = \frac{\sigma_p^2 G_1}{8\pi^3} +% = \frac{\frac{2}{\pi m} \sigma_p^2 k_BT \beta}{8\pi^3} +% = \frac{\sigma_p^2 k_BT \beta}{4\pi^4 m} \;. +% \label{eq:Gone-f} +% \end{equation} diff --git a/src/cantilever-calib/contour_integration.tex b/src/cantilever-calib/contour_integration.tex index 6bae7e6..8865abd 100644 --- a/src/cantilever-calib/contour_integration.tex +++ b/src/cantilever-calib/contour_integration.tex @@ -14,14 +14,14 @@ along the contour \C\ shown in \cref{fig:UHP-contour}. \end{figure} A sufficient condition on the function $f(z)$ to be integrated, is -that $\lim_{|z|\rightarrow\infty}|f(z)|$ falls off at least as fast as -$\frac{1}{z^2}$. -When this is the case, the integral around the outer semicircle of \C\ is 0, -so the $\iC{f(z)} = \iInfInf{z}{f(z)}$. +that $\lim_{\abs{z}\rightarrow\infty}\abs{f(z)}$ falls off at least as +fast as $\frac{1}{z^2}$. When this is the case, the integral around +the outer semicircle of \C\ is 0, so the +$\iC{f(z)}=\iInfInf{z}{f(z)}$. We can evaluate the integral using the residue theorem\index{residue theorem}, \begin{equation} - \iC{f(x)} = \sum_{z_p \in \text{poles in \C}} 2\pi i \Res{z_p}{f(z)} \;, + \iC{f(x)} = \sum_{z_p \in \{\text{poles in \C}\}} 2\pi i \Res{z_p}{f(z)} \;, \label{eq:res-thm} \end{equation} where for simple poles (single roots) diff --git a/src/cantilever-calib/integrals.tex b/src/cantilever-calib/integrals.tex index afac3bc..25114c8 100644 --- a/src/cantilever-calib/integrals.tex +++ b/src/cantilever-calib/integrals.tex @@ -1,23 +1,32 @@ \section{Integrals} \label{sec:integrals} +In the following sections I work out derivations for integrals that +are important in \cref{sec:calibcant:theory}. + \subsection{Highly damped integral} +\label{sec:integrals:highly-damped} \begin{equation} - I = \iOInf{z}{\frac{1}{k^2 + z^2}} - = \frac{1}{2} \iInfInf{z}{\frac{1}{k^2 + z^2}} - = \frac{1}{2k} \iInfInf{u}{\frac{1}{u^2+1}} \;, -\end{equation} -where $u \equiv z/k$ and $du = dz/k$. -There are simple poles at $u = \pm i$. -\begin{equation} - I = \frac{1}{2k} \cdot 2 \pi i \Res{i}{f(u)} - = \frac{1}{2k} \cdot \frac{2 \pi i}{i+i} - = \frac{\pi}{2 k} \;. + I = \iOInf{z}{\frac{1}{a^2 + z^2}} + = \frac{1}{2} \iInfInf{z}{\frac{1}{a^2 + z^2}} + = \frac{1}{2} \iInfInf{u}{\frac{1}{a^2 + (au)^2} \cdot a} + = \frac{1}{2a} \iInfInf{u}{\frac{1}{u^2+1}} \;, \end{equation} - +where $u \equiv z/a$ and $du = dz/a$. The integrand +$f(u)\equiv(u^2+1)^{-1}$ has simple poles at $u_p = \pm i$. Using +\cref{eq:res-simple}, +\begin{align} + I &= \frac{1}{2a} \cdot 2 \pi i \ResX{u}{i}{f(u)} + = \frac{1}{2a} \cdot 2 \pi i \limX{u}{i} (u-i) \frac{1}{u^2+1} + = \frac{1}{2a} \cdot 2 \pi i \limX{u}{i} \frac{1}{u+i} \\ + &= \frac{1}{2a} \cdot \frac{2 \pi i}{i+i} + = \frac{\pi}{2 a} \;. +\end{align} +This result is used in \cref{eq:ODHO-psd-int}. \subsection{General case integral} +\label{sec:integrals:general} We will show that, for any $(a,b > 0) \in \Reals$,% \nomenclature[aR]{\Reals}{Real numbers} @@ -25,8 +34,8 @@ We will show that, for any $(a,b > 0) \in \Reals$,% I = \iInfInf{z}{\frac{1}{(a^2-z^2)^2 + b^2 z^2}} = \frac{\pi}{b a^2} \;. \end{equation} -First we note that $|f(z)| \rightarrow 0$ like $|z^{-4}|$ for $|z| \gg 1$, -and that $f(z)$ is even, so +First we note that $\abs{f(z)} \rightarrow 0$ like $\abs{z^{-4}}$ for +$\abs{z} \gg 1$, and that $f(z)$ is even, so \begin{equation} I = \iC{\frac{1}{(a^2-z^2)^2 + b^2 z^2}} \;, \end{equation} @@ -143,3 +152,5 @@ Applying \cref{eq:res-thm,eq:res-general} we have = \frac{\pi}{b a^2} \;, \label{eq:gen_int_crit} \end{align} which matches \cref{eq:gen-int-noncrit}. + +This result is used in \cref{eq:DHO-psd-int}. diff --git a/src/local_cmmds.tex b/src/local_cmmds.tex index 36131c3..df5d698 100644 --- a/src/local_cmmds.tex +++ b/src/local_cmmds.tex @@ -45,8 +45,10 @@ \newcommand{\Imags}{\ensuremath{\mathds{I}}} \newcommand{\Real}{\ensuremath{\operatorname{Re}}} \newcommand{\Imag}{\ensuremath{\operatorname{Im}}} -\newcommand{\Res}[2]{\operatorname{Res}\left({z=#1},{#2}\right)} -\newcommand{\limZ}[1]{\lim_{z \rightarrow {#1}}} +\newcommand{\ResX}[3]{\operatorname{Res}\left({{#1}={#2}},{#3}\right)} +\newcommand{\Res}[2]{\ResX{z}{#1}{#2}} +\newcommand{\limX}[2]{\lim_{{#1} \rightarrow {#2}}} +\newcommand{\limZ}[1]{\limX{z}{#1}} \newcommand{\limZp}{\limZ{z_p}} \newcommand{\CPV}{\ensuremath{\mathds{P}}} @@ -83,6 +85,7 @@ \newcommand{\kf}{\ensuremath{k(\fs)}} \newcommand{\kfs}[1]{\ensuremath{k_{#1}(\fs)}} %\newcommand{\avg}[1]{\ensuremath{\left\langle {#1} \right\rangle}} +\newcommand{\abs}[1]{\ensuremath{\lvert {#1} \rvert}} \newcommand{\logp}[1]{\ensuremath{\log\!\!\left( {#1} \right)}} % \! is a negative thin space to get the paren closer to the log %\renewcommand{\r}{\ensuremath{r_f}} diff --git a/src/pyafm/stack.tex b/src/pyafm/stack.tex index 4295422..dbca907 100644 --- a/src/pyafm/stack.tex +++ b/src/pyafm/stack.tex @@ -198,7 +198,7 @@ The fitted $d_\text{kink}$ is accepted unless: \begin{itemize} \item the fitted slope ratio - $|\sigma_{p,\text{c}}/\sigma_{p,\text{nc}}|$ is less than a + $\abs{\sigma_{p,\text{c}}/\sigma_{p,\text{nc}}}$ is less than a minimum threshold (which defaults to 10), or \item the fitted kink position $z_\text{kink}$ is within an excluded $z_\text{window}$ of the boundaries ($z_\text{window}$ defaults to -- 2.26.2