\documentclass[10pt]{article}
\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}
\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
\errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother
\usepackage[round]{natbib}
\let\cite\citep
\renewenvironment{abstract}
{{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
{\bigskip}
\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}
\usepackage{authblk}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
\title{Stochastic swimming model and pair simulations}
\author[1]{Jacob Davidson}%
\affil[1]{Affiliation not available}%
\vspace{-1em}
\date{\today}
\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup
\sloppy
\section{Stochastic model
description}
{\label{167712}}
Here we formulate a model that is based on the persistant turning walker
(PTW) model~\cite{Gautrais_2008,Gautrais_2012}, an extension to this model that includes
changes in speed~\cite{Zienkiewicz_2014}.~ We use this framework and adapt
the zonal model of collective movement~\cite{COUZIN_2002,Ioannou_2012,Couzin_2005} ~to simulate
using the PTW equations, and incorporate a zonal rule for individuals to
adjust their speed based on social interactions.~ We simulated this
model in different cases, which correspond to pairs of parasitized and
non-parasitized fish swimming together, to ask if observed differences
in behavior are due to different social responses, or simply due to
different swimming abilities.~ We show that apparent differences in
social behavior can be explained simply by physical differences in
turning inertia and acceleration speeds.
\par\null
\subsection{Stochastic model and parameter
selection}
{\label{454722}}\par\null
The PTW model represents turning and speeding changes via an Ornstein-Uhlenbeck stochastic process. We first describe these equations and a procedure for the parameters can be chosen by swimming data. Then in the subsequent section we define functions to represent social forces.
To begin, let $s$ be speed and $\omega$ be angular velocity.
The equations of motion are
\begin{align}
ds &= \frac{1}{\tau_s}\left(\mu-s\right) dt + \sigma_s dW_s(t) \notag \\
d \omega &= -\frac{\omega}{\tau_\omega} dt + \sigma_\omega dW_\omega(t)
\label{eq:ptw-basic}
\end{align}
The dynamics are thus described by five parameters: $\mu$ is the average speed, $\tau_s$ is the speed autcorrelation time, $\sigma_s$ is the noise amplitude for speed changes,
$\tau_\omega$ is the turning autocorrelation time, and $\sigma_\omega$ is the noise amplitude for turning changes.
Note that here, for simplicity, we have neglected decreased angular velocity with speed that was used by \cite{Zienkiewicz_2014}.
Noise is represented by a Wiener processes $W_s$ and $W_\omega$ for speed and angular velocity, respecitively.
We can choose values for the parameters that are representative of
typical swimming motion.~ Using the procedure described by
\cite{calibrating}, we will use a simple linear regression formulation
to fit the parameters to swimming data.~ Although
Eq.~~{\ref{eq:ptw-basic}} neglects wall forces and
social effects, the fit procedure leads to parameters choices within a
reasonable ranges, which we will use in subsequent simulations.
Over a single time step of length $\Delta t$, the solution for the speed equation is
\begin{equation}
s_{t+1} = s_{t}e^{-\Delta t/\tau_s} + \mu\left(1-e^{-\Delta t/\tau_s} \right) + \sigma_s \sqrt{\frac{1-e^{-2 \Delta t/tau_s}}{2/tau_s}} N_{0,1},
\end{equation}
where $s_{t+1}$ is speed at the next time step, $s_t$ is speed at the current time step, and $N_{0,1}$ is a standard normal distribution.
To determine parameter values using a the least-squares fit, consider a linear regression of the form $s_{t+1} = m s_{t}+b$, and using $\left(s_{t+1},s_t\right)$ pairs from the data, fit the values of $m$ and $b$ by minimizing the mean square error
\begin{equation}
E = \left< \left(s_{t+1} - m s_t - b \right)^2 \right>,
\end{equation}
where $\left< \cdot \right>$ represents an average over time steps.
From this, the parameters in the governing equation can be set as
\begin{align}
\tau_s &= -\frac{\Delta t}{\ln m} \notag \\
\mu &= \frac{b}{1-m} \notag \\
\sigma_s &= \sqrt{ -E \frac{2\ln{m}}{\Delta t(1-m^2) } }.
\end{align}
Note that alternatively, a maximum likelihood fit can be used \cite{calibrating}. For speed changes, this is used to determine values for parameters $\tau_s$, $\mu$, and $\sigma_s$. For turning changes, to obtain values for $\tau_\omega$ and $\sigma_\omega$, the procedure is identical except that the average turning rate is set to zero due to symmetry.
\par\null
Fig 1B shows the histogram of fit parameter values obtained by fitting
to each fish individually.~ Note that since this model
(Eq.~{\ref{eq:ptw-basic}}) does not consider wall
effects or social forces, the parameter values fit using the above
described procedure do not form a well-defined comparison between
different fish.~ Instead, we use the following observations about the
range of fit parameter values shown in Fig 1B~ to make representative
choices for our simulations.~ First, \ldots{} (autocorr times).~ Choose
tau\_s/tau\_w = 10, and consider tau\_s = 1 as setting time scale.~
similarly, can set mu=1, to define length scale.~ For noise, set
sigma\_omega = 0.4 (or 0.3?).~ We will use different values of
sigma\_s:~ 0 (no noise), and 0.3.
\par\null
** Fig 1B should express length in ``body lengths''
\par\null
\subsection{Social model}
{\label{722034}}
To represent changes in speed and turning according to social interactions, we use a modified form of zonal model (Couzin 2002, Ioannou 2012, Couzin 2005). The equations of motion for an individual $i$ depends on its neighbors $\{j\}$. The equations of motions are:
\begin{align}
ds_i &= \frac{1}{\tau_s}\left(\mu+\alpha_s Z - s\right) dt + \sigma_s dW_s(t) \notag \\
d \omega_i &= \frac{1}{\tau_\omega}\left(\alpha
\hat{\mathbf{v}}_i\times \hat{\mathbf{d}}_Z
-\omega \right) dt + \sigma_\omega dW_\omega(t),
\label{eq:ptw-social}
\end{align}
where $Z=Z(\{\mathbf r_j\})$ is a function for changes in speed based on the surrounding positions of neighbors, $\hat{\mathbf{d}}_Z=\hat{\mathbf{d}}_Z(\{\mathbf r_j,\hat{\mathbf{v}}_j\})$ is the desired motion direction from the zonal model, $\alpha_s$ and $\alpha$ are social weighting factors for speed and turning, respectively, and $\mathbf r_i$ and $\hat{\mathbf{v}}_i$ are the position vector and the unit velocity vector of agent $i$.
The preferred direction from the zonal model, $\hat{\mathbf{d}}_Z$, is determined by considering the neighbors in a repulsion zone and in a social zone, as detailed in [[Ioannoau 2012]]. We define a form for social speed changes ($Z$), which uses the zonal representation. Motivated by [[Katz 2011]], where it was seen that changes in speed based on relative position depend mostly on front-back position, we propose the model shown schematically in Fig \ref{117805}. For a single neighbor, the focal fish slows down if the other fish is immediately in front in the repulsion zone, and speeds up if immediately behind. If the other fish is ahead in the social zone, the focal speeds up, and if the other is behind in the social zone, the focal fish slows down. To generalize this to multiple neighbors, if any neighbors exist in the repulsion zone, then $Z$ is determined as $-1$ times the sign of the average front-back position of the neighbors. If there are no neighbors in the repulsion zone, then the value of $Z$ is the sign of the average front-back position of neighbors in the positive and negative social speed zones of Fig \ref{117805}.\selectlanguage{english}
\begin{figure}[h!]
\begin{center}
\includegraphics[width=0.28\columnwidth]{figures/zonal-model-illustration/zonal-model-illustration}
\caption{{Zonal model illustration, showing the form for changes in speed
{\label{117805}}%
}}
\end{center}
\end{figure}
\section{Simulation results}
{\label{952884}}
\subsection{Differences in preferred
speed}
{\label{167445}}
We use simulations to predict the influence of differences in average
speed, differences in turning ability, and social changes in speed, on
the relative distributions of the two fish.
\par\null
The first case is a ``null case'', based on what we already expect:~
when the two fish differ in average speed, then the faster fish will be
the leader.~ To demonstrate the model agrees with this expected result,
we simulate, using an intermediate value of social interaction,
\textbackslash{}alpha=0.8, and a realistic value for turning noise,
sigma\_turn = 4.~ And some uncorrelated changes in speed, with
sigma\_speed=0.1
(A) different mean speed
(B) different mean speed, plus speed noise and social changes in speed
For case (A), we find the expected result that for larger differences in
average speed between the fish, the faster fish acts more as the
``leader'' because it is more often in front.~ The average front-back
distance, as well as the difference in alignment and the distance apart,
increase for larger differences in speed (Figure Speed-A).
(C) Same mean speed
\par\null
To examine a more realistic case, we look at the same differences in
average speed, but now include changes in speed based on social
interactions, with the weight determined by the parameter
\textbackslash{}alpha\_s = 0 (shown above), 0.4, 0.8 (i.e. consider 3
values).~ With social adaptation to speed changes, \ldots{}
- the actual average speed of each is shifted from the preferred average
speed of \textbackslash{}mu\_i for each, because each tries to adapt
with the other (Fig Speed-B)
- the leader-follower and differences in alignment due to mean preferred
speed differences decrease.
\par\null
FIGURE
\par\null
\subsection{Differences in turning and acceleration
ability}
{\label{351946}}
Being parasitized affects the swimming ability of a fish, in particular
its ability to accelerate and turn quickly.~ Using the simulation model,
we ask if we can expect leader-follower differences~ if the two fish
differ in their ability to turn.~ In the model, this is represented by
the parameter~\(\tau_\omega\), which determines the autocorrelation
time for changes in angular velocity.~ A reduced ability to turn is
represented by a higher value of~~\(\tau_\omega\), i.e. it takes
longer to change angular velocity.~~
\par\null
We examine the cases
(A) Same mean speed.~ Include sigma\_speed = 0.1.~
\textbackslash{}alpha\_s = 0 (no social speed changes).~ then increase
tau\_ratio just for tau\_omega
(B) Same mean speed, but include social speed changes, using the values
above.~ Keep tau\_omega and tau\_s the same, but give the fish different
values of alpha\_S - just for acceleration?
(C) Same mean speed, and include social speed changes same as B. But now
adjust both tau\_s and different alpha\_S\_accel
\par\null
Fig () shows that a reduced turning ability can indeed lead to
leader-follower differentiation, although the changes in relative
front-back distance are less than what is seen when the two individuals
differ in speed.~ When the difference in tau\_omega between the two fish
increases, they are on average less aligned, and farther apart.
\par\null
Fig ()B shows the same trend, when social changes in speed are included
(? - need to do this!).
\par\null
\subsection{Combined factors:~ preferred speed, acceleration, and
turning
ability}
{\label{256993}}
The above results show that differences in leader-follower activity can
be expected due to differences in turning and acceleration ability, or
due to differences in speed.~ We now ask how these effects combine to
predict leader-follow differences.
\par\null
Consider:
(A) Faster fish can turn/accelerate faster.~ have different mu\_s, and
also tau\_omega
(A2)~ also add different alpha\_s\_accel
(B) Slower fish can turn/accelerate faster.
(B2)~ also add different alpha\_s\_accel
\par\null
Figure ()A shows that when these effects are combined, differences in
acceleration and turning ability no longer lead to an increase in
leader-follower differentation; leader-follower relationship is
determined primarily by preferred swimming speed.~ Actually, the average
front-back distance decreases with tau\_ratio for a given value of speed
differences between the pair.~ The average alignment again increases
with tau\_ratio though.
\par\null
A2.~ when also have alpha\_s\_accel, \ldots{}
\par\null
We now consider the opposite case, when the slower fish is the better
swimming.~ Fig (), ..
\par\null\par\null\par\null
\selectlanguage{english}
\FloatBarrier
\bibliographystyle{plainnat}
\bibliography{bibliography/converted_to_latex.bib%
}
\end{document}