\chapter{Electrostatic Physics Model}\label{chap:epm}

The goal of the electrostatic physics model is to calculate the
capacitances between each of the six nodes: the body, the ground, the
two transmitter electrodes and the two receiver electrodes, as shown
in Figure \ref{pan:nodenum}.

\begin{figure}
\begin{center}
\mbox{\epsfysize=2in \epsfbox{nodes.eps}}
\end{center}
\caption{Node numberings}
\label{pan:nodenum}
\end{figure}

All nodes are treated as equipotentials.  This is obviously the case
for the 4 electrodes.  The body's internal impedance is on the order
of 10s of ohms, which makes it effectively equipotential.  The ground,
depending on the specific conditions, will have an internal impedance
as well, but remains approximately equipotential.

\section{Successive Over-Relaxation (SOR)}

In order to to numerically solve Poisson's equation (Equation
\ref{eqn:poisson}), it is necessary to notice that its steady state
solution is the same as that for diffusion, and can be solved by
iteration of the 3D successive over-relaxation equation for a field
without free charge:

\begin{equation}\label{eqn:sor}
\phi^{n+1}_{j,k,l} = (1-\alpha)\phi^{n}_{j,k,l} + \frac{\alpha}{6}(
\phi^{n}_{j+1,k,l} + 
\phi^{n}_{j,k+1,l} + 
\phi^{n}_{j,k,l+1} + 
\phi^{n}_{j-1,k,l} + 
\phi^{n}_{j,k-1,l} + 
\phi^{n}_{j,k,l-1})
% - 
%\frac{\alpha({\delta}x)^{2}}{6}\rho_{j,k,l}
\end{equation}

Here $\alpha$ is a relaxation rate not to exceed 2; it is best
determined empirically.

\section{Geometry}

While an arbitrarily detailed model of electrodes and a person or
persons could be used, for this thesis, people will be modeled as
cylinders, spheres, rectangular prisms, or combinations thereof.

\par

A set of configurations, representing expected practical geometries
were simulated.

\section{Capacitance calculation}

To determine the capacitance between any two nodes in the system,
a different arbitrary potential is assigned to each of the two nodes ($\phi_1$ and $\phi_2$).
Equation \ref{eqn:sor} is then applied until the changes become small.

\par

Given the potentials $\phi_{j,k,l}$, the resultant charge implied can
be calculated using the finite difference approximation of Equation
\ref{eqn:charge}:

\begin{equation}
\frac{q}{\epsilon} =
\sum_{{\rm node}} 6\phi_{j,k,l} 
- \phi_{j+1,k,l}
- \phi_{j,k+1,l}
- \phi_{j,k,l+1}
- \phi_{j,k,l-1}
- \phi_{j,k-1,l}
- \phi_{j-1,k,l}
\end{equation}

The charges for the pair of nodes in questions, $q_1$ and $q_2$, with
the assigned potentials can be used to arrive at an inter-node
capacitance:

\begin{equation}
C_{12} = \frac{q_2}{\phi_1} = \frac{q_1}{\phi_2}
\end{equation}

\section{Implementation}

The implementation was done in C and can be found in Appendix
\ref{app:source}.  The current version is somewhat more memory
intensive than would be ideal.  Each ``point'' is internally
represented as a float, which is 4 bytes on most operating systems.
The algorithms could likely be redone in integer math with substantial
savings in both efficiency and memory usage, with some loss of
precision.

\par

In order to model systems on the scale of a person (2 meters), at a
resolution down to typical electrode separations (centimeters), it is
necessary to use a grid of greater than 200 points per axis, which
yields a memory usage of over 32 megabytes.


\par

\begin{figure}\label{pan:field}
\begin{center}
\mbox{\epsfysize=3in \epsfbox{field.eps}}
\end{center}
\caption{Electric Potential in the Vicinity of the Body with PAN Transmitter}
\end{figure}

A sample of the total resultant field appears in figure
\ref{pan:field}.  The body is a vertical cylinder above the parallel
transmitter plates, which are directly above a ground plate.  In the
figure, the transmitter potentials (still the largest features of the
plot) have been truncated for clarity of visual display.
