Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepVanlier committed Sep 11, 2024
1 parent 0e8d2a1 commit 3f17933
Show file tree
Hide file tree
Showing 17 changed files with 610 additions and 352 deletions.
66 changes: 66 additions & 0 deletions docs/theory/force_calibration/diode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Position sensitive detector
---------------------------

.. _diode_theory:

The previous section introduced the origin of the frequency spectrum of a bead in an optical trap.
In reality, our measurement is affected by two processes:

1. The motion of the bead in the trap.
2. The response of the detector to the incident light.

.. image:: figures/diode_filtering.png
:nbattach:

This second factor depends on the type of measurement device being used.
Typical position sensitive detectors are made of silicon.
Such a detector has a very high bandwidth for visible light (in the MHz range).
Unfortunately, the bandwidth is markedly reduced for the near infra-red light of the trapping laser :cite:`berg2003unintended,berg2006power`.
This makes it less sensitive to changes in signal at high frequencies.

Why is the bandwidth limited?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The high bandwidth of visible light detection of a silicon photodiode is achieved when incoming photons are absorbed in the so-called depletion layer of the diode.
Unfortunately, silicon has an increased transparency at the near infra-red wavelength of the trapping laser
What this means is that light penetrates deeper into the substrate of the diode, where it generates charge carriers in a different region of the diode.
These charge carriers then have to diffuse to the depletion layer, which takes time.
As a result, a fraction of the signal has a much slower dynamic response (i.e. a lower bandwidth).
In other words, a typical PSD is less sensitive to changes in signal at high frequencies.

.. image:: figures/diode.png
:nbattach:

This effect is often referred to as the parasitic filtering effect and is frequently modelled as a first order lowpass filter.
This model is characterized by two numbers whose values depend on the incident laser power :cite:`berg2003unintended`:

- A frequency `f_diode`, given in Hertz.
- A unit-less relaxation factor `alpha` which reflects the fraction of light that is transmitted instantaneously.

High corner frequencies
^^^^^^^^^^^^^^^^^^^^^^^

.. _high_corner_freq:

In literature, the diode parameters are frequently estimated simultaneously with the calibration data :cite:`berg2003unintended,hansen2006tweezercalib,berg2006power,tolic2006calibration,tolic2004matlab,berg2004power`.
Unfortunately, this can cause issues when calibrating at high powers.

Recall that the physical spectrum is characterized by a corner frequency `fc`, and diffusion constant `D`.
The corner frequency depends on the laser power and bead size (smaller beads resulting in higher corner frequencies).
The parasitic filtering effect also has a corner frequency (`f_diode`) and depends on the incident intensity :cite:`berg2003unintended`.

When these two frequencies get close, they cannot be estimated from the power spectrum reliably anymore.
The reason for this is that the effects that these parameters have on the power spectrum becomes very similar.
When working with small beads or at high laser powers, it is important to verify that the corner frequency `fc` does not approach the frequency of the filtering effect `f_diode`.

Sometimes, the parameters of this diode have been characterized independently.
In that case, the arguments `fixed_diode` and `fixed_alpha` can be passed to :func:`~lumicks.pylake.calibrate_force()` to fix these parameters to their predetermined values resolving this issue.

Mathematical background
^^^^^^^^^^^^^^^^^^^^^^^

In literature, it is frequently modelled up to good accuracy with a first order approximation :cite:`berg2003unintended,tolic2006calibration,berg2006power`.

.. math::
g(f, f_\mathrm{diode}, \alpha) = \alpha^2 + \frac{1 - \alpha ^ 2}{1 + (f / f_\mathrm{diode})^2} \tag{$-$}
3 changes: 3 additions & 0 deletions docs/theory/force_calibration/figures/diode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/theory/force_calibration/figures/diode_filtering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/theory/force_calibration/figures/hydro_fast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/theory/force_calibration/figures/sim_trap_opt.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 26 additions & 9 deletions docs/theory/force_calibration/fitting.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Fitting a power spectrum
------------------------

In the previous section, the physical origin of the power spectrum was introduced.
However, there are some practical aspects to consider.
So far, we have only considered the expectation value of the power spectrum.
In the previous sections, the physical origin of the power spectrum was introduced.
However, there are some additional practical aspects to consider.

So far, we have only considered the expected value of the power spectrum.
In reality, power spectral values follow a distribution.

The real and imaginary part of the frequency spectrum are normally distributed.
The real and imaginary part of the spectrum are normally distributed.
As a consequence, the squared magnitude of the power spectrum is exponentially distributed.

This has two consequences:

