\section{Experiments}

\subsection{Datasets}
\subsubsection{Datasets Description}

\begin{table}[h]
	%\scriptsize
	\centering

	\begin{tabular}{|c|c|c|c|c|}
		\hline
		\multirow{2}{*}{\textbf{Dataset}}  &\multicolumn{2}{c|}{\textbf{Node description }} & \multicolumn{2}{c|}{\textbf{Edge description}}\\ \cline{2-5}%\cmidrule(lr){4-5}
		& Type & Size & Type & Size \\ \hline
		Scholarly & paper & 166,170 & citation &750,181\\ \hline
		Music & song & 145,203 & co-listening &1,172,525
		\\ \hline
	\end{tabular}
	\caption{Dataset Description}
	\label{tab:c3_dataset}
\end{table}

Table \ref{tab:c3_dataset} shows the statistics of the two datasets.  The scholarly graph is unweighted and directed, while the music graph is a weighted and undirected.

\textbf{Scholarly Graph:} It contains academic publications with metadata extracted from ACM Digital Library. From the dataset, I build the experimental graph via paper citation relationship. Each vertex in the graph represents a paper, and if a paper cites another paper, there will be an edge linking the two. My model aims to detect personalized communities on the scholarly graph for authors. For each author in the dataset, I represent his/her need in two ways: their previous publications (text-based query) and cited paper history (vertex-based query).

\textbf{Music Graph:} It contains user listening histories and user-generated playlists from an online music streaming service, Xiami. I create a music graph with songs as the vertices and co-listening relationship as the edges. If two songs appear in the same user's listening history, there will be an edge linking them two. For users in the music dataset, I represent their music tastes (user need) from the songs in their listening history.

\subsubsection{Ground Truth Construction}

The ground truth for the two datasets are generated based on each user's publishing/ citing/ listening history:

For the scholarly dataset, the references of 112 random sampled papers are manually annotated from their literature reviews where authors summarize previous works. Different paragraphs (or sub-sections) in the literature review typically focus on separate but coherent topics while the same paragraph talks about the same topic. Based on this assumption, the papers cited in the same paragraph/sub-section naturally form a community with high resolution. To ensure each paper's cited papers form enough communities and each community contains enough papers, only papers with no fewer than three topics and all of whose communities have at least five papers are kept. After applying all these filters, 101 papers are left for evaluation.

For the music dataset, each user has several self-generated playlists. The songs in each playlist should contain a coherent theme. To avoid the playlists sharing mutually exclusive themes with other playlists, a Jaccard similarity check is applied on any pair of playlists created by the same user. If a user has at least two highly correlated playlists (Jaccard coefficient between them is above 0.5), I remove one of the playlists. Each playlist forms a separate community. Furthermore, to ensure the number of playlist and playlist size are both large enough, only users with at least three playlists and each playlist contains at least five songs are kept. In the end, there are 117 users who meet the above criteria.

In this paper, as all communities constructed in the ground truth are relevant communities with high resolution for users, my task is generating personalized communities to reconstruct the ground truth on two different datasets with vertex- and text-based user need.

\subsection{Settings}

\subsubsection{Metrics \& Parameter Settings}

F1-score (F1), Rand index (Rand), Jaccard index (Jaccard) and running time are reported as the evaluation metrics in this paper. Based on empirical studies, population size $P$ is 100. Crossover rate is 95\%. Mutation rate is 1\%. The maximum depth of binary community tree $d$ is 10. The number of iteration $T$ is 30. User searching preference $\lambda$ is 0.6. Community size $K$ is 50. The number of Mappers/ Reducers for parallelization $M$ is 50. The number of top vertices to construct pseudo ground truth $n$ is 10. Parameters in Infomap and Node2vec are both the default settings in their original papers.

\subsubsection{Baselines}

Considering both efficacy and efficiency, I select eight widely used user-independent community detection models. Ideally, to achieve personalized community detection, user-independent models should run on each user separately by assigning higher weights on user related edges. Thus, their time complexity should be only compared with my online step time complexity as my offline step is independent with user numbers. In this paper, to run baselines within acceptable time, I report their user-independent community results as the average performance.

