Line 236: | Line 236: | ||
</div> | </div> | ||
<div class="page-section" id="12"> | <div class="page-section" id="12"> | ||
+ | <h2 id="analytic-solution">Analytic Solution</h2> | ||
+ | <p>Now to get a solution we can directly apply the integrating factor method as described in the Concepts sections.<br /> | ||
+ | <br /> | ||
+ | The integrating factor is: <br /><span class="math display"><em>μ</em>(<em>t</em>) = <em>e</em><sup><em>α</em><em>t</em></sup></span><br /> Multiplying both sides we have: <br /><span class="math display">$$\label{integrate} | ||
+ | \frac{\mathrm{d}}{\mathrm{d}t}\big(v\mathrm{e}^{\alpha t} \big) = \beta \mathrm{e}^{\alpha t}$$</span><br /> Now we integrate, divide by integrating factor, and impose an initial condition of <span class="math inline"><em>v</em>(<em>t</em> = 0) = 0 <em>m</em><em>s</em><sup> − 1</sup></span> (not moving initially): <br /><span class="math display">$$\label{v} | ||
+ | v(t) = \frac{\beta}{\alpha}\big(1 - \mathrm{e}^{-\alpha t} \big) \equiv \big(\frac{F_B- mg}{6\pi\eta R} \big)\big(1 - \mathrm{e}^{-\frac{6\pi \eta R}{m}t} \big)$$</span><br /> This is a closed form time-dependent solution for velocity.<br /> | ||
+ | <br /> | ||
+ | Now we integrate one more time and impose an initial condition of <span class="math inline"><em>z</em>(<em>t</em> = 0) = 0 <em>m</em></span>: <br /><span class="math display">$$\label{z} | ||
+ | z(t) = \bigg(\frac{F_B - mg}{g\pi\eta R} \bigg)\bigg(t + \frac{m}{6\pi \eta R}\big(\mathrm{e}^{-\frac{6 \pi \eta R}{m}t} - 1 \big) \bigg)$$</span><br /> Finally, we have a closed form time-dependent solution for vertical displacement.<br /> | ||
+ | <br /> | ||
+ | <strong>NB:</strong> <span class="math inline"><em>m</em>, <em>g</em>, <em>η</em>, <em>R</em></span> are considered to be known, empirical constants. <span class="math inline"><em>F</em><sub><em>B</em></sub></span> is left as a parameter that can be determined in a curve fit regression to a time-series of vertical displacement data for a floating biomass.</p> | ||
+ | </div> | ||
+ | <div class="page-section" id="13"> | ||
+ | <h2 id="determining-buoyant-force-temporal-tracking-algorithm">Determining Buoyant Force: Temporal Tracking Algorithm</h2> | ||
+ | <p>Now that we have an expression for vertical displacement as a function of time which depends on the buoyant force as a parameter, we want to determine the magnitude of this buoyant force. In principle, this is not a difficult task as it can be solved using the built-in least-squares optimization curve-fit functions, in say, MATLAB. The difficulty lies in acquiring experimental data to fit to. Our proposed solution to this is to acquire images from a stationary point of view at evenly spaced, small time intervals and perform image segmentation and analysis techniques to track the vertical position of floating biomass frame-to-frame. In reality, the biomass will be clumped into many clusters, so clustering and labeling algorithms are employed. The advantage of using a visual tracking algorithm to observe vertical displacement is that researchers can exactly characterize flotation, benchmark their results, and calculate how different variables affect flotation.</p> | ||
+ | |||
+ | |||
+ | <figure> | ||
+ | <img src="1.jpg" alt="Cultured E. coli expressing RFP" id="fig:sub1" /><figcaption>Cultured <em>E. coli</em> expressing RFP<span label="fig:sub1"></span></figcaption> | ||
+ | </figure> | ||
+ | |||
+ | <figure> | ||
+ | <img src="Segmented.png" alt="Binarized ROI" id="fig:sub2" /><figcaption>Binarized ROI<span label="fig:sub2"></span></figcaption> | ||
+ | </figure> | ||
+ | |||
+ | <figure> | ||
+ | <img src="unfiltlabel.png" alt="Labeled ROI" id="fig:sub3" /><figcaption>Labeled ROI<span label="fig:sub3"></span></figcaption> | ||
+ | </figure> | ||
+ | <p>Below is pseudo-code for a stochastic temporal tracking algorithm that is intended to maintain consistent cluster labeling from frame-to-frame and account for clusters combining and splitting. The time interval between frames should be chosen to be sufficiently small such that the probability of more than one binding/un-binding events occurring between any two frames can be assumed to be zero.</p> | ||
+ | <ul> | ||
+ | <li><p>Load directory with images.</p></li> | ||
+ | <li><p>For <span class="math inline"><em>i</em></span> up to number of frames (i.e. time steps):</p> | ||
+ | <ul> | ||
+ | <li><p>Read pixel data from image file.</p></li> | ||
+ | <li><p>Manually set crop margins to ROI encapsulating the region of flotation. (apply same cropping margins in subsequent frames programatically).</p></li> | ||
+ | <li><p>Convert from RGB to grayscale, perform thresholding using Otsu’s method.</p></li> | ||
+ | <li><p>Binarize image based off of threshold, segmentation complete.</p></li> | ||
+ | <li><p>Cluster and label binary image.</p></li> | ||
+ | <li><p>Centroid clusters. Store labels <span class="math inline"><em>j</em> = 1, 2, 3, ..., <em>N</em></span>, positions <span class="math inline">(<em>x</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>, <em>y</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>)</span>, and approximate radius for each of the <span class="math inline"><em>N</em></span> objects identified in segmentation. Note that the radius is updated at each step to account for changes in cluster morphology affecting magnitude of drag force at each time step.</p></li> | ||
+ | <li><p>if <span class="math inline"><em>i</em> > 1</span>:</p> | ||
+ | <ul> | ||
+ | <li><p>For all <span class="math inline"><em>N</em></span> labels <span class="math inline"><em>j</em></span> in frame <span class="math inline"><em>i</em></span> find position <span class="math inline">(<em>x</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>, <em>y</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>)</span> with <span class="math inline"><em>y</em><sub><em>i</em></sub> ≥ <em>y</em><sub><em>i</em> − 1</sub></span> s.t. the distance <span class="math inline"><em>d</em>((<em>x</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>, <em>y</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>), (<em>x</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>, <em>y</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>))</span> is minimized.</p></li> | ||
+ | <li><p>The label <span class="math inline"><em>j</em></span> in the <span class="math inline"><em>i</em><sup><em>t</em><em>h</em></sup></span> frame is considered to be a child of the label <span class="math inline"><em>j</em>′</span> in the <span class="math inline">(<em>i</em> + 1)<sup><em>t</em><em>h</em></sup></span> frame.</p></li> | ||
+ | <li><p>End if-statement.</p></li> | ||
+ | </ul></li> | ||
+ | <li><p>End for-loop.</p></li> | ||
+ | <li><p>Define function handle for solution to ODE model for buoyancy.</p></li> | ||
+ | <li><p>Convert cluster tracking data from pixels to spacial units (based on pixel size of image), curve-fit to each set of cluster branches.</p></li> | ||
+ | <li><p>Take average of curve-parameter determination of <span class="math inline"><em>F</em><sub><em>B</em></sub></span> for each branch, analyze distribution, significance of fit, variance of mean.</p></li> | ||
+ | </ul></li> | ||
+ | </ul> | ||
+ | <p>But wait! We passively assumed that the number of clusters <span class="math inline"><em>N</em><sup>′</sup></span> in frame <span class="math inline"><em>i</em> − 1</span> was greater than the number of clusters <span class="math inline"><em>N</em></span> in frame <span class="math inline"><em>i</em></span>. Not to worry, small modification...</p> | ||
+ | <ol> | ||
+ | <li><p><span class="math inline"><em>N</em> = <em>N</em><sup>′</sup></span>:</p> | ||
+ | <ul> | ||
+ | <li><p>If this is the case, the logic holds and we simply have a child label <span class="math inline"><em>j</em><sup>′</sup></span> that is mapped to parent label <span class="math inline"><em>j</em></span>.</p></li> | ||
+ | </ul></li> | ||
+ | <li><p><span class="math inline"><em>N</em> > <em>N</em><sup>′</sup></span>:</p> | ||
+ | <ul> | ||
+ | <li><p>Physically, this corresponds to a cluster splitting.</p></li> | ||
+ | <li><p>How do we handle this? No modification of the pseudo-code algorithm is needed. There will simply be two objects with labels <span class="math inline"><em>j</em><sub>1</sub>, <em>j</em><sub>2</sub></span>, respectively, to which some <span class="math inline"><em>j</em><sup>′</sup></span> is mapped to. A <em>branch</em> in the tracking tree.</p></li> | ||
+ | </ul></li> | ||
+ | <li><p><span class="math inline"><em>N</em> < <em>N</em><sup>′</sup></span></p> | ||
+ | <ul> | ||
+ | <li><p>Non-trivial case.</p></li> | ||
+ | <li><p>Switch search: For all <span class="math inline"><em>N</em><sup>′</sup></span> labels <span class="math inline"><em>j</em><sup>′</sup></span> in frame <span class="math inline"><em>i</em> + 1</span> find position <span class="math inline">(<em>x</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>, <em>y</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>)</span> with <span class="math inline"><em>y</em><sub><em>i</em></sub> ≥ <em>y</em><sub><em>i</em> − 1</sub></span> s.t. the distance <span class="math inline"><em>d</em>((<em>x</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>, <em>y</em><sub><em>i</em> − 1</sub><sup>(<em>j</em><sup>′</sup>)</sup>), (<em>x</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>, <em>y</em><sub><em>i</em></sub><sup>(<em>j</em>)</sup>))</span> is minimized.</p></li> | ||
+ | <li><p>There will exist a label <span class="math inline"><em>j</em></span> in the <span class="math inline"><em>i</em><sup><em>t</em><em>h</em></sup></span> frame such that two labels <span class="math inline"><em>j</em><sub>1</sub><sup>′</sup>, <em>j</em><sub>2</sub><sup>′</sup></span> in the <span class="math inline">(<em>i</em> + 1)<sup><em>t</em><em>h</em></sup></span> frame map to it. In other words, two clusters combine.</p></li> | ||
+ | </ul></li> | ||
+ | </ol> | ||
+ | <p>Note: The position tracking effectively forms a directed acyclic graph (DAG)</p> | ||
+ | <figure> | ||
+ | <img src="DAG_tracking_example_cropped.png" alt="[fig:DAG2]A few potential layers of a simple example with 3 initial clusters (nodes) to illustrate the 3 cases." style="width:10cm" /><figcaption><span id="fig:DAG2" label="fig:DAG2">[fig:DAG2]</span>A few potential layers of a simple example with 3 initial clusters (nodes) to illustrate the 3 cases.</figcaption> | ||
+ | </figure> | ||
+ | </div> | ||
+ | <div class="page-section" id="14"> | ||
<h1>Test</h1> | <h1>Test</h1> | ||
<p> | <p> |
Revision as of 23:22, 15 October 2018
1. Introduction
Our goal in the dry lab this year was to create four different models that allow our wet lab team to characterize their results, and allow future researchers to benchmark their results creating standard measures in the field of cellular flotation. First, we created a generic differential bioreactor model that allowed our team to predict the effectiveness of our E. coli cells to clean waste-waters if coupled with any surface binding method. We performed a complete sensitivity analysis on this model to allow future researchers to reuse this model with completely different parameters, strains of bacteria and object of waste. Then we created an algorithm that can track cellular flotation from frame to frame, and characterize exactly how the cells float; previously, we could only tell whether they floated or not. This coupled with our ODE buoyancy model allows us to define a maximum carrying capacity for each strain. Both of these models allowed our team to benchmark their results and will allow future researchers to quantify the performance of flotation as well.
Note: In the very end of this paper, we included a nomenclature defining all the variables used.
A Differential Bioreactor Model
2.1 Goals
Explore a possible application for our genetically engineered E. coli biomass that utilizes flotation.
Develop a generic bioreactor that can be reused in many different conditions and for a variety of purposes.
Mathematical Formulation
Concepts
Monod Equation
In order to run a bioreactor, we need to understand at what rate the E. coli grow, and how they respond to environmental conditions. Bacterial growth can be separated into four phases:
The Lag Phase: Little growth is observed.
The Exponential Phase: Exponential growth is observed after the cells get used to their environment, and so long as the limiting substrate is still in surplus.
The Stationary Phase: No growth is observed, death rate and growth rate are approximately equal.
Death Phase: There is no more substrate, thus the population dies.
If N is the concentration of biomass population, then the exponential growth phase is given by:
Ṅ = μN
where μ is the specific growth rate, the “rate of increase of cell concentrations per unit cell concentration” (h − 1) . μ depends on the substrate concentration; the relation is given by the Monod equation:
$$\mu(S) = \mu_m \frac{S}{K_S + S}$$
where S is the substrate concentration (in mol L − 1) , and KS is the Monod Constant (in mol L − 1). As substrate is consumed, more biomass is being created at the rate of:
$$\frac{dN}{dS} = -\gamma \frac{dS}{dt}$$
where t is time. γ should be interpreted as “the ratio of the mass of cells formed to the mass of substrate consumed” .
The Model
Call the ’Main Reactor’ (M.R) and the ’Flotation Tank’ (F.T). Let Xu be the concentration of E. coli (in mol L − 1), Xw the concentration of particle bound to the surface of the E. coli (in mol L − 1). Below we will outline the steps of the bioreactor seen in Figure 1.
All the substrate, waste and cellular population is homogeneously distributed between the F.T and the M.R. Initially there is no particle bound to any of the cells, i.e Xw = 0.
When activated, the bioreactor begins to pump solution from the M.R to the F.T at rate D, this is represented by D(N + Xu + Xw + S).
In the F.T, the cells are floating on the surface, and are scraped off and removed. Thus only Xu and S remain within the solution, which is pumped back into M.R at rate D. In practice, a cellular filter alike the one used for skimming could be placed at the exit of the F.T to capture any dead cells.
Within M.R the unbound particle binds to the E. coli with some rate constant α, and detaches with some rate β (equilibrium process).
This process operates until the particle concentration is as low as desired.
Bioreactor Assumptions
Our cell surface engineering technique has specificity to only one substance in the waste-water (i.e. the substance desired for removal).
We will only observe exponential bacterial growth within the reactor, i.e. the biomass has been cultured to sufficiently large optical density before being introduced into the bioreactor.
Suspended particles attach to the surface of our E. coli at a rate proportional to the particle concentration and the ratio of unused area available on the surface.
Bound particles detach from the surface of our E. coli back into the waste-water at a rate proportional to the particle concentration bound to the E. coli.
Once the E. coli that are pumped out of the main chamber end up in the flotation tank, they are immediately removed – no more growth nor unbinding of particle occurs.
We ignore all the spatial properties of pipes between the main reactor and flotation tank, as soon as part of the solution leaves the main take, it immediately arrives in the flotation tank, and vice versa.
The pipe leading into the flotation tank sprinkles the solution over the flotation tank so lightly that the E. coli cells do not sink into the tank – they float on the surface, allowing for immediate removal.
The solution within the main reactor is continuously mixed; it can be considered a homogeneous solution).
All the E. coli in the flotation tank float.
A higher dilution rate (D) does not affect the detachment rate.
2.3 Equations
The dynamics within the bioreactor are given by:
$$\begin{aligned}
\dot{N} &= N_i \mu (S) - N \cdot \left( D + \kappa \right) \label{N}\\
\dot{S} &= -\mu (S) N \gamma^{-1} \label{S}\\
\dot{X}_u &= \beta X_w - \alpha X_u \cdot \left(\frac{\delta N - X_w}{\delta N} \right) \label{Xu}\\
\dot{X}_w &= - \beta X_w + \alpha X_u \cdot \left(\frac{\delta N - X_w}{\delta N} \right) - D X_w \label{Xw}\end{aligned}$$
Where, κ is the death rate, δ the maximum carrying capacity of the cells, α the rate constant for binding, β the rate constant for unbinding.
Equation [N] represents the change in E. coli cell concentration, equation [S] represents the change in limiting substrate concentration, equation [Xu] represents the change in unbound particle concentration, and equation [Xw] represents the change in concentration of particle bound to the surface of the E. coli.
In equation [Xu] we have βXw which represents particle unbinding from the E. coli population, it depends on β: the kinetic detachment rate, and Xw: the concentration of particle that is bound to the surface of the E. coli. We are also removing particle from the solution by $\alpha X_u \cdot \left(\frac{\delta N - X_w}{\delta N} \right)$. This depends on the kinetic binding rate α, the concentration of unbound particle within the solution (Xu), and the proportion of available binding sites on the E. coli, this is represented by $\left(\frac{\delta N - X_w}{\delta N} \right)$. Equation [Xw] is the negative of equation [Xu] but we also remove Xw at some dilution rate D.
Numerical Solution
We numerically solved the ODE system composed of equations [N] - [Xw] using the ODE45 solver in MATLAB (see the end of the paper of the MATLAB code), using the initial conditions Ni = 0.4, S = 0.63, Xu = 0.5, Xw = 0 and parameters:
2
γ = 1.1 (unitless)
κ = 0.01 h − 1
D = 3 h − 1
β = 0.03 h − 1
α = 1.5 h − 1
μm = 0.8 h − 1
Ks = 2.87 × 10 − 7 mol L − 1
δ = 1.5 (unitless)
The above simulation was done for removing Cobalt from mining waste-water effluent. It utilizes a metal binding mechanism outlined in which gave us a range of viable α. We got Ks and μm from , β, and κ from . We estimated reasonable values for D, γ. See §3.5 for calculating the value of δ.
These results are incredibly promising. They show that the bioreactor can theoretically be useful at solving real problems, and that it operates within a reasonable amount of time (6.5 hours).
Sensitivity Analysis
In order to understand the dynamics within the bioreactor, we performed a sensitivity analysis that estimates the relative effect of a single parameter on the performance of the system. Unfortunately, it is not possible to define an explicit function relating the different parameters to each other, we must perform a ’naive’ analysis; we vary one parameter while holding all other constant, and see how this change affects the performance of the system. Performance is measured by how long it takes the bioreactor to remove the large majority of the particle that is desired for bioremediation. We set some small ε = 10 − 4mol L − 1 to define a low threshold of acceptable particle concentration. For §2.5.1 - §2.5.6, we kept all the parameters at:
2
γ = 1.1 (unitless)
κ = 0.01 h − 1
D = 3 h − 1
β = 0.03 h − 1
α = 1.5 h − 1
μm = 0.8 h − 1
Ks = 2.87 × 10 − 7 mol L − 1
δ = 1.5 (unitless)
and only varied the parameter whose effect was measured.
The Effect of Dilution Rate on Bioreactor Performance
(See Figure 3) The higher the dilution rate, the better the performance. Above dilution rate D = 1 it slowly approaches an asymptote. We should not have a D that is too large because it is energy costly. Also, a larger D leads to faster deterioration of the bioreactor.
The Effect of Initial Metal Concentration on Bioreactor Performance
(See Figure 4) The higher the initial metal concentration within the bioreactor, the longer it takes to operate.
The Effect of Attachment Rate on Bioreactor Performance
(See Figure 5) The higher the attachment rate (α), the better the performance of the system. It does approach an asymptote quite quickly though. This is because of the maximum carrying capacity, at some point, there is just no more available space on the E. coli surface to bind more particle, regardless of the attachment rate.
The Effect of Detachment Rate on Bioreactor Performance
(See Figure 6) The lower the detachment rate (β), the better the performance of the system.
The Effect of Initial Cellular Population on Bioreactor Performance
(See Figure 7) The higher the initial E. coli population (Ni), the better the system performs. After some Ni ≈ 1, it approaches an asymptote.
The Effect of Maximum Specific Growth Rate on Bioreactor Performance
(See Figure 8) The higher the maximum specific growth rate, the better the performance of the system.
Hypothetical Applications
The numerical simulations above were all based on parameters values specific to cobalt removal from mining waste-water. If the E. coli are coupled with a binding mechanism that is not specific to cobalt, then this generic bioreactor can be used for a large variety of applications (one simply has to change α and β). One very promising application is the removal of pharmaceuticals, such as penicillin, from municipal waste-water. The reactor is viable for many different binding methods, strains of E. coli, and initial concentrations of waste, as displayed in §2.5. This reactor is independent of volume, all the parameters are relative to each other, this system would perform the same with 1 L of effluent as with 1 × 1010 L of effluent. Evidently, the size of the chambers would need to be scaled appropriately.
A Mechanistic Buoyancy Model: Maximum Carrying Capacity Determination
Goal
The buoyancy model has 2 main goals:
Estimate the mean buoyant force experienced by the genetically engineered E. coli biomass per unit mass as a result of gas vesicle formation from ARG1 over-expression. This effectively determines a mechanical upper bound for carrying capacity of the biomass.
Characterize and quantify flotation observations from wet lab experimentation. It is not well known what the role of some of the secondary gas vesicle proteins (GVPs) in the ARG1 construct is for gas vesicle formation, and being able to quantify flotation facilities comparison of different combinations of secondary GVPs for optimization of a gene construct specifically engineered for biomass flotation.
Mathematical Formulation
Concepts
Newtonian mechanics: $\vec{F} = m\vec{a} \equiv m\frac{\mathrm{d}\vec{v}}{\mathrm{t}}$
F⃗≡ vector sum of forces on body
m≡ mass of body
a⃗≡ acceleration as a function of time
v⃗≡ velocity as a function of time
Stokes-Einstein Drag: $\vec{F_D} = -6\pi \eta R \vec{v}$
$\vec{F_D} \equiv$ drag force (note it opposes direction of velocity)
η≡ viscosity of fluid medium
R≡ (approximate) radius of body in spherical approximation.
Integrating factor method to solve first order linear ODE:
$$\label{ODE} \frac{\mathrm{d}y}{\mathrm{d}t}+f(t)y = g(t)$$
Let μ(t) = eβt. Multiply both sides by μ(t).
Chain rule $\implies \frac{\mathrm{d}}{\mathrm{d}t}\big(y(t)\mu(t)\big) = h(t)\mu(t)$
Integrate, divide by μ(t) ⟹ y(t).
Assumptions
The biomass separates into clumps that can be approximated by spheres.
Buoyant force is constant.
Cell motility and in-plane motion (motion perpendicular to the vertical axis) is negligible. This effectively reduces our system to one dimension.
The Model
Stokes-Einstein, gravitational force near the surface of the earth Fg = mg (g ≈ 9.81 ms − 2), Newton’s second law lets us us write:
$$\label{Fnet}
F_{net} = F_g + F_B + F_D \implies m\frac{\mathrm{d}v}{\mathrm{d}t} = -mg + F_B - 6\pi \eta R v$$
Rearrange...
$$\label{theODE}
\frac{\mathrm{d}v}{\mathrm{d}t} + \frac{6\pi \eta R}{m}v = \big(\frac{F_B}{m} - g\big)$$
Simplify notation with $\alpha \coloneqq \frac{6\pi \eta R}{m}$ and $\beta \coloneqq \big(\frac{F_B}{m} - g\big)$ we have:
$$\frac{\mathrm{d}v}{\mathrm{d}t} + \alpha v = \beta$$
Observe the model is now in the form of equation [ODE].
Analytic Solution
Now to get a solution we can directly apply the integrating factor method as described in the Concepts sections.
The integrating factor is:
μ(t) = eαt
Multiplying both sides we have:
$$\label{integrate}
\frac{\mathrm{d}}{\mathrm{d}t}\big(v\mathrm{e}^{\alpha t} \big) = \beta \mathrm{e}^{\alpha t}$$
Now we integrate, divide by integrating factor, and impose an initial condition of v(t = 0) = 0 ms − 1 (not moving initially):
$$\label{v}
v(t) = \frac{\beta}{\alpha}\big(1 - \mathrm{e}^{-\alpha t} \big) \equiv \big(\frac{F_B- mg}{6\pi\eta R} \big)\big(1 - \mathrm{e}^{-\frac{6\pi \eta R}{m}t} \big)$$
This is a closed form time-dependent solution for velocity.
Now we integrate one more time and impose an initial condition of z(t = 0) = 0 m:
$$\label{z}
z(t) = \bigg(\frac{F_B - mg}{g\pi\eta R} \bigg)\bigg(t + \frac{m}{6\pi \eta R}\big(\mathrm{e}^{-\frac{6 \pi \eta R}{m}t} - 1 \big) \bigg)$$
Finally, we have a closed form time-dependent solution for vertical displacement.
NB: m, g, η, R are considered to be known, empirical constants. FB is left as a parameter that can be determined in a curve fit regression to a time-series of vertical displacement data for a floating biomass.
Determining Buoyant Force: Temporal Tracking Algorithm
Now that we have an expression for vertical displacement as a function of time which depends on the buoyant force as a parameter, we want to determine the magnitude of this buoyant force. In principle, this is not a difficult task as it can be solved using the built-in least-squares optimization curve-fit functions, in say, MATLAB. The difficulty lies in acquiring experimental data to fit to. Our proposed solution to this is to acquire images from a stationary point of view at evenly spaced, small time intervals and perform image segmentation and analysis techniques to track the vertical position of floating biomass frame-to-frame. In reality, the biomass will be clumped into many clusters, so clustering and labeling algorithms are employed. The advantage of using a visual tracking algorithm to observe vertical displacement is that researchers can exactly characterize flotation, benchmark their results, and calculate how different variables affect flotation.
Below is pseudo-code for a stochastic temporal tracking algorithm that is intended to maintain consistent cluster labeling from frame-to-frame and account for clusters combining and splitting. The time interval between frames should be chosen to be sufficiently small such that the probability of more than one binding/un-binding events occurring between any two frames can be assumed to be zero.
Load directory with images.
For i up to number of frames (i.e. time steps):
Read pixel data from image file.
Manually set crop margins to ROI encapsulating the region of flotation. (apply same cropping margins in subsequent frames programatically).
Convert from RGB to grayscale, perform thresholding using Otsu’s method.
Binarize image based off of threshold, segmentation complete.
Cluster and label binary image.
Centroid clusters. Store labels j = 1, 2, 3, ..., N, positions (xi(j), yi(j)), and approximate radius for each of the N objects identified in segmentation. Note that the radius is updated at each step to account for changes in cluster morphology affecting magnitude of drag force at each time step.
if i > 1:
For all N labels j in frame i find position (xi − 1(j′), yi − 1(j′)) with yi ≥ yi − 1 s.t. the distance d((xi − 1(j′), yi − 1(j′)), (xi(j), yi(j))) is minimized.
The label j in the ith frame is considered to be a child of the label j′ in the (i + 1)th frame.
End if-statement.
End for-loop.
Define function handle for solution to ODE model for buoyancy.
Convert cluster tracking data from pixels to spacial units (based on pixel size of image), curve-fit to each set of cluster branches.
Take average of curve-parameter determination of FB for each branch, analyze distribution, significance of fit, variance of mean.
But wait! We passively assumed that the number of clusters N′ in frame i − 1 was greater than the number of clusters N in frame i. Not to worry, small modification...
N = N′:
If this is the case, the logic holds and we simply have a child label j′ that is mapped to parent label j.
N > N′:
Physically, this corresponds to a cluster splitting.
How do we handle this? No modification of the pseudo-code algorithm is needed. There will simply be two objects with labels j1, j2, respectively, to which some j′ is mapped to. A branch in the tracking tree.
N < N′
Non-trivial case.
Switch search: For all N′ labels j′ in frame i + 1 find position (xi(j), yi(j)) with yi ≥ yi − 1 s.t. the distance d((xi − 1(j′), yi − 1(j′)), (xi(j), yi(j))) is minimized.
There will exist a label j in the ith frame such that two labels j1′, j2′ in the (i + 1)th frame map to it. In other words, two clusters combine.
Note: The position tracking effectively forms a directed acyclic graph (DAG)
Test