- Fitting the power spectral values directly using a simple least squares fitting routine, we would
Expand All @@ -27,17 +29,32 @@ There are two ways to perform such averaging:
spectral domain by averaging adjacent bins according to :cite:`berg2004power`. This procedure is
referred to as *blocking*.

We use the blocking method for spectral averaging, since this allows us to reject noise peaks at high
resolution prior to averaging. Note however, that the error incurred by this blocking procedure depends
on :math:`n_b`, the number of points per block, :math:`\Delta f`, the spectral resolution and inversely
on the corner frequency :cite:`berg2004power`.
Pylake uses the blocking method for spectral averaging, since this allows us to reject noise peaks
at high resolution prior to averaging (more on this later).
Note however, that the error incurred by this blocking procedure depends on :math:`n_b`, the number
of points per block, :math:`\Delta f`, the spectral resolution and inversely on the corner
frequency :cite:`berg2004power`.

Setting the number of points per block too low would result in a bias from insufficient averaging
Setting the number of points per block too low results in a bias from insufficient averaging
:cite:`berg2004power`. Insufficient averaging would result in an overestimation of the force response
(:math:`R_f`) and an underestimation of the distance response (:math:`R_d`). In practice, one should
use a high number of points per block (:math:`n_b \gg 100`), unless a very low corner frequency precludes this.
In such cases, it is preferable to increase the measurement time.

Noise floor
^^^^^^^^^^^

When operating at very low powers and corner frequencies, it is important to ensure that the
upper limit of the fitting range does not include the noise floor.

Noise peaks
^^^^^^^^^^^

Optical tweezers are precision instruments.
As such, it is not always possible to exclude all potential sources of noise.
One of the main advantages of power spectral analysis is that noise sources which are present
at particular frequencies can easily be excluded prior to analysis.

.. _goodness_of_fit:

Goodness of fit
Expand Down
44 changes: 37 additions & 7 deletions docs/theory/force_calibration/force_calibration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ Introduction
Why is force calibration necessary?
-----------------------------------

Optical tweezers typically measure forces and displacements by detecting deflections of a trapping
laser by a trapped bead. These deflections are measured at the back focal plane of the beam using
position sensitive detectors (PSDs).
Optical tweezers typically measure forces and displacements by detecting deflections of a trapping laser by a trapped bead.
These deflections are measured at the back focal plane of the beam using position sensitive detectors (PSDs).

.. image:: figures/back_focal.png
:nbattach:
Expand All @@ -30,15 +29,46 @@ and
Where :math:`V` is the position-dependent voltage signal from the PSD and :math:`R_d` and :math:`R_f`
are the displacement and force sensitivity proportionality constants, respectively.
Force calibration refers to computing these conversion factors.

Force calibration refers to computing the calibration factors needed to convert from raw voltages to actual forces and displacements.
The values we wish to calculate are:

- Trap stiffness :math:`\kappa`, which reflects how strongly a bead is held by a trap.
- Force response :math:`R_d`, the proportionality constant between voltage and force.
- Distance response :math:`R_f`, the proportionality constant between voltage and distance.

Several methods exist to calibrate optical traps based on sensor signals.
In this section, we will provide an overview of the physical background of power spectral calibration.

Why does the power spectrum look the way it does?
-------------------------------------------------
How can we calibrate?
---------------------

Consider a small bead suspended in fluid (no optical trapping taking place).
This bead moves around due to the random collisions of molecules against the bead.
This unimpeded movement is called free diffusion.
If there is no optical trap keeping it in place, the bead slowly drifts off from its starting position.

Now we introduce the optical trap.
The trap pulls the bead back to the laser focus.
The strength of this pull depends on how far the bead is from the focus (like a spring).

.. image:: figures/sim_trap_opt.gif
:nbattach:

This effectively limits the amplitude of motion away from the focus.
Consider again the frequency spectrum of diffusion.
What we saw was that the vertical axis is proportional to amplitude squared (or loosely speaking travelled distance).
We can now intuitively understand why the trap limits this amplitude and why this manifests itself as sharp reduction of amplitudes above a certain threshold.

Important takeaways
-------------------

- The spectrum of bead motion in a trap can be characterized by a diffusion constant and corner frequency.
- At low frequencies the trapping force dominates, limiting the amplitudes, while at high frequencies the drag on the bead does.

Mathematical background
-----------------------

Consider a small bead freely diffusing in a medium (no optical trapping taking place).
Neglecting hydrodynamic and inertial effects (more on this later), we obtain the following equation of motion:

.. math::
Expand Down
Loading

0 comments on commit 3f17933

Please sign in to comment.