\begin{itemize}
	\item \textbf{Spinglass} \cite{eaton2012spin}: Spinglass  constructs communities by minimizing the Hamiltonian score on signed graphs.\footnote{https://github.com/antoine-lizee/SG}
	\item \textbf{Fast Greedy} (FG) \cite{clauset2004finding}: Fast Greedy  is a greedy search method to get the maximized modularity for community detection.\footnote{https://github.com/kjahan/community}
	\item \textbf{Louvain} \cite{blondel2008fast}: Louvain  is an agglomerative method to construct communities in a bottom-up manner guided by modularity.\footnote{https://github.com/taynaud/python-louvain}
	\item \textbf{Walktrap} \cite{pons2005computing}: Walktrap detects communities based on the fact that a random walker tends to be trapped in dense part of a network.\footnote{https://www-complexnetworks.lip6.fr/~latapy/PP/walktrap.html}
	\item \textbf{Infomap} \cite{rosvall2011multilevel}: Infomap generates communities by simulating a random walker wandering on the graph and indexing the description length of his random walk path via multilevel codebooks.\footnote{http://www.mapequation.org/code.html}
	\item \textbf{Bigclam} \cite{yang2013overlapping}: Bigclam generates overlapping communities via a non-negative matrix factorization approach.\footnote{https://github.com/snap-stanford/snap/tree/master/examples/bigclam}
	\item \textbf{DeepWalk} \cite{perozzi2014deepwalk}: DeepWalk generates node embeddings via random walks and utilizes K-means on node embeddings to detect communitis.\footnote{https://github.com/phanein/deepwalk/tree/master/deepwalk}
	\item \textbf{Node2vec} \cite{grover2016node2vec}: Node2vec is an extended version of DeepWalk with a refined random walk strategy.\footnote{https://github.com/aditya-grover/node2vec}
\end{itemize}


\section{Endomorphisms of vector spaces}


\chapter{Trombone}\label{ch:trombone}
This chapter provides an extended summary for the paper ``A Physical Model of the Trombone using Dynamic Grids for Finite-Difference Schemes'' \citeP[H]. The trombone is an extremely interesting case from a modelling perspective as the length of the acoustic tube is time-varying.

The air propagation in the trombone has been modelled using a system of two first-order PDEs, presented in Section \ref{sec:firstOrderSystem}. Although Webster's equation (see Section \ref{sec:webstersEq}) could have been used, the state-of-the-art models for brass instruments using FDTD methods use first-order PDEs \cite{Bilbao2016, Harrison2018}. Some extensions, such as the state-of-the-art radiation model used in \cite{Harrison2018} and viscothermal losses in \cite{Bilbao2016}, could then easily be added, although the latter has been left for future work.

% with the idea that viscothermal losses could be added as done in \cite{Bilbao2016} where the authors also use a first-order system
% Interesting read: https://newt.phys.unsw.edu.au/jw/brassacoustics.html

The

\section{Summary}
The main contribution is the inclusion of the dynamic grid, which will be summarised below.

\subsection{Dynamic grid}
The dynamic grid presented in Chapter \ref{ch:dynamicGrid} has been used to model the varying geometry of the acoustic tube.

\section{Physical model}
Most has been described in Chapter \ref{ch:brass}

\subsection{Discrete}

\section{Lip-reed with collision}
\def\nph{}
\def\nphSys{n+1/2}
To excite the trombone, the lip reed model presented in Chapter \ref{ch:lipreed} was used, and extended using the collision method presented in Chapter \ref{ch:collisions}. This section provides details on this addition and the implementation and follows the notation of the thesis (for consistency and to prevent cluttering).

In continuous time, a collision can be added to Eq. \eqref{eq:lipReedDimensional} in the same way as for the mass-barrier collision presented in Section \ref{sec:massRigidBarrier} as
\begin{equation}\label{eq:lipWithCollisionCont}
    M\ddot y = -K y - R \dot y + S_\text{r}\Delta p + \psi g
\end{equation}
where $g = \psi'$ and $\psi$ and $\psi'$ are as defined in Eq. \eqref{eq:quadraticPotential}.\footnote{Notice that as $y$ is the displacement of the upper lip, the `barrier' modelling the lower lip is placed below, resulting in a positive collision force on $y$.} In the implementation, the frequency of the lip reed is made to be time varying and causes $K = K(t)$ to be time-dependent. Other parameters are the same as in Eq. \eqref{eq:lipReedDimensional}.

\subsection{Discrete time}
This section follows Section \ref{sec:massRigidBarrier} for the collision and Section \ref{sec:discreteLipReed} for the lip reed.

As the lip reed is discretised on the interleaved (temporal) grid, the collision term needs to be as well. Dividing all terms by $M$ and using $\omega_0 = \omega_0^{n+1/2} = \sqrt{K^{n+1/2}/M}$ and $\sigma_\rtxt = R/M$ yields\footnote{The paper uses $\omega_r$ instead of $\omega_0$ and $M_r$ rather than $M$.}
\begin{equation}\label{eq:preLipCollision}
    \delta_{tt}y^{\nphSys} = -\omega_0^2\mu_{t\cdot}y^{\nphSys}-\sigma_\text{r}\delta_{t\cdot}y^{\nphSys} + \frac{S_\text{r}}{M}\Delta p^{\nphSys} + \frac{\psi^{n+1/2}g^{n+1/2}}{M}.
\end{equation}
Here,
\begin{equation}\label{eq:gnph}
    g^{n+1/2} = \frac{\delta_{t+}\psi^n}{\delta_{t\cdot}\eta^{n+1/2}}\ ,
\end{equation}
and the distance between the lips
\begin{equation}\label{eq:etaBarrier}
    \eta^{n+1/2} = -H_0 - y^{n+1/2}
\end{equation}
with static equilibrium separation $H_0$. Here $-H_0$ can be interpreted as the location of the lower lip.
% \begin{equation}
%     M\delta_{tt}y^{\nph} = -M\omega_0^2\mu_{t\cdot}y^{\nph}-M\sigma_\text{r}\delta_{t\cdot}y^{\nph} + S_\text{r}\Delta p^{\nph} + \psi^{n+1/2}(\psi^{n+1/2})',
% \end{equation}
Using $\mu_{t+}\psi^n = \psi^{n+1/2}$ (which is Eq. \eqref{eq:psiHalfDef} shifted to the interleaved grid), Eq. \eqref{eq:preLipCollision} can be rewritten to
\begin{equation}
    \delta_{tt}y^{\nphSys} = -\omega_0^2\mu_{t\cdot}y^{\nphSys}-\sigma_\text{r}\delta_{t\cdot}y^{\nphSys} + \frac{S_\text{r}}{M}\Delta p^{\nphSys} + \frac{(\mtp\psi^n)g^{n+1/2}}{M}
\end{equation}
In the following, the superscript $n+1/2$ is suppressed for $y$, $\Delta p$, $g$ and $\eta$ for brevity. Rewriting Eq. \eqref{eq:gnph} to
\begin{equation}\label{eq:rewrittenPsi}
    \delta_{t+}\psi^n = g\delta_{t\cdot}\eta
\end{equation}
and using identity \eqref{eq:identity3}, one arrives at
\begin{equation}\label{eq:lipReedFDSCollision}
    \delta_{tt}y^{\nph} = -\omega_0^2\mu_{t\cdot}y^{\nph}-\sigma_\text{r}\delta_{t\cdot}y^{\nph} + \frac{S_\text{r}}{M}\Delta p^{\nph} + \left(\frac{k}{2}g\delta_{t\cdot}\eta + \psi^n\right)\frac{g}{M}
\end{equation}
As the barrier is static and placed below $y$, this implies that
\begin{equation}\label{eq:etaNegY}
    \delta_{t\cdot}\eta = -\delta_{t\cdot}y,
\end{equation}
and a solution for $y^{n+3/2}$ can be obtained:
% \begin{align}
%     \frac{1}{k^2}(y^{n+3/2} - 2y^{n+1/2} + y^{n-1/2}) = &-\frac{\omega_0^2}{2}(y^{n+3/2}+y^{n-1/2})-\frac{\sigma_\text{r}}{2k}(y^{n+3/2}-y^{n-1/2})\nonumber \\
%     &+ \frac{S_\text{r}}{M}\Delta p^{\nph}  -\frac{g^2}{4M}(y^{n+3/2}-y^{n-1/2}) + \frac{g}{M}\psi^n\nonumber\\
%     \left(2 + \omega_0^2 k^2 + \sigma_\text{r} k + \frac{g^2k^2}{2M}\right) y^{n+3/2} &= 4y^{n+1/2}+ \left(\sigma_\text{r}k - 2 - \omega_0^2k^2 + \frac{g^2k^2}{2M}\right) y^{n-1/2}\nonumber\\
%     &+ \frac{2S_\text{r}k^2}{M}\Delta p^{\nph} + \frac{2gk^2}{M}\psi^n\nonumber.
% \end{align}
% This can be compactly written as
\begin{equation}\label{eq:lipUpdateWithCollision}
    \alpha_\text{r}y^{n+3/2} = 4 y^{n+1/2} + \beta_\text{r}y^{n-1/2} + \xi_\text{r}\Delta p + 4\psi^n\gamma_\text{r}
\end{equation}
with
\begin{gather}
    \alpha_\text{r} = 2 + \omega_0^2 k^2 + \sigma_\text{r} k + g\gamma_\text{r}, \quad \beta_\text{r} = \sigma_\text{r}k - 2 - \omega_0^2k^2 + g\gamma_\text{r}, \nonumber \\[10pt]
    \xi_\text{r} = \frac{2S_\text{r}k^2}{M}, \quad \text{and} \quad \gamma_\text{r} = \frac{gk^2}{2M}\ .\nonumber
\end{gather}
To be able to calculate $y^{n+3/2}$, definitions for $g$ and $\Delta p$ need to be found.

\subsubsection{Calculating $g$}
Following Chapter \ref{ch:collisions}, $g$ can be calculated using
\begin{subnumcases}{g^{n+1/2} =}
    \kappa\sqrt{\frac{K_\text{c}(\alpha_\text{c}+1)}{2}}\cdot(\eta^{n+1/2})^{\frac{\alpha_\text{c}-1}{2}},
    & if $\eta^{n+1/2} \geq 0,$ \\
    -2 \frac{\psi^{n}}{\eta^\star-\eta^{n-1/2}}, & if $\eta^{n+1/2} < 0\ \text{ and } \ \eta^{\star} \neq \eta^{n-1/2},$\\
    0, & $\text{if } \eta^{n+1/2} < 0\ \text{ and } \ \eta^{\star} = \eta^{n-1/2},\qquad$
\end{subnumcases}
where parameters are as in Eq. \eqref{eq:gDef}. Furthermore, $\eta^\star = -H_0 - y^\star$ where
\begin{equation}
    y^\star = \frac{4}{\alpha_\text{r}^\star} y^{n+1/2} + \frac{\beta_\text{r}^\star}{\alpha_\text{r}^\star}y^{n-1/2} + \frac{\xi_\text{r}}{\alpha_\text{r}^\star}\Delta p^\star,
\end{equation}
is the update equation of the system without the effect of the collision and
\begin{gather*}
    \alpha_\text{r} = 2 + \omega_0^2 k^2 + \sigma_\text{r} k, \qaq \beta_\text{r}^\star = \sigma_\text{r}k - 2 - \omega_0^2k^2,
\end{gather*}
are the coefficients in Eq. \eqref{eq:lipUpdateWithCollision} without the collision terms (as found in Eq. \eqref{eq:lipreedUpdateTerms}). Notice that $\xi_\rtxt$ is unchanged. Finally, $\Delta p^\star$ is the pressure difference calculated using Eq. \eqref{eq:pressureDiff}, i.e., without the effect of the collision. Once $g$ is calculated, $\Delta p$ can be obtained.

\subsubsection{Calculating $\Delta p$}
Following Section \ref{sec:obtainingDeltaP}, to calculate $\Delta p$, one starts by rewriting the scheme in Eq. \eqref{eq:lipReedFDSCollision} to
\begin{gather*}
    \frac{2}{k} (\delta_{t\cdot} - \delta_{t-})y^{\nph} = -\omega_0^2(k\delta_{t\cdot} + e_{t-})y^{\nph} - \sigma_\text{r}\delta_{t\cdot} y^{\nph} + \frac{S_\text{r}}{M}\Delta p^{\nph} + \left(-\frac{k}{2}g\delta_{t\cdot}y+\psi^n\right)\frac{g}{M},\\
    a_1^n\delta_{t\cdot}y^{\nph} - a_2\Delta p^{\nph} - a_3^n = 0,
\end{gather*}
with
\begin{equation*}
    \begin{gathered}
    a_1^n = \frac{2}{k} + \omega_0^2k + \sigma_\text{r} + \frac{g^2k}{2M} \geq 0, \quad a_2 = \frac{S_\text{r}}{M} \geq 0\ , \\
     \text{and} \quad a_3^n = \left(\frac{2}{k} \delta_{t-} - \omega_0^2e_{t-}\right)y^{\nph} + \frac{g}{M}\psi^n\ .
    \end{gathered}
\end{equation*}
Note that $a_1^n$ is now time-dependent through $g$ and $\omega_0$ but remains non-negative. The rest of the variables and process in Section \ref{sec:obtainingDeltaP} are unchanged. Notice that the calculation for $\Delta p$ has to be performed twice: once to obtain the pressure difference without the collision effect $\Delta p^\star$ and once to obtain the final pressure difference $\Delta p$.

\subsubsection{Last steps}
After $y^{n+3/2}$ is calculated using Eq. \eqref{eq:lipUpdateWithCollision} and the definitions for $g$ and $\Delta p$ found using the steps above, $\psi^{n+1}$ can be calculated by expanding Eq. \eqref{eq:rewrittenPsi} and substituting Eq. \eqref{eq:etaNegY} according to
\begin{equation}\label{eq:psiUpdate}
    \psi^{n+1} = \psi^n - \frac{g}{2}\left(y^{n+3/2} - y^{n-1/2}\right).
\end{equation}

\subsection{Energy analysis}
The added energy to the system can be calculated by multiplying the added term with $\delta_{t\cdot}y$
\begin{align}
    \delta_{t+}(\mathfrak{h}_\text{t}+\mathfrak{h}_\text{r}) + \q_\text{r} + \mathfrak{p}_\text{r}&-(\mu_{t+}\psi^n) \frac{\delta_{t+}\psi^n}{\delta_{t\cdot}\eta^{n+1/2}}(\delta_{t\cdot}y^{n+1/2}) = 0\nonumber\\[-5pt]
    \xLeftrightarrow{\mystrut\ \text{Eq. \eqref{eq:etaNegY}}\ }\quad \hdots &+ (\mu_{t+}\psi^n) (\delta_{t+}\psi^n) = 0\nonumber\\
    \hdots &+ \frac{1}{2k}(\psi^{n+1}+\psi^n)(\psi^{n+1} - \psi^n)=0\nonumber\\
    \hdots  &+\frac{1}{2k}((\psi^{n+1})^2 - (\psi^n)^2)=0\nonumber\\
    \hdots &+ \frac{1}{2}\delta_{t+}\left((\psi^n)^2\right) = 0\nonumber\\
    \delta_{t+}(\mathfrak{h}_\text{t}+\mathfrak{h}_\text{r} + \mathfrak{h}_\text{c}) &+ \q_\text{r} + \mathfrak{p}_\text{r} = 0
\end{align}
with
\begin{equation}
    \mathfrak{h}_\text{c} = \frac{(\psi^n)^2}{2 }\nonumber
\end{equation}
\section{Real-Time implementation}

\section{Discussion}
\SWcomment[more for your info, don't think I want to include this:]
To combat the drift, experiments have been done involving different ways of connecting the left and right tube. One involved alternating between applying the connection to the pressures and the velocity. Here, rather than adding points to the left and right system in alternating fashion, points were added to pressures $p$ and $q$ and velocities $v$ and $w$ in an alternating fashion. Another experiment involved a ``staggered'' version of the connection where (fx.) for one system (either left or right), a virtual grid point of the velocity was created from known values according to \eqref{eq:connectionInterpol}, rather than both from pressures. This, however, showed unstable behaviour. No conclusory statements can be made about these experiments at this point. \SWcomment[$\leftarrow$ which is exactly why I don't want to include this section]

As the geometry varies it matters a lot where points are added and removed as this might influence the way that the method is implemented. \SWcomment[speculative section coming up] The middle of the slide crook was chosen, both because it would be reasonable for the air on the tube to ``go away from'' or ``go towards'' that point as the slide is extended or contracted, and because the geometry does not vary there. Experiments with adding / removing grid points where the geometry varies have been left for future work. \SWcomment[even more speculative.. $\rightarrow$] It could be argued that it makes more sense to add points at the ends of the inner slides as ``tube material'' is also added there. This would mean that the system should be split in three parts: ``inner slide", ``outer slide" and ``rest", and would complicate things even more.

\subsection{Tube}
Just to save the conversation with Stefan about Webster's equation:

Using operators $\partial_t$ and $\partial_x$ denoting partial derivatives with respect to time $t$ and spatial coordinate $x$, respectively, a system of first-order PDEs describing the wave propagation in an acoustic tube can then be written as
\begin{subequations}\label{eq:firstOrderSystemTrombone}
    \begin{align}
        \frac{S}{\rho_0 c^2}\partial_t p &= -\partial_x(Sv)\label{eq:contPressureTrombone}\\
        \rho_0\partial_tv &= -\partial_xp\label{eq:contVelocityTrombone}
    \end{align}
\end{subequations}
with acoustic pressure $p = p(x,t)$ (in N/m$^2$), particle velocity $v = v(x,t)$ (in m/s) and (circular) cross-sectional area $S(x)$ (in m$^2$). Furthermore, $\rho_0$ is the density of air (in kg/m$^3$) and $c$ is the speed of sound in air (in m/s). System \eqref{eq:firstOrderSystemTrombone} can be condensed into a second-order equation in $p$ alone, often referred to as Webster's equation \cite{Webster19}. \SWcomment[Interesting! In NSS it is the acoustic potential right? Can you go from that to a second-order PDE in $p$? There is a time-derivative hidden there somewhere right? (Just wondering :))]\SBcomment[Yes, the form in $p$ alone is the one you usually see. You get it by differentiating the first equation, giving you a $\dot{v}$ on the RHS, and then you can substitute the second equation in...I used the velocity potential one because it has direct energy balance properties. ] \SWcomment[Right. So Webster's eq. in $p$ and $\Psi$ are identical (will exhibit identical behaviour), except for the unit of the state variable..?]\SBcomment[yes that's right...using the velocity potential allows you to do all the energy analysis easily, in terms of physical impedances. But the scheme you get to in the end is the same, just one derivative down.] \SWcomment[Alright cool! Thanks for the explanation :)] For simplicity, effects of viscothermal losses have been neglected in \eqref{eq:firstOrderSystemTrombone}. For a full time domain model of such effects in an acoustic tube, see, e.g. \cite{Bilbao2016}.


\documentclass[]{article}

\usepackage{caption,subcaption,graphicx,float,url,amsmath,amssymb,amsthm,tocloft,cancel,mathrsfs}
\usepackage[toc,nonumberlist]{glossaries}
\usepackage{glossaries-extra,thmtools,gensymb,braket,bm,tensor}
\usepackage[toc,page]{appendix}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\newcommand{\Lagr}{\mathscr{L}}
\newtheorem{thm}{Theorem}
\newtheorem{defn}[thm]{Definition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lemma}[thm]{Lemma}
\graphicspath{{figs/}}
\widowpenalty10000
\clubpenalty10000
\setcounter{tocdepth}{2}

%opening
\title{Theoretical Minimum\\General Relativity\\Miscellaneous Lectures}
\author{Simon Crase (compiler)\\simon@greenweaves.nz}

\begin{document}

\maketitle

\begin{abstract}
	These are my notes from some miscellaneous lectures related to  \emph{General Relativity}\cite{susskind2012general} lectures from Leonard Susskind's \emph{Theoretical Minimum} series\cite{susskind2007theoretical}.

	Disclaimer: I have created these notes as an aide-m\'emoire for my own use; if you find them useful, you are welcome, but I'd appreciate hearing from you. They are not intended
	as a substitute for listening to the lectures. The intellectual property for all material derived from the lectures belongs, of course, to Professor Susskind; any mistakes, however, are my own.

	The notes were created using TexStudio\cite{TexStudio}, which I recommend for compiling them to a PDF, and the bibliography was created using JabRef\cite{Jabref}.
\end{abstract}

\tableofcontents
\listoffigures
\listoftables
\listoftheorems

\section{Inside Black Holes (KITP Blackboard Lunch).}\label{sec:inh}

We are addressing a problem that's been around for 100 years: how to put together quantum mechanics and gravity?  For many years there was very little. The subject exploded with Hawking's \& Bekenstein's discovery of black hole thermodynamics. Paradoxes are very interesting; they are generally the way forward when you simply don't have anything else, when you have no experiments, no empirical data, just a set of concepts which clash. That's when we stand to learn something really new and exciting. For example, light travelling at the same speed in all frames of reference, the electron not spiralling in to nucleus, quarks being confined, the cosmological constant being 123 orders of magnitude smaller that we'd expect, the start of life.\cite{susskind2013inside}

When the paradox is solved, LS thinks we'll discover that we wee going on the right track before the paradox, but we were ignorant of some important thing.

Don't think of quantum gravity as quantizing gravity. Usual quantization has failed. Probably quantum mechanics and gravity are linked in a way which doesn't allow us to separate them. It probably doesn't make sense to take a classical theory of gravity and apply the standard rules. If this doesn't work, and there are no data, the best we can do is explore paradoxes, most of which have to do with black holes. Freeman Dyson thinks it doesn't make sense to try to fit quantum mechanics and general relativity together, as they involve different scales. LS thinks it is intolerable to have two theories that don't fit together.

Black holes are where quantum mechanics and general relativity come together. Despite black holes being very big and very heavy, the way they contain information and interact with the rest of the world is highly quantum mechanical. Black holes seem to be the natural doorway, the place we get really surprising paradoxes from, that we can explore and hope to learn about the connection between quantum mechanics and gravity.

Let us begin with some tension that was already there in the classical theory with black holes. It's not a paradox, just a tension. The tension has to do with the difference in descriptions between outside the black hole and somebody falling in.

Figure \ref{fig:ibh-horizon} shows the dividing line between a region where there is a chance to escape, and one where there isn't. The properties of clocks and measuring rods get very distorted near the event horizon. When an observer falls in to the horizon it measures a finite time (proper time), but a distant observer will see it fall asymptotically slowly (coordinate time): this is the tension in this problem--Figure \ref{fig:ibh-minkowski}. We see an asymptotically thin observer, and everything that has fallen in form progressively thinner and thinner shells. So our picture is a thin shell, with nothing important inside, since nothing ever fell through \emph{from the perspective of a distant observer}.
\begin{figure}[H]
	\begin{center}
		\caption[Event horizon separates two regions]{Event horizon separates two regions: one where we can send light to infinity, and one where anything will end up in the singularity.}\label{fig:ibh-horizon}
		\includegraphics{ibh-horizon}
	\end{center}
\end{figure}

In a classical black hole two things are infinite for a classical black hole:
\begin{enumerate}
	\item the length of time to fall in;
	\item the amount of information you can hide in the then sedimentary structure that is on the event horizon.
\end{enumerate}

There is no limit classically on how much structure (information) you can have at the horizon of a black hole. Bits of information in classical physics can be encoded in arbitrarily weak signals of arbitrarily low energy, so these weak signals can carry any number of bits of information. There can be an infinite amount of energy hidden at the horizon, classically. Hidden information is also called \emph{entropy}.
Bekenstein did \emph{not} discover that black holes have entropy; he discovered that \emph{they do not have too much entropy}.

\begin{figure}[H]
	\begin{center}
		\caption[Consistency of times: infalling observer sees finite, external infinite.]{Consistency of times: infalling observer sees finite, external infinite. Einstein taught us that, in order to understand gravity, we should start by understanding an accelerated observer. In Minkowski space the coordinates of a constantly accelerated observer look like this. The hyperbolae represent constant position, the radial lines constant time. Notice the line for $t=\infty$. Imagine somebody falling through along curvy line. From the point of view of the falling observer only a finite proper time elapses; he doesn't care about the odd accelerated coordinates. But someone who stays outside, which involves accelerating. If you stay outside and watch someone crossing light cone it takes an infinite time, but there is nothing infinite about the perception of someone falling through. Classically this wasn't regarded as a paradox, just a curiosity. \emph{This is the structure of a black hole very near the horizon.} }\label{fig:ibh-minkowski}
		\includegraphics{ibh-minkowski}
	\end{center}
\end{figure}

Until Jacob Bekenstein\cite{wiki:jacob:bekenstein} asked the question in 1972, it was assumed that a black hole could hide an infinite amount of information; this is similar to the situation prior to quantum mechanics. In pre-quantum mechanics the radiation field of a given amount of energy could contain an infinite amount of information-- the ultraviolet catastrophe. Each mode of the radiation field, no matter what its frequency was, could store arbitrary amounts of entropy. If you had information stored classically it would migrate more and more to the ultraviolet modes, where there is an infinite phase space to contain entropy.

The same thing would happen in Figure \ref{fig:ibh-horizon}. Entropy would cross the event horizon and, if you didn't account for it, it would seem that entropy was lost to the world. It would be absorbed by the infinitely thin layers and could not get out. This didn't feel right to Bekenstein; he suspected that black holes were like anything else and have a finite entropy.

\begin{thm}[Bekenstein]
	A black hole has a finite entropy $\propto$ area of event horizon.
\end{thm}

\begin{proof}
	Build black hole a particle at a time. A particle should contain one bit: either it is there or it isn't. But that isn't quite right. If we build black hole by sending in one bit at a time, we can't use high frequency or localized photons. A localized photon contains more information that its presence or absence; it also has information about where it might fall into the horizon. So we need a photon of a wavelength so long that we can't distinguish where it crossed the horizon.

	The radius of a black hole is given by:
	\begin{align*}
	R =& \frac{2 M G}{c^2} \text{. Throw in photons $\lambda\approxeq R$, one at a time.}\\
	\delta E =& \frac{hc}{\lambda} \text{, change in energy from 1 bit of information}\\
	=& \frac{hc}{R}\\
	\delta M =& \frac{\hslash}{Rc} \text{, from $E=mc^2$}\\
	\delta R =& \frac{2G}{c^2}  \frac{\hslash}{Rc}\\
	R \delta R=& \frac{2G}{c^3}  \hslash\\
	=& \delta A
	\end{align*}
	Every time you add a bit you add a fixed amount to the horizon  area. So change in area from adding one bit of information is a \emph{universal constant}.
	\begin{align*}
	S =& \frac{A c^3}{\underbrace{4}_\text{\cite{hawking1975particle}} \hslash G} \text{. Entropy.}\\
	dE =& T dS \text{. Anything with entropy and energy has temperature\cite{susskind2013statistical}}\\
	T =& \frac{\hslash  c^3}{8 \pi M k_B G} \text{. Hawking temperature--\cite{hawking1975particle}.}
	\end{align*}
\end{proof}

This has negative specific heat, as temperature goes \emph{down} with energy. Notice that in classical limit, $\hslash \rightarrow 0$, S $\rightarrow \infty$, $\rightarrow 0$. Very often quantum mechanics takes things which are infinite classically and makes them finite.

That is the description of a black hole from outside. Because it has a temperature, it radiates. The Sun radiates energy whose wavelength is small compared to the solar radius, but a black hole radiates with a wavelengths comparable to size of black hole. If you try to look at one with its own radiation it looks fuzzy. Since information is finite we have to modify our picture--see Figure \ref{fig:ibh-horizon-planck}.
\begin{figure}[H]
	\begin{center}
		\caption[Cannot store anything on a  scale smaller than Planck Length]{One way to think of Bekenstein's argument is that you cannot store anything on a vertical scale smaller than Planck Length. There is a characteristic thickness on the event horizon.}\label{fig:ibh-horizon-planck}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{ From one perspective the black hole is just a hollow sphere, the stretched event horizon, with microscopic degrees of freedom. }\label{fig:ibh-horizon-outside}
			\includegraphics[width=\textwidth]{ibh-horizon-planck}
		\end{subfigure}
		\;
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Einstein's gravity suggests we should be able to fall through. Inside there could be other objects, even stars ef the black hole is big enough.}\label{fig:ibh-horizon-inside}
			\includegraphics[width=\textwidth]{ibh-horizon-inside}
		\end{subfigure}
	\end{center}
\end{figure}
Another odd thing is that entropy is normally proportional to volume, not area: that is telling us that \emph{there is nothing inside the black hole.}
OTOH, classical black hole physics tells us that it is meaningful to fall through the horizon: it takes a finite proper time. Now we \emph{are} getting into paradox land.
\begin{itemize}
	\item From one perspective the black hole is just a hollow sphere, the stretched event horizon, with microscopic degrees of freedom--Figure \ref{fig:ibh-horizon-outside}. It is hot. Photons are redshifted so they appear cool from a distance, but event horizon is enormously hot.
	\item In all the years it took to develop these arguments, peple forgot to ask about the infalling observer. One possibility is that the black hole is just this hollow sphere with nothing inside, not even spacetime. But that isn't very satisfying, as Einstein's gravity suggests we should be able to fall through--Figure \ref{fig:ibh-horizon-inside}.
\end{itemize}

\begin{defn}[Holographic principle]
	Boundary structure functions something like a hologram. Yes, there are things on the inside, but their relationship to this structure that is holding the information about everything that ever fell through is roughly speaking a metaphor of a hologram.  The information can be thought of as being stored on the film, or the film can be thought of as a representation of the 3 dimensional reality.
\end{defn}

That is the picture as it was roughly 18 months before the date of the lecture\footnote{August 2013}.

Since event horizon is hot, it radiates heat and evaporates.

Let's come to the quantum mechanics, and what the dilemma is.

Put yourself into an infalling frame of reference. 	Infalling observer experiences empty space, and it may be entangled with something. Entanglement means that two systems are highly correlated in a quantum mechanical sense. Figure \ref{fig:ibh-horizon-alice-bob} shows Alice becoming entangled with the Hawking radiation. But there is a theorem, the monogamy of entanglement, which says that Alice can not be entangled with Bob and Hawking.

\begin{thm}[Monogamy of entanglement]
	Monogamy of entanglement means that an entangled state cannot be shared with many parties. The more parties, the less entanglement between them. In this paper, we give a simple proof of this property and provide an upper bound of the number of parties.\cite{Yang_2006}
\end{thm}

\begin{itemize}
	\item holographic principle requires Alice \& Bob entangled;
	\item Alice becomes entangled with distant radiation;
	\item Alice and Bob's entanglement destroyed.
\end{itemize}

\begin{figure}[H]
	\begin{center}
		\caption[Alice and Bob are entangled.]{Alice and Bob are entangled. You can find out about Alice by a Bob measurement, and vice versa. What happens when black hole evaporates? After about half evaporates, Alice is entangled with distant Hawking radiation.}\label{fig:ibh-horizon-alice-bob}
		\includegraphics{ibh-horizon-alice-bob}
	\end{center}
\end{figure}
That sounds like a disaster. Breaking Alice \& Bob's entanglement will perturb nature of vacuum between interior and exterior seriously. What if interior of black hole is really encoded in distant Hawking radiation? LS doesn't like this.

One possibility is the Firewall. Once you disrupt entanglement there is no interior. It has been scooped up into Hawking radiation. There is no interior. LS doesn't like it either.

LS feels that we learn something really big from this exercise.

\begin{figure}[H]
	\begin{center}
		\caption{	Questions.}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{When stuff falls in, horizon expands  a little to meet it, then mixes up with other information in hot stretched horizon. Through holographic mapping this is equivalent to stuff actually passing through. We believe we understand this; it's the entangled stuff going out that we don't understand.}\label{fig:ibh-horizon-falling-in}
			\includegraphics[width=\textwidth]{ibh-horizon-falling-in}
		\end{subfigure}
		\;
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{For a sufficiently large black hole there is a region inside the event horizon that is far enough from the singularity that it is flattish. E.g. the black hole at the centre of the galaxy; someone falling in would have 20 minutes before tidal forces became a problem. You could frame the questions to refer to the outer regions. This isn't to say that the singularity isn't important, but merely that the paradox can be formulated independently of the singularity. }\label{fig:ibh-horizon-inside-large}
			\includegraphics[width=\textwidth]{ibh-horizon-inside-large}
		\end{subfigure}
	\end{center}
\end{figure}

\section{The World As Hologram}\label{sec:hologram}
In a certain peculiar sense, the world is a hologram.  It all began from thinking about black holes. Black holes are in some sense the most exotic objects in the universe. They are dense, they are heavy, they are dangerous, but they are also ubiquitous. The universe is filled with them, and almost all the bits of information in the universe exist in black holes. So in a certain sense, although they are very exotic, they are almost everything. They contain almost all of the information in the universe.\cite{susskind2011hologram}

\begin{figure}[H]
	\caption{William Unruh's analogy for a black hole}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Alice has become disconnected from outside: no fish can swim faster then the speed of sound.}
		\includegraphics[width=\textwidth]{wh-alice}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{As you pass the event horizon, nothing bad happens to you, but you are doomed. The singularity is what is harmful, but we won't worry about that in this lecture.}
		\includegraphics[width=\textwidth]{wh-black-hole}
	\end{subfigure}
\end{figure}

Information comes in bits: ''King Canute had warts on his chin''. Physicists aren't interested in the meaning, just the symbols.

\begin{figure}[H]
	\begin{center}
		\caption{''King Canute had warts on his chin''--Morse code. 65 bits.}
		\includegraphics[width=0.6\textwidth]{wh-kcwc}
	\end{center}
\end{figure}

\begin{defn}[$-1^{st}$ law of physics]
	Bits of information are indestructible: distinctions between situations, distinction between configurations are never erased; they never disappear from the world..
\end{defn}

Figure \ref{fig:conflict} summarizes Hawking's central point from 1976: on one hand information is indestructible, on the other Bob sees Alice's bits disappearing as she crosses the event horizon.
\begin{figure}[H]
	\caption{Conflict of principles: a paradox.}\label{fig:conflict}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Information is indestructible. Bits are forever. They are not just bits of information: they are also bits of energy.}
		\includegraphics[width=\textwidth]{wh-kcwc-1st}
	\end{subfigure}
	\;
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Once Alice crosses the event horizon, as far a Bob is concerned her bits have disappeared from the world.}
		\includegraphics[width=\textwidth]{wh-black-hole}
	\end{subfigure}
\end{figure}

But black holes evaporate....The evaporate photons and stuff, shrinking to a tiny black hole before disappearing. Where is Alice? Where are her bits? They can't have escaped from the horizon, because otherwise they'd have to exceed the speed of light. We have a conflict of principle.

\begin{figure}[H]
	\caption{Entropy--Information that is hidden.}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Bathtub of hot water. How much information to we need? Temperature and volume}
		\includegraphics[width=\textwidth]{wh-bathtub}
	\end{subfigure}
	;\
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Hidden Information, positions and velocities of molecules, stored in a huge number of degrees of freedom.}
		\includegraphics[width=\textwidth]{wh-bathtub-detail}
	\end{subfigure}
\end{figure}

Jacob Bekenstein--Black holes have information (1972). Everybody knows that, but Bekenstein worked out how much information was hidden. He considered the process of building a black hole by dropping particles in, and found the number of hidden bits of information is equal to the area of the event horizon, measured in Planck units: one Planck area $=\frac{\hslash G}{c^3}$. Think of bits an impenetrable objects covering event horizon.

\begin{figure}[H]
	\begin{center}
		\caption{Information on event horizon}
		\includegraphics{wh-info-event-horizon}
	\end{center}
\end{figure}

What are the hidden microscopic structures that make up the horizon of a black hole? There must be hidden degrees of freedom that are making up that entropy.

\begin{figure}[H]
	\caption{String Theory is a theory where elementary particles are tiny pieces of string}
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{Adding more energy makes the string more tangled.}
		\includegraphics[width=\textwidth]{wh-strings}
	\end{subfigure}
	\;
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{If string so tangled we can't follow it, because we are too large or not smart enough, we say it has entropy. It is not yet a black hole. If we have enough string, however, gravity will pull it together into a black hole.}
		\includegraphics[width=\textwidth]{wh-string-tangle}
	\end{subfigure}
	\;
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{Metaphorically we are left with little pieces of string hanging out of the horizon. They comprise the degrees of freedom that carry entropy.}
		\includegraphics[width=\textwidth]{wh-string-hanging-out}
	\end{subfigure}
\end{figure}

LS is not here to sell string theory. Whatever the entropy of black holes is, it is something which is very small, very chaotic, and in a constant state of agitated motion. Motion and entropy mean heat, so the surface is a flat, two dimensional soup of bits.

\begin{figure}[H]
	\begin{center}
		\caption[Measuring the Temperature of Event Horizon]{Measuring the Temperature of Event Horizon: a conflict of principle. Remember Alice, who happily sailed through the point of no return ''cool as a cucumber''? Or was she thermalized and sent back as photons?}
		\begin{subfigure}[t]{0.2\textwidth}
			\caption{Measuring the Temperature of Event Horizon}
			\includegraphics[width=\textwidth]{wh-hot-bit-soup}
		\end{subfigure}
		\;
		\begin{subfigure}[t]{0.2\textwidth}
			\caption{Hot bit soup?}
			\includegraphics[width=\textwidth]{wh-really-hot}
		\end{subfigure}
		\;
		\begin{subfigure}[t]{0.2\textwidth}
			\caption{Or a harmless point of no return?}
			\includegraphics[width=\textwidth]{wh-or-harmless}
		\end{subfigure}
		\begin{subfigure}[t]{0.2\textwidth}
			\caption{Thermalized Alice}
			\includegraphics[width=\textwidth]{wh-thermal-alice}
		\end{subfigure}
	\end{center}
\end{figure}

Which picture is true? Both are true.

\begin{figure}[H]
	\begin{center}
		\caption[Conflict of Principle]{Conflict of Principle. Bob doesn't see Alice fall through horizon, but he does see radiation--Alice's bits.}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Alice thinks she passes safely}
			\includegraphics[width=\textwidth]{wh-conflict-alice-bob}
		\end{subfigure}
		\;
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Just before Alice passes the horizon Bob looks at her, i.e. shine photons on her and asks whether she is being thermalized. In order to do this he has to hit here with enough energetic photons that she will be thermalized!}\label{fig:wh-bobs-pov}
			\includegraphics[width=\textwidth]{wh-bobs-pov}
		\end{subfigure}
	\end{center}
\end{figure}

There is no operational conflict, as Alice cannot get the message to Bob, but the situation seems unsatisfactory. Let's see if we can push the experiment a little further--Figure \ref{fig:wh-bobs-pov}. Quantum mechanics is always like that: you try to show that something doesn't happen by doing an experiment, and the experiment makes it happen!

This still isn't satisfying! Something deep is going on here, about information.
There are two representations of the same reality: the 3 dimensional representation of Alice passing through, and the 2 dimensional representation in shich she is thermalized.

\begin{figure}[H]
	\begin{center}
		\caption[A painting is a 2D representation of a 3D scene]{A painting is a 2D representation of a 3D scene. Familiarity with the way people look, etc, creates a 3D fiction in our brains! We can't tell whether cadaver is short, because paint is just 2D. The text on the plaque can't be read. The 3D information isn't there.}
		\includegraphics[width=0.8\textwidth]{wh-painting}
	\end{center}
\end{figure}

\begin{figure}[H]
	\caption{Coding 2D and 3D information with bits.}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Painting as pixels}
		\includegraphics[width=\textwidth]{wh-painting-pixels}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Room as voxels}
		\includegraphics[width=\textwidth]{wh-voxels}
	\end{subfigure}
\end{figure}

What about 3D? Divide room into voxels the size of atoms--pretend there is only one kind of atom. Then we can describe state by whether or not there is an atom in each voxel. Then we can represent the room by bits.

Can it be that our world, or at least the surface of a black hole, can be described in both 2D and 3D? You can represent 3D data in 2D, but the result is always to scramble it horribly. An example is a hologram, i.e. the piece of film.

\begin{figure}[H]
	\caption[Hologram compresses image from 3D to 2D]{Hologram compresses image from 3D to 2D, but also scrambles it beyond recognition--unless you know detailed code.}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{A piece of holographic film}
		\includegraphics[width=\textwidth]{wh-holographic-film}
	\end{subfigure}
	\;
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Shine light to show image. You can walk around to see hair on back of head. Hologram doesn't contain information on what is inside head, but could make hologram from MRI scan and encode all 3D information}
		\includegraphics[width=\textwidth]{wh-3d-image}
	\end{subfigure}
\end{figure}
So a black hole horizon is like a hologram representing everything that is inside. We have two representations of the same reality.

\begin{figure}[H]
	\begin{center}
		\caption[Two representations of the same reality]{Two representations of the same reality; the hot bit soup encodes the same data as Alice gets falling through the horizon.}
		\includegraphics[width=0.6\textwidth]{wh-2reps}
	\end{center}
\end{figure}

It is not just black holes. In a certain sense the entire universe can be represented as a hologram, or any finite region of the universe can be represented as a hologram in essentially the same way. I

\begin{figure}[H]
	\begin{center}
		\caption{The Universe}
		\includegraphics[width=0.8\textwidth]{wh-universe}
	\end{center}
\end{figure}

\begin{figure}[H]
	\begin{center}
		\caption[Put some information in a box]{Put some information in a box. It could be alphabet soup, wine, cheese,...}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{	What is the maximum amount of information that you can put in?}
			\includegraphics[width=0.8\textwidth]{wh-information-in-box}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Surround with a shell, then squeeze, so it collapses into a black hole. If the $-1^{st}$ law is correct, then all the original information is hidden in the black hole--and we know how much this is: the area of the horizon in Planck units!}
			\includegraphics[width=0.8\textwidth]{wh-surround-region}
		\end{subfigure}
	\end{center}
\end{figure}
The maximum about of information that can be held in a room is proportional to the area of the walls! The world is pixelated, not voxelated.
\begin{defn}[The holographic principle]
	The maximum amount of information in a region of space is proportional to the area of the region.
\end{defn}

There are other kinds of horizon in cosmology.

\begin{figure}[H]
	\begin{center}
		\caption[Imagine the Universe as a lake filled with fish]{Imagine the Universe as a lake filled with fish, Alice, Bob, and Charlie. There are pipes bringing in new water. This causes the puddle to expand. Imagine that it follows Hubble's Law (accelerated expanding universe): the further apart two fish are, the faster they will be separating. }
		\includegraphics[width=0.6\textwidth]{wh-cosmology-fish}
	\end{center}
\end{figure}

\begin{figure}[H]
	\caption{Alice and Bob are communicating, but they are separating.}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{There is an event horizon, which we'll call an external horizon}
		\includegraphics[width=\textwidth]{wh-cosmology1}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Event Horizon has been crossed}
		\includegraphics[width=\textwidth]{wh-cosmology2}
	\end{subfigure}
\end{figure}

The Universe is expanding, exactly as if new space were flowing in, and each person has a horizon, which is moving slower than the speed of light. It looks as if most of the world is beyond all possible observation. We know that the Universe is at least 1000 times larger, by volume, than we can ever see.

\begin{itemize}
	\item The Universe is at least 1000 times larger, by volume, than the region we can ever see. The rest is beyond our horizon.
	\item What is the meaning of the stuff we can never detect?
	\item How can we confirm it by real observation?
	\item What is the proper description of a world that is bigger than the cosmic horizon?
	\item Is our cosmic horizon a 2 dimensional scrambled hologram of all that lies beyond it?
\end{itemize}

\section{Complexity and Gravity }

You can't really prove anything in complexity. You can conjecture this, and prove it is the same as some other conjecture, but it is extremely difficult to prove anything in complexity.\cite{susskind2018complexity}

LS technique for doing physics: close your eyes, try to visualize the answer, then say what it is. Visualize the phenomenon, the try to visualize a collection of phenomena which are related in some way, and tend to reinforce the same view, until you come to the conclusion that is this were wrong so many other things would have to be wrong that there would be big problems.

The connection between complexity and black holes is highly improbable; after many years of thinking about it, LS concludes there is no alternative. It has to be right, although the precise form in which it is true has still to be given.

You don't understand quantum gravity until you understand the interior of black holes; you don't understand black holes until you understand horizons.

Why is complexity important in QM? Feynman pointed out that Hilbert Space is enormous. It is much bigger than spaces for classical problems.

Start with $K$ qbits,  a $2^K$ dimensional state space, so state is:
\begin{align*}
	\ket{\psi}=\sum_{i=1}^{2K}\alpha_i \ket{i}
\end{align*}
How big is this space? It is a continuous infinity, so let us regularise the $\alpha_i$ by picking them from some discrete set $\{\alpha_1, \alpha_m\}$. We than have $m^{2^k}$ states--$\#s$, say, which grows very fast.

\begin{align*}
	\ln \#s =& 2^K \ln m \text{--remember this pattern!} \numberthis \label{eq:pattern}
\end{align*}

This is strongly sensitive to $K$, but weakly sensitive to $m$ (cutoff parameter).

Let's try to do more precise counting. What is the space of states of a $K$ qbit system? $CP(N)$, where $N=2^K$. Again we'll regularize it: fill hypersphere with $\epsilon$-balls. We coarse grain, and identify states with $\epsilon$-balls. Calculate volume:
\begin{align*}
	V_{CP}=& \frac{\pi^N}{N!} \text{, where $N=2^K$. Now volume $\epsilon$-ball is}\\
	V_B =& \frac{\pi^N}{N!} \epsilon^{2N} \text{, because real dimensionality is $2N$}\\
	\#s =& \bigg(\frac{1}{\epsilon}\bigg)^{2(2^K-1)} \text{, coarse graining}\\
	\ln \#s \approx & 2^K \ln \frac{1}{\epsilon} \text{, same pattern as (\ref{eq:pattern} -- strong dependence on $K$, weak dependence on regulator)}
\end{align*}

How far apart can states be in this space? What is the diameter, and the distance between states. One notion is inner product distance.

\begin{align*}
	d_{AB}=&\arccos \left|\braket{A|B}\right| \text{, with thie metric distance is small}\\
	d_{AB}<&\frac{\pi}{2}
\end{align*}
On the other hand, that seems a little ridiculous. It doesn't show all the difference between states. The other notion is \emph{relative complexity,} the number of small steps from one to the other, which bring us to the idea of a \emph{quantum circuit}.

\begin{align*}
	\ket{A} =& g_1 g_2 ... g_n \ket{B} \text{, where $g_i$ are single gates}
\end{align*}

\begin{defn}[Universal gates]
	A universal collection of gates is one that allows us to get from any $\epsilon$-ball to another.
\end{defn}

\begin{defn}[Relative complexity]
	The relative complexity of A and B, $\mathscr{C}$, is the minimum $n$ such that $\ket{A} =g_1 g_2 ... g_n \ket{B}$.
\end{defn}

This is the shortest path from A to B (in units of gates), so it is a geodesic with the right definition of distance. It is a \emph{metrical notion}. LS says this is a theme of the lecture, and that he considers it to be the right way to think about complexity.

Now lets talk about unitary matrices. We can think of one as an operator, or as a maximally entangled state of two systems.
\begin{align*}
	U =& U_{ij}\ket{i}\bra{j} \text{, operator}\\
	\ket{V} =& V_{ij}\ket{i} \ket{\bar{j}}
\end{align*}
When we talk about distance between operators we are also talking about distance between maximally entangled states.

There are $2^{2K}$ matrix elements (number of constraints for unitary is much smaller), so $m^{2^{2K}}$ unitaries. Let's do an $\epsilon$-ball calculation. First calculate the unitary group of dimension $2^K$, then calculate the volume of an $\epsilon$-ball and divide.
\begin{align*}
	\#unitaries =& \bigg(\frac{2^K}{\epsilon^2}\bigg)^\frac{4K}{2}\\
	\ln \#unitaries =& 4^K\bigg(\frac{K \ln K}{2} + \ln\frac{1}{\epsilon}\bigg)\\
	\approx 4^K
\end{align*}

Distance between unitaries.

\begin{align*}
	d_{UV}=& \arccos \left|Tr(U^\dagger V)\right|\\
	\mathcal{C}_{UV}=& min_n \{U=g_n...g_1V\}
\end{align*}
\url{https://youtu.be/6OXdhV5BOcY?t=1732}

\section{Why is Time a One Way Street?}

Lecture given at the Santa Fe Institute.\cite{susskind2013why}

Why is it so much easier to know what the past is than to know what the future is? The ancients would have said that events in the past have happened, things in the future haven't happened yet.

The second law of thermodynamics is the archetypal illustration of time being a one way street.Newtons Laws don't contain this sort of asymmetry. If Einstein is right about space-time, why is time a one way street when x and y are not?

\subsection{Entropy}
Entropy \emph{almost always} increases--Ludwig Boltzmann.

Boltzmann's Universe in a Box.
\begin{itemize}
	\item  In a completely empty universe, nothing happens.
	\item Imagine we start in a very special configuration, e.g. everything in one corner--Figure \ref{fig:bolztmann-start}-- and let stuff flow--Figure \ref{fig:one_way_street-Boltzmann}--which is what happens \emph{almost all} of the time. During the time that the structure is there, everything interesting in the universe must have happened.
	\item Wait long enough and all you have is particles in thermal equilibrium--Figure \ref{fig:end-game-thermal-equilibrium}. We end up with a boring configuration where nothing interesting ever happens again.
\end{itemize}

\begin{figure}[H]
	\begin{center}
		\caption{Matter evolving from initial configuration}
		\begin{subfigure}[b]{0.3\textwidth}
			\caption{Matter concentrated in special initial state}\label{fig:bolztmann-start}
			\includegraphics[width=\textwidth]{bolztmann-start}
		\end{subfigure}
		\;
		\begin{subfigure}[b]{0.3\textwidth}
			\caption{Matter streaming out and eddying}\label{fig:one_way_street-Boltzmann}
			\includegraphics[width=\textwidth]{one_way_street-Boltzmann}
		\end{subfigure}
		\;
		\begin{subfigure}[b]{0.3\textwidth}
			\caption{Boring Thermal Equilibrium}\label{fig:end-game-thermal-equilibrium}
			\includegraphics[width=\textwidth]{end-game-thermal-equilibrium}
		\end{subfigure}
	\end{center}
\end{figure}

Boltzmann knew this wasn't quite right. If you wait long enough the particles will originally assemble in the corner again--Figure \ref{fig:bolztmann-start}--then Figure \ref{fig:one_way_street-Boltzmann}. Figure \ref{fig:end-game-thermal-equilibrium} is not the end game after all, just the end game for a long, long time. These things are called Poincar\'e Recurrences.

\begin{figure}[H]
	\caption{Configuration Space}
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{Space of all possible configurations: blue region represents all coordinates where there is interesting stucture, e.g. galaxies, planets, birds; little pink dot the very special configuration; white is boring equilibrium. System evolves from starting configuration through interesting configurations to boring.}
		\includegraphics[width=\textwidth]{time-config-space}
	\end{subfigure}
	\;
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{If you wait long enough, Universe will pass through every possible state.  Now and then it will go through blue region occasionally without going through pink, but sometime pink also. In the blue region plants and galaxies can exist, but we usually don't go through special starting region.}\label{fig:time-univers-passes-through-every-possible-state}
		\includegraphics[width=\textwidth]{time-univers-passes-through-every-possible-state}
	\end{subfigure}
	\;
	\begin{subfigure}[b]{0.3\textwidth}
		\caption{This is how a universe built from fluctuation might look.}\label{fig:time-universe-from-fluctuation}
		\includegraphics[width=\textwidth]{time-universe-from-fluctuation}
	\end{subfigure}
\end{figure}

Figure \ref{fig:time-univers-passes-through-every-possible-state} that, most often, if you get a world that looks like ours, the past won't look like our past. Most of the time the universe won't look like it flowed out of the corner, i.e. the Big Bang. Most universes that are created out of fluctuation don't look recognizable--Figure \ref{fig:time-universe-from-fluctuation}. \emph{Boltzmann therefore rejected this as a possible explanation of the world.} Only the first time that the universe drops out of a corner do we get stars and galaxies; most other times we get random garbage, but good enough to live in. You don't see the Big Bang, but something random.

The modern version of Boltzmann's question is: what is the most likely configuration for the universe, given that it contains intelligence and is able to ask questions such as ''what is the most likely configuration...''? The most likely thing is a brain and nothing else--Figure \ref{fig:t1ws-brain}.

\begin{figure}[H]
	\begin{center}
		\caption[The most likely thing is a brain and nothing else]{The most likely thing is a brain and nothing else, because to make 2 brains is much less likely.}\label{fig:t1ws-brain}
		\includegraphics[width=0.6\textwidth]{t1ws-brain}
	\end{center}
\end{figure}

Physicists call Figure \ref{fig:t1ws-brain} a Boltzmann Brain. This isn't the right theory of the world, as we don't see this.

\begin{itemize}
	\item It is very unlikely that we live in a Boltzmann's Box;
	\item What does cosmology have to say about it?
	\item What we want is a "one-shot" universe with a very special starting point. It does its own thing, and thee is no chance of recurrences.
\end{itemize}
You still have a problem understanding why the molecules started in a very special configuration, but maybe one day we'll understand that.

\subsection{Modern Cosmology to the rescue}

Twenty five years ago we had two types of Big Bang cosmology, Open and Closed --Figures \ref{fig:wt1ws-closed-universe} and \ref{fig:wt1ws-openuniverse}. They are both one-shot universes, but we need to understand the starting point.

\begin{figure}[H]
	\caption{Twenty five years ago we had two types of Big Bang cosmology}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Closed Universe (Big Crunch)}\label{fig:wt1ws-closed-universe}
		\includegraphics[width=\textwidth]{wt1ws-closed-universe}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Open Universe}\label{fig:wt1ws-openuniverse}
		\includegraphics[width=\textwidth]{wt1ws-openuniverse}
	\end{subfigure}
\end{figure}

\subsection{More modern Cosmolgy: the problem returns.}
Then they discovered dark energy--$\Lambda$. This can have two effects:
\begin{enumerate}
	\item \emph{either} $\Lambda>0$, which accelerates the expansion--Figure \ref{fig:wt1ws-lambda-plus};
	\item \emph{or} $Lambda<0$, which accelerates the crunch--Figure \ref{fig:wt1ws-lambda-minus}.
\end{enumerate}

\begin{figure}[H]
	\caption{Effect of $\Lambda$, the Cosmological Constant}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{ $\Lambda>0$}\label{fig:wt1ws-lambda-plus}
		\includegraphics[width=\textwidth]{wt1ws-lambda-plus}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{ $\Lambda<0$}\label{fig:wt1ws-lambda-minus}
		\includegraphics[width=\textwidth]{wt1ws-lambda-minus}
	\end{subfigure}
\end{figure}

These both sound like good candidates for a one-shot universe. In our universe  $\Lambda>0$ (observed), which sounds like a one-shot universe. So why is it a problem?
Hubble's Law.
\begin{align*}
	V = H D
\end{align*}

In most cosmologies $H$ is not a real constant, but it is in Figure \ref{fig:wt1ws-lambda-plus}. So there is a certain distance where everything is receding from us at the speed of light--Figure \ref{fig:wt1ws-hubbleC}, so it, and the region beyond it, cannot be seen. This circle is known as the Cosmic Horizon: it is like a Black Hole Horizon inside-out..

\begin{figure}[H]
	\begin{center}
		\caption{The Cosmic Horizon}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{The Cosmic Horizon: $c=HD$}\label{fig:wt1ws-hubbleC}
			\includegraphics[width=0.8\textwidth]{wt1ws-hubbleC}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Inside the Cosmic Horizon: de Sitter Space}\label{fig:wt1ws-horizon}
			\includegraphics[width=0.8\textwidth]{wt1ws-horizon}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Eventually all other galaxies move past horizon}\label{fig:wt1ws-eventually}
			\includegraphics[width=0.8\textwidth]{wt1ws-eventually}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Later protons evaporate, and the radiation passes out through the horizon. Eventually there is nothing left.}\label{fig:wt1ws-even-more-eventually}
			\includegraphics[width=0.8\textwidth]{wt1ws-even-more-eventually}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Hawking realized that the horizon is not a cold, dead place. It has quantum energy. It has a temperature, and behaves like particles in a box, which constantly fluctuate. Every so often Boltzmann rears his head and says that the particles will sometimes assemble themselves into a structure of some sort.}\label{fig:wt1ws-hawking}
			\includegraphics[width=0.8\textwidth]{wt1ws-hawking}
		\end{subfigure}
		\begin{subfigure}[t]{0.45\textwidth}
			\caption{Wait long enough we get a Boltzmann brain, which eventually will evaporate....}\label{fig:wt1ws-hawking-bolzmann}
			\includegraphics[width=0.8\textwidth]{wt1ws-hawking-bolzmann}
		\end{subfigure}

	\end{center}
\end{figure}

	So we are back with the original paradox: wait long enough in a universe and, if there is intelligence, it is overwhelmingly probable that we'll be dealing with something very different from us. We are back in Boltzmann's box: there is still something wrong...That is the great puzzle of time in our time.

\subsection{One possible solution: the Multiverse.}
In the Multiverse we start with an expanding empty space. There are fluctuation, so things happen even in this empty space. Sydney Coleman discovered that the universe like this will from time to time boil a bubble--Figure \ref{fig:wt1ws-bubble}.

\begin{figure}[H]
	\caption{The Multiverse: there are fluctuation, so things happen even in this empty space}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Bubble: space is a little different within the bubble}\label{fig:wt1ws-bubble}
		\includegraphics[width=\textwidth]{wt1ws-bubble}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{The bubble stars to grow, and eventually becomes a  universe. Within that universe another little bubble can form. It's a free lunch.}\label{fig:wt1ws-bubble-grows}
		\includegraphics[width=\textwidth]{wt1ws-bubble-grows}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Universe grows. Eventually it gets big enough for two parts to be unable to communicate, represented as a bifurcation. Colours represent bubbles. Each line is a universe in which somebody may be able to live. Colour changes represent Coleman-de Lucca bubbles.}\label{fig:wt1ws-growth}
		\includegraphics[width=\textwidth]{wt1ws-growth}
	\end{subfigure}
	\begin{subfigure}[t]{0.45\textwidth}
		\caption{Let's imagine that we move along a branch where we can live. ({eq:wt1ws:markov}) represents probabilities or seeing various things. This gives the same sort of answers as Boltzmann's box--the wrong kind of answers.}\label{fig:wt1ws-lets-imagine}
		\includegraphics[width=\textwidth]{wt1ws-lets-imagine}
	\end{subfigure}
\end{figure}

Average number of universes of type $m$
\begin{align*}
	N_m (t+1)=& 2 N_m(t)-\sum \gamma_{nm} N_{m}(t)  + \sum \gamma_{mn}N_n \numberthis \label{eq:wt1ws:markov}
\end{align*}

This is another dead end. We keep coming back to random fluctuations.

If $\lambda<0$ there are crunches, ans some bubbles have the possibility of dying.

\begin{figure}[H]
	\caption{Maybe red corresponds to a Crunch}\label{fig:wt1ws-crunches}
	\includegraphics[width=0.8\textwidth]{wt1ws-crunches}
\end{figure}

\begin{align*}
N_m (t+1)=& 2 N_m(t)-\sum \gamma_{nm} N_{m}(t)  + \sum \gamma_{mn}N_n - \gamma_m N_m
\end{align*}
This is similar to an equation with a fluid flowing from source to sink, which created eddies. Vortices have a sense of time: time is a one way street.

\bibliographystyle{unsrt}
\addcontentsline{toc}{section}{Bibliography}
\raggedright
\bibliography{tm}

\end{document}


% LaTeX .tex example for the proceedings of
% CLIV 3 - III Latin American Wind Engineering Congress
% November, 5-8, 2018, São Paulo, SP, Brazil
%
% Based on the template of the proceedings of COBEM2017
% MODELO CLIV 3

\documentclass[10pt,fleqn,a4paper,twoside]{article}
\usepackage{cliv}
\usepackage[utf8]{inputenc}
\usepackage[english,portuguese,spanish]{babel}
\usepackage{url}
\def\shortauthor{P. Jabardo, L. Alves, G. Borelli and G. Nader}
\def\shorttitle{Low Cost Anemometers}

\begin{document}
	\fphead
\hspace*{-2.5mm}\begin{tabular}{||p{\textwidth}}
\begin{center}
\vspace{-4mm}
\title{ %CLIV3-2018-XXXX\\
LOW COST ANEMOMETERS FOR WIND TUNNEL AND VENTILATION APPLICATIONS} % (XXXX is the manuscript number)
\end{center}

\authors{Paulo José Saiz Jabardo} \\
\authors{Leandro Alves} \\
\authors{Gabriel Borelli}\\
\authors{Gilder Nader}\\
\institution{Instituto de Pesquisas Tecnológicas - Av. Prof. Almeida Prado 532, São Paulo, SP}\\
\institution{pjabardo@ipt.br, leoalvs@ipt.br, gborelli@ipt.br, gnader@ipt.br} \\
\\
\abstract{\textbf{Abstract.} Low cost and simple constant current and pulsed constant temperature anemometers are described. The proposed anemometers use a self-heated thermistor as a flow sensor and very simple electronics are used. Data acquisition and control use commonly available micro-controllers. A simple heat transfer model is used to simulate the main characteristics of the sensor and laboratory tests show that the calibration curves of the sensors are repeatable and even though the sensor has a spherical shape, a directional sensitivity is noticeable. }\\
\\
\keywords{\textbf{Keywords:} anemometer, wind tunnel, ventilation, constant current, constant temperature}\\
\end{tabular}

\section{INTRODUCTION}

Thermal anemometers are very common in wind engineering and ventilation. In particular its ability to measure very low wind speeds is a distinctive advantage when compared to Pitot tubes. Depending on sensor element dimensions, very high frequencies and speeds can be measured as well. Two simple thermal anemometers using small thermistors as sensors are proposed and analyzed. The objective of this work is to develop low cost and simple arrays of velocity probes using readily available micro-controllers for data acquisition. A further objective is to find a replacement of the Irwin probes for pedestrian level wind measurements.

While thermal anemometers are common, they usually consist of  hand held versions and are not very suitable for making sensor arrays. Some models cost US\$50 a unit, but quality meters usually cost US\$200 or more. Arrays of rugged \emph{and} disposable sensors that can be easily installed inside wind tunnel models are harder to come by.

\section{MODELING THERMAL ANEMOMETERS}

The loss of heat of a warm body exposed to air depends on the velocity of the air: the higher the velocity, the larger the heat loss. Newton's law of cooling provides a simple, empirical relationship for the heat loss \citep{Incropera96}. On the other hand, if an electric current is passing through the body, heat is generated according Joule's law of heating. These two phenomena, along with thermal inertia of the body results in a differential equation for the temperature of the body:

\begin{equation}
  mc_p\frac{dT}{dt} = -h\cdot A\cdot \left(T - T_a\right) + R\cdot i^2
  \label{eq:temp}
\end{equation}

In this equation $T$ is the temperature of the body, $m$ is its mass and $c_P$ its specific heat. The convection coefficient is given by $h$, $A$ is the external surface area of the heated body and $T_a$ is the room temperature. Finally, $R$ is the electric resistance of the body and $i$ is the electric current circulating through it.

This simplified model assumes that the temperature of the body is uniform. This is valid if the Biot number $Bi = hL/k$ is small enough (where $k$ is the thermal conductivity of the body and $L$ is a typical dimension). As it will be seen later, this hypothesis is not always true. A major drawback in this model is the value of the convection coefficient $h$: it is not known but it strongly depends on the fluid velocity. While the literature abounds with correlations for the convection coefficient, most of them have high uncertainty and are valid for very specific geometries. The practical result of these observations is that thermal anemometry can not be  a primary standard for fluid velocity: a calibration will always be necessary. But this simple model and literature correlations are enough to understand the behavior and design a thermal anemometer.

Equation \ref{eq:temp} can be used in several ways to implement a thermal-anemometer but usually, the anemometer depends on the variation of electrical resistance ($R$) with temperature. Most solids present, in a wide range of temperature around room temperature, a linear relationship between resistance and temperature where the resistance gradually increases with temperature. Some semiconducting materials, on the other hand, might present strong, nonlinear, variations of resistance with temperature which, while presenting a more complicated behavior, also responds much better to small variations in temperature. These materials are often called \emph{thermistors} and often have a negative temperature coefficient (NTC), i.e., the resistance decreases with increasing temperature. The anemometers developed in this study use NTC thermistors as sensor elements. A semi-empirical relationship between resistance and temperature is given by the following equation \citep{Sandborn72}:
\begin{equation}
  R = R_0 \cdot e^{B\cdot\left(\frac{1}{T} - \frac{1}{T_0} \right)}
  \label{eq:thermistor}
\end{equation}
where $R_0$ is the resistance of the thermistor at the reference temperature, usually $293.15\:K = 20^\circ C$ and $B$ is an empirical coefficient which varies for different thermistors.

\begin{figure}[h!]
\centering
\includegraphics[width=0.45\textwidth]{../../figures/termistor.jpg}
\caption{Photo of a thermistor with an approximate diameter of 2 mm. $R_0 = 5\:k\Omega$ and $B = 3000\:K$}
\label{fig:thermistor}
\end{figure}

Thermistors come in all sizes and shapes. Figure \ref{fig:thermistor} shows a photograph of a thermistor with an approximate diameter of 2 mm. Its spherical overall shape suggests that it can be used as an omni-directional probe. It will be shown later that this specific thermistor has a directional sensitivity which can not, be simply discarded.

The strong dependence of resistance on temperature and its small dimensions make the thermistor shown on figure \ref{fig:thermistor} a strong candidate for an anemometer sensor element. In steady flow, equation \ref{eq:temp} reduces to:
\begin{equation}
  R(T)\cdot i^2 = h(U)\cdot A \cdot \left(T - T_a\right)
  \label{eq:anemo}
\end{equation}
There are two common ways to use this equation to measure velocity:
\begin{itemize}
\item Constant Current (CCA)
\item Constant Temperature (CTA)
\end{itemize}
Today, most hot wire anemometers are CTA but CCA has wide use still. We will analyze both since simple circuits using both principles are suggested.

\subsection{Constant Temperature Anemometer (CTA)}
For now, no mechanism is proposed on how to keep the temperature constant. But if the temperature is constant, so is the resistance. An operating temperature is selected ($T_w$) and the circuit tries to keep the resistance constant equal to $R_w = R(T_w)$. The voltage ($E_0$)  across the sensor element is, according to eq. \ref{eq:anemo}:
\begin{equation}
  E_0 = \sqrt{R_w h A \left(T_w - T_a\right) }
  \label{eq:cta}
\end{equation}

\begin{figure}[h!]
  \centering
  \begin{tabular}{cc}
    \includegraphics[width=0.45\textwidth]{../../figures/CTA-Eo.pdf} &
    \includegraphics[width=0.45\textwidth]{../../figures/CTA-dt.pdf} \\
    \parbox{0.4\textwidth}{\footnotesize (a) Effects of diameter and operating temperature on anemometer output} & \parbox{0.4\textwidth}{\footnotesize (b) Effects of $1^\circ C$ increase of room temperature ($T_a$) on anemometer output}\\
  \end{tabular}
  \vspace{0.4cm}
\caption{Simulation of a  a constant temperature anemometer for different diameters and operating temperatures ($T_w$). $R_0 = 5\:k\Omega$ and $B = 3000\:K$}
\label{fig:cta1}
\end{figure}

Figure \ref{fig:cta1}a shows the response of a constant temperature anemometer for different operating conditions. It is clear that the diameter has a large effect on the output. The power (and voltage) required is much larger but the sensitivity isn't any better. The operating temperature also affects the power requirements but higher operating temperatures present an advantage: the effect of room temperature variation is smaller as shown on figure \ref{fig:cta1}b where the effect of a $1^\circ C$ room temperature increase is shown as anemometer output difference.

\subsection{Constant Current Anemometer (CCA)}

When operating at constant current, the temperature will vary, even though the current is constant. In this case, no simple explicit expression for the output voltage exists and a nonlinear algebraic equation must be solved for each wind velocity. Figure \ref{fig:cca1} shows the general behavior of the constant current anemometer.

\begin{figure}[h!]
\centering
% \includegraphics[width=0.8\textwidth]{../../figures/CCA.pdf}
  \begin{tabular}{cc}
    \includegraphics[width=0.45\textwidth]{../../figures/CCA-Eo.pdf} &
    \includegraphics[width=0.45\textwidth]{../../figures/CCA-T.pdf} \\
    \parbox{0.4\textwidth}{\footnotesize (a) Effects of probe current on anemometer output} & \parbox{0.4\textwidth}{\footnotesize (b) Temperature of a thermistor for constant current operation}\\
  \end{tabular}
  \vspace{0.4cm}

\caption{Simulation of a constant current anemometer for different currents. $R_0 = 5\:k\Omega$ and $B = 3000\:K$}
\label{fig:cca1}
\end{figure}

The output voltage of the CCA behaves as expected (figure \ref{fig:cca1}a) but there one important aspect: the temperature increases significantly for lower velocities (figure \ref{fig:cca1}b). Since the thermistor used has a maximum operating temperature of 120 $^\circ C$, a burn out of the sensor is a real possibility if the currents are high or the sensor is used in a small confined space. These high temperatures may also change the calibration curve. Since the operating temperature changes considerably with wind speed, corrections due to room temperature ($T_a$) are more complicated and can be large for higher speeds.

\subsection{Time constant of the sensor}

Up to this point, a steady flow and a stable anemometer was assumed. If the flow velocity changes, the response of the anemometer will depend on the dynamics of the sensor. This dynamics is also important when designing the circuit. The simplest way to assess the dynamics of the sensor is to estimate how long it takes for the sensor to cool down from a given higher than room temperature. The time constant depends on the velocity and using equation \ref{eq:temp} with fixed $h$, a time constant of the order of 1 s  is obtained. The time that it takes for the temperature difference to drop 10\% is given by
\begin{equation}
  \tau = -\ln(0.9) \cdot \frac{m\cdot c_p}{h\cdot A}
  \label{eq:timeconst}
\end{equation}
For $U=10\:m/s$, $\tau \approx 0.5\:s$.

\section{THE ELECTRONICS OF THE LOW COST ANEMOMETERS}
The idea behind this project is the design of low cost and easy to manufacture anemometers. If arrays of sensor are to be used, it is interesting to have a simple computer data acquisition system. This project uses the NodeMCU 32s micro-controller board to control and acquire data from the anemometer. This board has 16 analog 12 bit inputs and several other digital inputs/outputs. Besides USB communication, the NodeMCU board has both built-in wi-fi and Bluetooth. The development environment is the same one used by Arduino so that reference materials are easily available.

\subsection{The Constant Current Anemometer}
The low time constant of the thermistor and the low current involved makes it possible to use commonly found integrated circuits (IC) to generate a constant current source. The LM317LZ is a cheap, easy to use and widely available voltage regulator that can be easily used to design a constant voltage current source. This IC tries to maintain a constant voltage of 1.25 V between its output and adjust terminals but with a resistor it can be used as a constant current source. Figure \ref{fig:electronics} shows the circuit that implements the anemometer. The 82 $\Omega$ resistor ensures an output current of approximately 15 mA. Since the output voltage can be as high as 20 V and the analog inputs of the micro-controller are limited to 3.3 V, a voltage divider is used to ensure a lower voltage at the analog input of the NodeMCU 32s.

\begin{figure}[h!]
  \centering
  \begin{tabular}{cc}
    \includegraphics[width=0.46\textwidth]{../../figures/cca.pdf} &
    \includegraphics[width=0.46\textwidth]{../../figures/cta.pdf} \\
    (a) Constant current anemometer (CCA) & (b) Pulsed constant Temperature anemometer (PCTA)\\
  \end{tabular}
  \vspace{0.5cm}
  \caption{Anemometer electronic circuits }
\label{fig:electronics}
\end{figure}

\subsection{The Pulsed Constant Temperature Anemometer}

A typical constant temperature anemometer uses analog electronics to implement the feedback control of the temperature. The electronics for this feedback control can be quite complicated for a non-expert. The usual approach is to use a Wheatstone Bridge that is balanced when the sensor resistance equals the preset operating resistance ($R_w$). When the resistance drifts off, the bridge is unbalanced and this unbalance is used to control the input to of bridge. The general layout can be seen in \citet{Lomas86} and a specific implementation is provided by \citet{Palma16}. Even though the large time constant of the thermistor and large resistance change with temperature may allow for a simpler circuit, its design and implementation is much more complicated than the constant current anemometer proposed here for instance. Another approach is to implement the control in the micro-controller using high level language programming. Most micro-controller do not have analog output. But they do have PWM output. Pulse Width Modulation (PWM) is a rectangular wave with constant frequency and amplitude where the percentage of time the pulse is at a high voltage can be varied between 0\% (always off) and 100\% always on.

The idea behind the pulsed constant temperature anemometer (PCTA) is to control the percentage of time current is fed from a constant voltage source (in this case a 24 V easily available source). The control variable is the fraction of time $x$ that the circuit is on (therefore, $0 \le x \le 1$). The PCTA was implemented using the circuit shown in figure \ref{fig:electronics}b. The transistors in this circuit operate in saturation so they work in on/off conditions depending on the instantaneous output of the PWM signal from the controller. The circuit is basically used to turn on and off the current to the thermistor.

If the resistance of the thermistor starts to fall, its temperature is increasing and $x$ should be lowered. On the other hand, if the resistance rises, the temperature is increasing and $x$ should be increased.

The trick is to measure the resistance. This done by a low pass filter that measures the current on a small resistor in series with the thermistor. If the PWM frequency is high, the output from the filter will oscillate slowly and the mean current is given by $i = Eo / 100\Omega$. With this information, the thermistor resistance can be estimated as:

\begin{equation}
  R = 100\Omega\cdot\left( x \frac{24V}{E_o} - 1 \right)
  \label{eq:Rt}
\end{equation}

This can be compared to the expected resistance of the thermistor $R_w = R(T_w)$. Since the response of the thermistor is slow, this can be easily accomplished in commonly available micro-controllers which will adjust the PWM accordingly ($x$).

It is interesting to note that since in steady state the stable value of $x$ varies with the velocity of the fluid, a simple proportional controller will operate very poorly. A digital Proportional/Integral controller was implemented to keep the resistance constant.

\section{RESULTS AND DISCUSSION}

Both anemometers constructed where calibrated and a few tests where carried out. Figure \ref{fig:calibr-cca} shows the results for the CCA. The calibration is repetitive and when large change of velocity occurs (both up and down), the sensor responds accordingly. The sudden downward change in velocity was obtained by shutting off a 25 m/s flow. The upward step change in velocity was obtained by rapidly moving the sensor into a 25 m/s flow. In the case of the CTA (figure \ref{fig:calibr-cta}), the calibration curve is still good but not as good as observed for the CCA. When large change in velocities occur, the controller implemented has some difficulty for a while but recovers after a few seconds. The tuning of the PI controller is an on going work and better results are expected. The calibrations where carried out using the Dantec Dynamics calibrator.

Even though the thermistor has a general spherical shape the probe is not omni-directional as is shown in figure \ref{fig:calibr-dir}. A support used for directional calibration of 3D hot wire probes was used to vary the wind incidence. There is a 30\% variation in velocity depending on the orientation. It is interesting to note both cusps on the curve. These directions happen to coincide with flow parallel to the plane formed by the thermistor lead (flow parallel to photo shown in figure \ref{fig:thermistor}). While asymmetries in the shape and flow around the thermistor can cause some directional sensitivity, the presence of the abrupt cusps in the curve suggests that the internal current flux inside the thermistor is the cause to the directional sensitivity. Further research using numerical simulation is ongoing to better understand this result.

\begin{figure}[h!]
\centering
\includegraphics[width=0.75\textwidth]{../../figures/cca-cal.pdf}
\caption{Calibration curves and step down and step up velocity changes for the constant current anemometer}
\label{fig:calibr-cca}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=0.75\textwidth]{../../figures/cta-cal.pdf}
\caption{Calibration curves and step down and step up velocity changes for the pulsed constant temperature anemometer}
\label{fig:calibr-cta}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=0.65\textwidth]{../../figures/dircal.pdf}
\caption{Directional calibration of the anemometer}
\label{fig:calibr-dir}
\end{figure}

\section{CONCLUSIONS}
Two different, simple and cheap circuits to measure air velocity were proposed and analyzed. The calibration curves showed little dispersion which indicates that both circuits have potential. The ability to build cheap arrays velocity sensors opens up several possibilities in wind engineering and ventilation, both in the wind tunnel and in field measurements. The cost of the micro-controller is around US\$20 in Brazil and each sensor costs and additional US\$2 with the possibility of using 12-16 sensors per micro-controller. Manufacturing requires elementary soldering capabilities.

The controller of the constant temperature anemometer could certainly see some improvement. An issue that was not dealt up to this point is the effect of changes in room temperature. Since the operating temperature is low (much lower than typical operating temperature of research hot wire systems), the effect of changes in room temperature will be more significant. The expression suggested by \citet{Jorgensen02} can be used for the PCTA but an expression using the calibration curve of the sensor itself could be developed (the calibration curve is a sort of convection coefficient curve). In the case of the constant current sensor, the variation of operating temperature with velocity introduces complications but an approximate temperature correction might be possible.

It is not clear if the sensitivity to direction is due to geometry or the internal structure of thermistor which causes asymmetric heat exchange. Perhaps a simple probe support could improve this. The cusps visible in figure \ref{fig:calibr-dir} suggest that the current flux between the thermistor leads is responsible. If that is the case, thermistors with different shapes, where leads arrive and leave in the same direction could solve part of the directional sensitivity. This problem will require further research. While e 30\% variation is not too large, without further studies, this probe can not simply replace the Irwin probe \citep{Irwin81} for \emph{mean} pedestrian level velocity measurements.

This project is open sourced and any contributions are welcomed. See \url{https://github.com/pjabardo/ThermistorHW.jl} for further developments.

\section{REFERENCES}

\bibliographystyle{cliv}
\renewcommand{\refname}{}
%\bibliography{bibfile}
\bibliography{bibanem}

\section{RESPONSIBILITY NOTICE}

The authors are the only responsible for the printed material included in this paper.

\end{document}