\documentclass[11pt,twoside,a4paper,notitlepage]{scrartcl} 
%==============================================
% Version 0.1 Nov 2005 JM
% Version 1.0 Sep 2006 JM
%==============================================

% PACKAGES

\usepackage{color}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{marvosym}
\usepackage{eufrak}
\usepackage{color}
\usepackage{listings}
\usepackage{subfigure}
\usepackage{url}
%\usepackage[T1]{fontenc}
\usepackage[latin1,applemac]{inputenc}

\usepackage{fancyheadings}
%\pagestyle{fancyplain}
% Remember chapter title
\newcommand{\chaptermark}[1]{\markboth{Chap. \thechapter:\ #1}{}}
% section number and title
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\lhead[\fancyplain{}{\bfseries\thepage}] %
    {\fancyplain{}{\bfseries\rightmark}} 
\rhead[\fancyplain{}{\scshape\leftmark}] %
    {\fancyplain{}{\bfseries\thepage}}
\cfoot{}


%\RequirePackage{palatino}\fontfamily{ppl}

\usepackage{natbib}

%\usepackage{showkeys}

\usepackage[colorlinks=true,linkcolor=blue]{hyperref}		% must be the last package


% LEVEL OF HEADERS

\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}


%\evensidemargin=-0.3cm
%\oddsidemargin=1.5cm
\textheight=23.0cm

\newcommand{\ip}[2]{\ensuremath{\langle{#1},{#2}\rangle}}
\newcommand{\norm}[1]{\ensuremath{\|#1\|}}
\newcommand{\est}[1]{\ensuremath{\widehat{#1}}}
\newcommand{\abs}[1]{\ensuremath{|#1|}}
\newcommand{\Abs}[1]{\ensuremath{\left|#1\right|}}
\newcommand{\cc}[1]{\ensuremath{\overline{#1}}}
\newcommand{\real}{\ensuremath{\rm{Re}}}
\newcommand{\SNR}{{\rm{SNR}}}
\newcommand{ \AAA }{ABC\ }
\newcommand{\us}{\ensuremath{\rm{\mu s}}}
\newcommand{\EQ}[1]{\begin{equation}\label{Eq:#1}}
\newcommand{\EE}{\end{equation}}
\newcommand{\Eq}[1]{Eq.~(\ref{Eq:#1})}
\newcommand{\Equation}[1]{Equation~(\ref{Eq:#1})}
\newcommand{\Fig}[1]{Fig.~\ref{Fig:#1}}
\newcommand{\Figure}[1]{Figure~\ref{Fig:#1}}
\newcommand{\Table}[1]{Table~\ref{Tab:#1}}
\newcommand{\EISCAT}{\mbox{EISCAT}}
\newcommand{\prog}[1]{\textsc{#1}}
\newcommand{\degr}{\ensuremath{^\circ}}
\newcommand{\mpersec}{\ensuremath{\rm{m\,s^{-1}}}}
\newcommand{\kmpersec}{\ensuremath{\rm{km\,s^{-1}}}}
\newcommand{\mperss}{\ensuremath{\rm{m\,s^{-2}}}}
\newcommand{\Hz}{\ensuremath{\mathrm{Hz}}}
\newcommand{\EqRef}[1]{(\ref{Eq:#1})}
\newcommand{\Page}[1]{p.~\pageref{#1}}
\newcommand{\Tc}{\ensuremath{T_\mathrm{c}}}
\newcommand{\ms}{\ensuremath{\mathrm{ms}}}
\newcommand { \SNRN } {\ensuremath { \mathrm { SNR_N } }}
\newcommand { \ENR } {\ensuremath { \mathrm { ENR } }}
\newcommand { \vRR } {\ensuremath { v_\mathrm{RR}  }}
\newcommand { \vD } {\ensuremath { v_\mathrm{D}  }}
\newcommand { \Tsys } {\ensuremath { T_\mathrm{sys} }}
\newcommand { \diric } {\ensuremath { \mathrm {diric} }} 
\newcommand { \MF } {\ensuremath { \mathrm { MF } }} 
\newcommand { \AF } {\ensuremath { \mathrm { AF } }} 
\newcommand { \FMF } {\ensuremath { \mathrm {FMF} }} 
\newcommand { \FAF } {\ensuremath { \mathrm { FAF } }} 

\newcommand { \Expe } {\ensuremath { { {\rm E} } }} 
\newcommand { \Dp } {\ensuremath { D_\mathrm { p } }} 
\newcommand { \Trep } {\ensuremath { T_\mathrm {rep} }} 
\newcommand { \Ratio } {\ensuremath { \mathrm {Ratio} }} 
\newcommand { \Exp }[1] {\ensuremath {\mathrm e ^ {#1}}} 
\newcommand{\BULLETS}{\begin{itemize}}
\newcommand{\ENDBULLETS}{\end{itemize}}
\newcommand{\ENUMERATE}{\begin{enumerate}}
\newcommand{\ENDENUMERATE}{\end{enumerate}}
\newcommand { \FRepI } {\cite{Markkanen2002}} 
\newcommand{\cm}{\ensuremath{\mathrm{cm}}}
\newcommand{\RCS}{\ensuremath{\mathrm{RCS}}}
\newcommand{\deff}{\ensuremath{d_\mathrm{eff}}}
\newcommand { \fRF } {\ensuremath {f_{\mathrm {RF}}}} 

\newcommand { \GE } {\ensuremath {G_{\mathrm {E}}}} 
\newcommand { \gE } {\ensuremath {g_{\mathrm {E}}}} 
\newcommand { \Gref } {\ensuremath {G_{\mathrm {ref}}}} 

\newcommand{\vc}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\uv}[1]{\ensuremath{\mathbf{\hat {#1}}}}

\newcommand{\Four}[1]{\ensuremath{\tilde {#1}}}
\newcommand { \sinc } {\ensuremath { \mathrm {sinc} }} 

\newcommand{\BL}[1]{\color{blue}#1 \color{black}}



\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi

\ifpdf
\usepackage[pdftex]{graphicx}
\else
\usepackage{graphicx}
\fi

\title{
\vspace{4cm}\BL{
E3ANT}\\
\vspace{0.2cm}
\Large
A Matlab Package for Phased Array Beam Shape Inspection\\
Version 1.0
}

\author{
J Markkanen\\
\url{www.sgo.fi/~jussi/}
}

\date{\today}

%======================================================
\begin{document}
%======================================================
\ifpdf
\DeclareGraphicsExtensions{.pdf, .jpg,.png}
\else
\DeclareGraphicsExtensions{.eps, .jpg}
\fi

\maketitle

\pagenumbering{arabic}
\thispagestyle{empty}

\null

\vspace{5.0cm}

\begin{center}
\includegraphics[height=35mm]{eiscatlogo2}

\end{center}

\normalsize
\color{black}


\pagebreak
%===================================================================

\tableofcontents
\pagebreak
\listoffigures
\label{ListOfFigures}
\pagebreak


\pagestyle{fancyplain}
%\pagestyle{plain}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Introduction}
%
These notes are a work on progress. They were started to document a set of  Matlab functions, the \prog{e3ant} package, which  I wrote to simulate the beam shape of a phased array for the \EISCAT\ 3D project. When starting the work, I knew absolutely nothing about phased arrays, and had to start digging up. It turned out that the books I could place my hands on where difficult for me to understand, or did not handle the aspects I was interested in, so I started to re-inventing the wheel for myself. These notes grew up in an effort to write down, in self-contained manner, what I have learned so far, and especially, what I have found puzzling. 

%The main Matlab functions of the \prog{e3ant} package are still mentioned here, but the functions have to some degree been rendered obsolete by the more complete system simulation package by Gustav Johansson from LTU. 

What I most especially have been struggling to understand is the supposedly well known equality of gain in reception and transmission. I'm getting to the impression that this is one of the things in physics that has been clarified so early in history that it now considered to use the result in all possible situations without any further justification. And, like in the case of, say, Heisenberg's uncertainly relation, the actual meaning of the result and its original premises,  are getting lost in the fog of history. Few books nowadays seem to bother to prove the results, and even those that do, still refer, without proof, to even more basic results of electromagnetism. So it is actually quite difficult to be sure that the premises on which the result is based actually hold on the E3D situation. 

The premises normally involve a single antenna used on-line in transmission and reception. I think I understand that situation and have traced the derivation in these notes. But what I'm actually worried about is what happens in the E3D situation when the beam-forming is done off-line and in possibly multiple ways. How do we compute the gain then, what is the equivalent antenna(s) for all  those beams? I do not know, yet.

I start in the next section by spectral domain based presentation of the basic ideas of array beam steering, with the main aim being in understanding the difference between time-steering and phase-steering. 

In chapter~\ref{Sec:AntennaGain} I labour on the issue of antenna gain, especially, the relation between the reception gain and the transmission gain. Also, I dwell on the, to me counterintuitive, result that the array gain can be larger (or smaller) than the ``natural'' value, element gain times the number of elements. 

In Chapter~\ref{Sec:PhasedArray} I derive the equations needed to compute array gain in absolute terms, especially, the power integral.   

In chapter~\ref{Sec:PhaseAndTime} I consider the effect of timing accuracy to the pointing accuracy, though it now appears that my underlying assumptions about the planned array might not be relevant anymore. Also, my timing error simulations, presented in chapter~\ref{Sec:Jitter}, have been rendered irrelevant by the much more careful computations done by Gustav Johansson and others of the 
Lule\r{a} group. 

In chapter~\ref{Sec:TestarraySNR} I compute estimates for the SNR of the Kiruna test array. 

The figures for these notes are in a section of their own, starting on~\Page{Sec:Figures}. 
The blue-coloured references to figures, equations, page numbers, sections, etc, in the on-line PDF version of this document are clickable hyperlinks. They should work in the Adobe Acrobat Reader, and the Preview application on Mac OS X.


%#############################################################
\section{Time steering and phase steering}
\label{Sec:TimeSteeringAndPhaseSteering}
%#############################################################
\subsection{Time steering}
%
In general, an incoming wave field can be represented by 
\EQ{AAA1}
	s(t,\vc{r}) = \int d^3\vc k \, S(\vc{k})
			\Exp{i \, (\vc k \cdot \vc r - \omega_{\vc k} t)}	\,,
\EE
where
\EQ{AAA2}
	\omega_{\vc k} = \norm{\vc k} c	\,.
\EE
As a special case, a multifrequency wave (``wave packed'', ``pulse'') coming from the direction of the unit vector $\uv{u}$ is decomposed to plane waves as
\EQ{AAA3}
	s(t,\vc{r};\uv u) = \int d\omega \, S_{\uv{u}}(\omega)
	 	\Exp{i (\frac{\omega}{c} \uv{u}   \cdot \vc{r} - \omega t)}
\EE
Assume the $M$ array elements are at positions $\vc R_m$, and denote by $s_m(t)$ the signal voltage across the terminal of the element $m$. The elements  take spatial samples of the incoming wavefield, 
\EQ{AAA4}
	s_m(t) = a_m \, s(t,\vc R_m)	\,,
\EE
where $a_m$ is a real-valued non-negative amplification factor, which can be used to implement non-trivial ``window functions'' on the array. 
Next, time-steer the array by delaying the signals $s_m$ by an element-wise delay $T_m$,
\EQ{AAA5}
	T_m = \frac {\vc R_m \cdot \uv u_0}{c} \,.
\EE
At the moment consider the unit vector $\uv u_0$ just a parameter that quantifies the scanning. We'll verify later that $\uv u_0$ is the direction of the scanned beam. But we note already here that  $T_m$ is the amount of time by which the incoming wave front from direction $\uv u_0$ hits later the element at 
$\vc R_m$ than it hits the coordinate system's origin $\vc R=\vc 0$. 

After the delays, an adder combines the elementary signals, to the final beam-formed signal
\EQ{AAA6}
	z = z(t,\uv u;\uv u_0) = \sum s_m(t-T_m) \,.
\EE
In the notation of \Eq{AAA6}, we included explicitly the two unit vectors $\uv u$ and $\uv u_0$, to keep the definition of the signal $z(t)$ in \Eq{AAA6}  as clear as possible: $z(t)$ is the signal voltage generated by a pulse coming from direction $\uv u$ when the array has been scanned to direction $\uv u_0$. But this description begs the following question: shouldn't the voltage $z(t)$ at the beam former output somehow also depend on what actually is on the sky? Of course it does depend: If the \emph{only} target on the sky is a point target in the direction $\uv u$ (yes: $\uv u$, not $\uv u_0$) , the signal $z$ in \Eq{AAA6} gives the actual measured voltage. But in general, there are more targets, a large distributed soft target in the \EISCAT\ case. Then the actual signal voltage is a sum integral over all directions, and we should compute $z(t)$ using \Eq{AAA1} throughout, instead of \Eq{AAA3}. The other way, which we will adopt in this note , is to continue using \Eq{AAA3}, but to keep in mind that \Eq{AAA6} does not give the total signal, but only the  linearly additive contribution, or ``weight'', of the target in the direction $\uv u$ to the total observed signal. We will see that the in practice only a narrow cone  around the direction of 
$\uv u_0$, and its direction-aliased directions if any,  contribute to the sum effectively.

We will first show that as a function of $\uv u$, $z(t)$ is ''maximized`` in the direction of 
$\uv u_0$  so that the parameter $\uv u_0$ indeed is the beam-steering direction as we have been saying. And we verify that \emph{in that direction} there is no dispersion, that is, all the frequency components  of the pulse yield exactly the same, equally phased, contribution to the sum, and hence the temporal shape of the incoming signal is recovered without distortion. On the other hand, there is dispersion in non-center-of-the-beam directions.  The effect hopefully is insignificant for narrow beams, but perhaps we should make sure.  (Question: Does GJ's system simulation already do this?) 
Expanding \Eq{AAA6} we get
\EQ{AAA7}
	z(t,\uv u;\uv u_0)
		 = \sum_m a_m \int \!\! d\omega\, S_{\uv{u}}(\omega)  
		\Exp {i \omega  [ (\uv u - \uv u_0)\cdot \frac {\vc R_m} {c} - t]}	\,,
\EE
so that in the direction $\uv u = \uv u_0$ we have
\EQ{AAA8}
	z(t,\uv u_0;\uv u_0)
		 = \sum_m a_m \int \!\! d\omega\, S_{\uv u_0}(\omega)  
		\Exp {-i \omega  t} 
		= \left ( \sum_m a_m \right ) \, s(t,\vc 0; \uv u_0) \,.
\EE
In the case that the element amplification factors $a_m$ are all unity, the beamformed signal from direction $\uv u_0$ is just the number of elements times the signal due to the field at coordinate origin, and in general, is intact in shape and is amplified by 
$\sum a_m$.  

We verify that the energy 
\EQ{AAA9}
	\norm{z}^2 = \int_{-\infty}^{+\infty} \!\!dt\,\abs {z(t)} ^2
\EE
of the beam-formed signal is maximum when $\uv u = \uv u_0$. As an underlying experimental setup, we are imagining here that the array steering has been fixed to $\uv u_0$, and the direction but not the distance to the point-target is varied, implying that the plane wave packet 
of \Eq{AAA3} comes from various directions $\uv u$, but is otherwise always the same so that 
$S_{\uv u}(\omega) = S_{\uv u_0}(\omega)$.
We write \Eq{AAA7} in the form 
\begin{eqnarray} \label{Eq:AAA10}
	z(t,\uv u; \uv u_0) = \int \!\!d \omega  \left\{ \sum_m  a_m S_{\uv u}(\omega)
		\Exp {i \frac \omega  c [ (\uv u - \uv u_0)\cdot \vc R_m]} 
			\right \}
			\Exp{i \omega t}
		\equiv 
			\int d\omega Z(\omega) \Exp{i \omega t} \,,
\end{eqnarray}
where
\EQ{AAA10.5}
	Z(\omega) = \sum_m  a_m S_{\uv u}(\omega)
		\Exp {i \frac \omega  c (\uv u - \uv u_0)\cdot \vc R_m} 
\EE
is, in fact,  the Fourier-transform of the beam-formed signal.
According to Parseval's theorem, 
\EQ{AAA11}
	\norm{z}^2 =  \int d\omega \abs{Z(\omega)}^2  \,.			
\EE
Because, with $a_m \geq  0$ and $S_{\uv u}(\omega) = S_{\uv u_0}(\omega)$,
\Eq{AAA10.5} implies that
\EQ{AAA12}
	\abs {Z(\omega)} \leq \sum_m a_m \abs {S_{\uv u}(\omega)} 
		= \left ( \sum_m a_m \right ) \abs {S_{\uv u}(\omega)}
		= \left ( \sum_m a_m \right ) \abs {S_{\uv u_0}(\omega)}
\EE
it follows from \Eq{AAA11} that
\EQ{AAA13}
	\norm{z(t,\uv u;\uv u_0)}^2 \leq \left( \sum_m a_m \right )^2 
					\int d\omega \abs{S_{\uv u_0}(\omega)}^2
					= \left( \sum_m a_m \right )^2 \norm{s}^2\,, 
\EE  
where $\norm{s}^2$ is the energy of $s(t,\vc 0; \uv u_0)$. From \Eq{AAA7} and \Eq{AAA13} we see that, indeed, the array gain in the direction $\uv u_0$ is maximal:
$\norm{z(t,\uv u;\uv u_0)} \leq \norm{z(t,\uv u_0;\uv u_0)}$. 



\subsection {Monochromatic signals---time-steering equals phase steering}
%========================================================
%
%
We will now show that for a monochromatic wave (continuous, not pulsed, sinusoidal wave), time-steering reduces to distortion-free phase steering.
Assume that instead of the wave packet of \Eq{AAA3},  the wave illuminating the time-steered array is a monochromatic plane wave with angular frequency 
$\omega_0$ coming coming from direction $\uv u$,
\EQ{AAA14}
	s(t,\vc r;\uv u) = S_0 
	\Exp { i (\frac {\omega_0}{c} \uv u \cdot \vc r - \omega_0 t) } \,.
\EE
This has spectrum $S(\omega) = S_0 \delta (\omega-\omega_0)$. Inserting the spectrum to \Eq{AAA7} gives the time-steered beam-former output as
\EQ{AAA15}
	z(t,\uv u; \uv u_0) = \sum a_m S_0 
		\Exp { i [\frac {\omega_0}{c} (\uv u - \uv u_0) \cdot \vc R_m - \omega_0 t] } \,.
\EE
We regroup \Eq{AAA15} as
\EQ{AAA16}
	z(t,\uv u; \uv u_0) = 
		\sum \left[ s(t,\vc R_m;\uv u) \,\, a_m \Exp{-i \Psi_m} \right]\,,
\EE
where
\EQ{AAA17}
	\Psi_m = \frac {\omega_0}{c} \uv u_0 \cdot \vc R_m \,.
\EE
\Equation{AAA16} shows that for a monochromatic wave, the end result of the 
time-delay-based beam-forming can be also achieved by using the non-delayed signal from each element, but instead applying an element-dependent phase offset $\Psi_m$ across the array. Note incidentally that \Eq{AAA17} shows why we need to take the amplification factors $a_m$ real-valued: if not real-valued, they would directly affect the steering phase. 

For the monochromatic wave, phase-steering and time-steering are equivalent, and  
\Eq{AAA8} therefore says that in the beam maximum direction \emph{neither} method distorts the (now sinusoidal) signal shape. Actually, there is no distortion in any other direction either for the sinusoidal signals, for \Eq{AAA15} says that the beam-formed signal is just the wave's time-form measured at the array origin, multiplied by the array factor \AF:
\EQ{AAA18}
	 z(t,\uv u;\uv u_0) = S_0 \Exp {- i \omega_o t} 
	 		\times \AF (\omega_0,\uv u -\uv u_0) \,,
\EE
where
\EQ{AAA19}
	\AF(\omega,\vc U) \equiv \sum_m  a_m 
			\Exp { i \frac {\omega}{c} \vc U \cdot \vc R_m } \,.
\EE


\subsection {Phase steering}
%==============================================================
%
For any incoming wave, monochromatic of not,  phase-steering beam-forming is \emph{defined} via
\Eq{AAA16} and \Eq{AAA17}, by using some representative  value for $\omega_0$ in \Eq{AAA17} when computing the element phasing angles. 

For the non-monochromatic case, phase-steering has the considerably drawback compared to time-steering that it is dispersive even in the steering direction 
$\uv u_0$, so that the beam-formed signal cannot be factored as in \Eq{AAA8}. Moreover, there is no guarantee that the $\uv u_0$ used in \Eq{AAA17} is really precisely the direction of the maximum gain. In the general case, the phase-steered beam-formed signal for a wave coming from direction $\uv u$ can be written as
\EQ{AAA20}
	z = \sum a_m \int d \omega S_{\uv u}(\omega)
		\Exp { i (\frac{\omega}{c} \uv u -\frac{\omega_0}{c}\uv u_0)
				 \cdot \vc R_m  } \Exp {-i \omega t } \,.
\EE
To proceed, assume that the pulse \Eq{AAA3}, though not monochromatic,  is strongly band-limited around $\omega_0$, so that we can replace $\omega \vc u$ in the exponential factor of \Eq{AAA20} by $\omega_0 \vc u$. When that is the case, 
\Eq{AAA20} factors as the undistorted pulse multiplied by the array factor:
\EQ{AAA21}
	z = ( \int d \omega S_\omega \Exp {-i \omega t} ) \times \sum 
		\Exp { i \frac{\omega_0}{c} (\uv u -\uv u_0)
				 \cdot \vc R_m 
				 }
	= s(t,0,\uv u) \times \AF\,.				 
\EE
When is it possible to approximate  $\omega \vc u$ by $\omega_0 \vc u$ in 
\Eq{AAA20}? A sufficient condition is that over the bandwidth of the wave (that is, in the frequency-zone where 
$S_{\uv u}(\omega)$ is significantly non-zero) the phase angle error 
$$\delta \psi = \frac {\omega-\omega_0}{ c} \uv u \cdot \vc R_m$$
 caused by the approximation stays small compared to unity, everywhere on the array. 
Because
\EQ{AAA22}
	\abs {\frac {\omega-\omega_0}{ c} \uv u \cdot \vc R_m} 
		\leq 
			\frac {2 \pi B} c L \,,
\EE
where $B$ is the pulse bandwidth and $L$ is the maximum dimension of the array,
we see that a sufficient condition for the most desirable fundamental result \Eq{AAA21} to hold to a good approximation, for all incoming wave directions, is
\EQ{AAA23}
	\frac {2 \pi B}{ c } L \ll 1 \,.
\EE
The bandwidth of a transmitted pulse in reception is a essentially the inverse of the rise time of the pulse, so \Eq{AAA23} says that meaningful phase-steering requires that the time $L/c$ to illuminate the array from end to end must be substantially smaller than the characteristic time $1/B$ for the wave  amplitude to change. That is, illumination changes must be ``essentially instantaneous'' over the whole array. For example, for the planned E3D array with maximum dimension of the order of $L \sim 150$~m, phase steering would be distortion-free only for signal bandwidths that are substantially smaller than 300~kHz.  This looks like a good motivation for not to even consider phase-steering for the E3D array; nevertheless, I think it would be of interest to augment GJ's system simulation software to handle phase-steering also, to see just how bad those distortions actually are for typical modulations.

For the rest of this document, and everywhere in the \prog{e3ant} package, we will simply assume that the distortions are not so serious as to badly compromise \Eq{AAA21}. With that assumption, the array response is the same for all signals, and is given by the array factor \AF\ via \Eq{AAA21}. To handle beam forming and beam steering in this approximation, it is therefore neither necessary nor useful to include the signals explicitly. 


\section {Antenna gain}
\label{Sec:AntennaGain}
%==============================================================
%
\subsection {Transmission}
%
As a consequence of a regular placement of array elements, the gain pattern of an array may have ``grating lobes''. That is, there may be are several widely separated ``sidelobes'' of maximally large gain, so that it appears that the gain pattern has several main lobes. With isotropic elements---the only case we consider in this section---the all the grating lobes have equal gain in the center of the lobe. The grating lobes are due to maximal constructive interference. In transmission, the interference is between the isotropic, spherical waves emanating from the array elements, so that the the total field $\vc E^M$ of an $M$ element array in direction $\uv u$ in monocromatic transmission, phase-steered to direction $\uv u_0$,  is
\EQ{MUS01}
	\vc E^M(\uv u) =  \vc E_0^M 
					\sum_m 
					\Exp{ i \frac \omega c (\uv u - \uv u_0) \cdot \vc R_m}
					\equiv 
						 \vc E_0^M  \times \AF (\uv u,\uv u_0) \,.
\EE
$\vc E_0^M$ is the field due to a single element. The grating directions are by defition those directions where all the exponentials in the $\AF$ are equal to unity. Obviously, irrespective of how the array elements are located, at least the direction $u_0$ is such a direction. It depends on the symmetry of the array if there are other grating directions. 
In (all) the grating direction(s) $\uv u_g$, 
\EQ{MUS02}
	\vc E^M(\uv u_g) = M \vc E_0^M \,.
\EE
Array power gain in transmission, $G_T(\uv u)$, describes how large the array's field intensity $I^M$ (unit: $W/\rm m^2)$
\EQ{MUS03}
	I^M(\uv u) =  \frac {\norm {\vc E^M(\uv u)}^2 } \eta\,,
\EE
in direction $\uv u$  is compared to the intensity $I_0^M$ of an isotropic radiator of the same total radiated power $P^M$:
\EQ{MUS04}
	G_T(\uv u) \equiv  I^M(\uv u) / I_0^M \,.
\EE 
All the elements are taken to radiate an equal power $P$, so that $P^M = M \times P$. 
If the point of observation of the field is at distance $r$ from the array, we have
\EQ{MUS05}
	I_0^M =\frac  {P^M} {4 \pi r^2} = M \frac  {P} {4 \pi r^2}	 =  M \times I_0\,,
\EE
where $I_0$ is the field intensity we would observe if there would be only a single lone element in the array, radiating with the power $P$. We denote by $\vc E_0$ the field of such an isolated radiator, so that
\EQ{MUS06} 
	I_0 = \frac {\norm {\vc E_0}^2 } \eta	\,.
\EE

The first puzzlement concerns the transmission gain in the grating directions.  What should we expect $G_T$ to be? The field strength is increased $M$-fold compared to a  single radiator, so the field intensity is increased $M^2$-fold in the denominator of \Eq{MUS04}. On the other hand, by \Eq{MUS05}, the intensity of isotropic radiation in the nominator of \Eq{MUS04} is increased $M$-fold. Thus, the gain should have been increased by a factor $M$ compared to the gain (=unity) of  a single radiator, so we would expect the grating lobe peak gain to be just
\EQ{MUS07}
	G_T(\uv u_g) = M \,.   
\EE
But as \Fig{TwoElementArray1}--\ref{Fig:TwoElementArray3} shows, even for a two-element array the actual grating lobe gain is not always equal to 2, but varies at least between about 1 and 2.6, depending on the element spacing and the phase-steering angle. Examples later in these notes for larger arrays show that an $M$-array element has typically gain near $M$, but not equal to $M$. How came? 

Let's first re-trace the reasoning leading to \Eq{MUS07} to see what the equations 
\Eq{MUS02}--\Eq{MUS06} \emph{really} imply. We have
\EQ{MUS08}
	G_T(\uv u_g) = \frac {I^M} {I_0^M}
		= \frac {\norm {M E_0^M}^2 } { M \norm {E_0}^2 } 
		= M \frac {\norm {E_0^M}^2 } { \norm {E_0}^2} \,.
\EE
So, if the grating lobe gain differs from the first-order expectation, $M$, this must be due to the fact that when the $M$ elements are brought together into the array, they no more project precisely the same far field, $\vc E_0$,  as they do when in isolation. Even though they have been forced to radiate the same power in both case. 
In terms of the equivalent circuitry of a transmitter, \Fig{tx_equiv_circuit}, the radiated power of an element is  $P = I^2 R_r$ where $I^2$ is the radiation source current and $R_r$ the radiation resistance. The radiations resistance describes how ``easily'' the antenna is able to convert a driving current to radiation. There does not appear any fundamental reason why that property would \emph{not} depend on array phasing and element spacing. So if $R_r$ changes, and $P$ is forced to be constant (by adjusting the transmitter power amplifier as necessary), $I$ changes.  In general, we expect the electric fields generated to be be directly proportional to the source currents, so the changed current would then produce the required change in the projected field. 

Referring to the equivalent circuit only serves to confirm that an antenna element can, indeed, accommodate the required field change from the isolated-element situation, without violating any obvious basic principles. But what then is the reason why this field/current change is sometimes required? I think that this is basically due to 3D geometry of the wave interference in transmission. The gain $G_T$ (and hence the field) is determined, both in form and in normalization, when the array factor is given. But the array factor in \Eq{MUS01} is nothing else than a statement that the elementary waves follow the principle of linear superposition when forming the total field. It must be that it is the linear superposition, the formation of the 3D interference pattern, that ``forces'' the total electromagnetic system to adjust its sources so that the principle can be maintained. Forming the grating lobes involves taking away field energy from some places and placing it in the lobes, in a complicated 3D~configuration, and this must be done \emph{without changing the total energy}. The total energy is quadratic in fields, so it does not appear so surprising that the energy zero-sum game does not usually quite succeed with the 
plain vanilla original fields: there will be some energy left over or some missing when the pattern is formed.  To get her sums right, Nature has to enforce an overall adjustment of the single-element field $E_0^M$.  In fact, we do the same adjustment when we compute the array's ``power integral'', \Eq{GainNormalizer}, when computing the absolutely normalized antenna gain. 







%In transmission, these are the directions of maximal constructive interference, where the waves from the array elements add with equal phase. (The width of the grating lobes varies, though, even for isotropic elements). In reception, the grating directions are the directions where the incoming plane wave has equal phase at all array elements. Grating lobes occur even for a two-element array if the element distance is greater than half wavelength. Examples of the gain pattern for two-element arrays are shown in Figures~\ref{Fig:TwoElementArray1}--\ref{Fig:TwoElementArray3}, these have been computed from \Eq{SimpleDipole}. 

%The first puzzle is about the array directivity, both in transmission and reception. The array directivity (the maximum gain, equal in all grating lobes), varies depending on the beam-steering. For a two-element array with both amplitudes $a_m$ equal, the directivity can be anything between 1.0 (when the element spacing approaches zero), and 2.xx, which is achieved when XXXXX, as may be verified by inspection of 
%\Eq{SimpleDipole}. 
%%In the grating directions, all the elementary waves add in phase.  

%Now, consider the following reasoning. If there is only a single element, producing field 
%$\vc E_1$ at a far-field point of observation, the field intensity would essentially be 
%$I_1 = \norm{\vc E_1}^2$, and, for isotropic elements, this intensity would then correspond to the isotropic gain, unity. When there are $N$ such elements adding in phase in the grating direction, the field intensity would be 
%$I_{\rm tot} = \norm{N \vc E_1}^2 = N^2 I_1$, while the total radiated power $P_{\rm tot}$ would be $N$ times grater than the total power $P_1$ of a single radiating element. Thus the array gain, which is proportional to $I_{\rm tot}/P_{\rm tot}$, should be $N$ times the single element gain, that is, just equal to $N$ for an array of $N$ isotropic elements. 

%But as said, this is not the case; the gain will be near $N$, but can be somewhat larger or somewhat smaller than $N$, as will be seen quantitatively later in these notes (for large arrays the gain variation from $N$ are is generally less pronounced that for the two-lement array.) But this then necessarily means that when $N$ isolated array elements, each radiating the field $\vc E_1$ isotropically and consuming power $P_1$, are brought together so that they all extract the same power $P_1$ all the time, then in the grating direction the total field can sometimes be larger than $N\vc E_1$, and sometimes smaller, in a way that depends both on the array spacing and phasing. The question is, how is this possible? Does it not even somehow contradict energy conservation? The tentative answer, below, is that this behaviour is actually \emph{required} by the energy conservation.

%I think that the the above argument fails in assuming that the array elements which are isolated in the beginning (they can be solid state transmitters, with there individual power supplies and so on; truly independent and self-contained), are brought together, they will nevertheless couple, via their antennas (even in the ``ideal case'', when the ``normal'' mutual coupling of elements is not an issue).  The total field is the result of wave interference. There will be constructive interference and destructive interference. In reasonable configurations, one may expect that the field intensity that is lost in some regions of space due to the destructive interference, is re-gained in other regions, so that the total power going outwards does not change much from $N \times P_1$.  The key point is that the field geometry does not allow the interference-game to be \emph{precisely} a zero-sum game. As an extreme case, consider what happens if we have two transmitting elements almost precisely at the same point in space and we phase them in opposite phase. Then the total field could can essentially cancel everywhere in space, and hence no power cannot be going out. This implies that neither transmitter would extract any power at all neither. We know that electromagnetism conserves energy, so we know that the above is what \emph{must} happen. Even though it might be difficult to see how it happens in detail, the \emph{total} electromagnetic system, \emph{including} the power supplies and so on, must adjust itself so that this happens. 

As a specific example on how the array gain can be different from the simple expectation $G = M$, consider a two-element array where the elements have equal excitation and are located very near to each other compared to the wavelength. In this case, the interference pattern obviously must look much like the field of a single source, that is, nearly isotropic, only with higher intensity. To conserve power, the intensity can now be only twice (not four times) as high as the original single-element intensity. This means that the per-element field must have been reduced from the isolated-element field
$\vc E_0$ 
to 
$\vc E_0/\sqrt 2$. This requires that the antenna element currents are down by the same factor, $I = I_0/\sqrt 2$. The radiated power is is $I^2 R$ in terms of the radiation resistance $R$. To conserve power, the radiation resistance must have gone up by a factor of 2, $R = 2R_0$. Note that if we have two such ``radiation resistors'' side by side, and the current $I$ goes  via both of them, the system looks very much like a single resistor with resistance $1 / ( 1/2R_0 + 1/2R_0) = R_0$ and total current
$\sqrt 2 I_0$. This single-element system thus radiates power $2 I_0^2 R_0$, as required. So the picture is consistent. Of course, the ``radiation resistance'' is just a way of accounting for the power converted to radiation; the real physical reason for the change of the radiation resistance when the element are brought together must be that the fields produced by one antenna affects the current on the other antennas.



%Now, if the radiating elements are not in a single point in space, then a complete cancellation of the total wave will not be possible for geometric reasons alone. It should then be possible to arrange things so that the total power radiated is kept at the constant value $N P_1$ when the elements are brought from infinity to the array configuration. Fields start to overlap and the spatial energy density pattern starts to change as dictated by linear superposition. But to accommodate the not-exactly-N directivity, also the the configuration of the source currents on the radiating antenna elements must change, to make it possible that the magnitude of the effective individual field (total field divided by $N$) depends somewhat on direction, and is not anymore exactly the original single-element field $E_1$. In effect, to ensure conservation of the total energy flow when the interference pattern cannot take care of this all by itself,  the ``isotropic'' elements are not radiating quite isotropically anymore. This should be a real, observable phenomenon,so that if we would record the actual currents on the elements, we would notice that they do not correspond to precisely isotropic radiation. Still, it seems sensible that the antenna currents do not change much when the elements are brought together. That would explains why the grating lobe directivity is, roughly, just $N$. 


\subsection{Reception}

Thus, in transmission, the almost-but-not-quite equal-to-$M$ directivity of an array of isotropic elements is a result of an electromagnetic system adjusting itself to energy conservation under the geometric constrains placed on the interference pattern. The basic result concerning antenna gain in reception is that it is equal to the gain of the same antenna used in transmission mode, so, in particular, the gain will be different from $M$.  There is place for confusion here; consider the following reasoning. In reception, it is not at all clear that the argument of the proceeding section can be used to explain how the gain can be different from $M$. There is only a plane way wave coming in from some direction, and there is no need to adjust a set of elemenrary fields, and hence the element currents, in order to conserver field energy. Moreover, there is an even more serious worry concerning the gain pattern in reception when using off-line beam-forming.  (1) Even with element distance fixed, the directivity (in transmission, hence also in reception) depends on the scanning direction. (2) In transmission mode, this required that the elementary currents adjust somewhat. Now assume that we record the element voltages $s_m(t)$ of the array, and then beam-form off-line a whole set of beams by delaying the element signals by various amounts before adding them up to the final beam-formed signal $z(t)$.  The different $z(t)$ would then correspond to different beam directions, and hence, different beam directivities. But how can they be associated with different non-$M$ directivities, when there is only a single set element currents?

The confusion is entirely artificial, and is possible because so far we have not really said what we actually mean by "gain in reception", $G_R$. That crucial thing is, that the \emph{concept}, the physical quantity, gain-in-reception, is not the same quantity than the gain in transmission. Gain-in-transmission describes how the far field of the antenna differs from the field of an isotropic radiator of the same total power, as quantified by \Eq{MUS03}. The gain-in-reception relates to entirely different physical situation. It describes how the power received by the array would vary if the same plane way, of fixed intensity, would be be coming from various directions. We can imagine that there is a single point-like transmitter far away, and it is moved on a sphere around the array, always pointing straight towards the array. $G_R$ then quantifies the amount of power received (the voltage squared appearing across the terminals of our array). In fact, to accommodate off-line beam forming, in which case it is not so clear what we mean by ``array terminals'', we need to be even more careful by what we mean by the array gain. 

Finding the grating lobes is a main topic in these notes and will be inspected in detail later, but here we will comment about their ``physical significance'', especially in the connection of reception. In transmission things appear rather clear-cut. The existence of grating lobes implies that more or less equal amounts of transmission power is directed into multiple widely separated directions. In most cases this is not the wanted behaviour, and so grating lobes in the array's gain pattern must be avoided. This can be done either by placing the elements near enough to each other; or by using sufficiently directive elements; or by avoiding regular placement of the elements in the first hand. Examples of the gain patterns for a few irregular arrays with isotropic elements are in \Fig{RandomArray}.

What should one think about the grating lobes in reception? Are they equally disastrous as in transmission? Do the grating lobes even ``really exist'' in reception? The short answer is that yes, they exist, and yes, they are harmful to some extend. One way to think about the grating lobes, both in reception and in transmission, is to note that 
\begin{itemize}
\item The grating lobes are nothing else than overly ambitious side lobes.  
\end{itemize}
Therefore, when feeling confused about the meaning of the array grating lobes, compare the situation to the (for the \EISCAT\ community) better-known situation of the side-lobes of the big dish antennas. 
But as I have never really understood the meaning of the gain pattern in reception, I will attempt to tackle the issue in more detail here. The reader may want to fast-forward to the beginning of section~\ref{Sec:PhasedArray}. 

The main thing to understand about the gain pattern is the mantra that for arrays, just as for dishes, the gain pattern in reception is equal to the gain pattern in transmission. So I will review here how this really comes about, and indeed, what precisely does it mean that the patterns are equal. There is room for confusion here. For instance, it is not difficult to find in the internet statements to the end that transmission and reception gain patterns are equal \emph{because} 
\begin{enumerate}
	\item The Maxwell's equations are time inversion symmetric on one hand, and 
	\item The fields and currents are closely connected on the other hand,
\end{enumerate}
and \emph{therefore} reception is essentially just the transmission run backward in time. 

If this indeed where so, then of course the flows of radiation energy (the antenna pattern) would have same geometry in both cases. But I now think that the above reasoning misses the point. Although both reception (RX) and transmission (TX) do, of course, respect the Maxwell's equation, the boundary conditions of the total system are not anywhere the same in the  two situations. In standard TX and RX configurations, the fields, both the driving fields and the total fields, both near the antenna and far away, definitely differ by more than just the sign of time. For TX, we are having some complicated field pattern near the antenna, and a more a less spherical outgoing wave far away. In the standard RX configuration, we are receiving a more a less spherical wave coming from a single well-defined source. I hope that nobody is going to claim that the two basically spherical wave-fields from two widely separated  sources only differ by the sign of time!  The fact that there are an induced radiation field in RX cannot change this overall field picture. In ideally matched reception a half---but only a half, irrespective of the number and size of the side lobes---of the initially captured wave energy is immediately re-radiated. But that applies to all antennas; nothing special with arrays here. So the bottom line of this paragraph is that the standard RX scheme \emph{is no} the standard TX scheme run backwards in time. 

Therefore, I fail to see how the time-reversal invariance can be useful in an argument about the reception gain. More powerful features of electromagnetism are called for to obtain a proof, namely, the principle of reciprocity. That principle, I think---though I'm not really sure---involves more than just the time-reversal symmetry of the Maxwell equations.  But first we need to be careful about what we, actually, want to proof. What are the ``standard situations'' in RX and TX?

Conceivable, we could imagine really running the transmission backwards, with energy flows coming in from all over the sky. But that would be a very special case, and, would anyone really want to do that,  could be handled as a consequence of linear superposition, once we have handled the standard case of a point source first. So, in standard reception situation, we have a small radiation source in direction $\uv u$ as viewed from the receiving antenna. 
\begin{itemize}
\item
The standard concept  of ``gain in reception'' seeks to quantify the variation of the received power, or the size of the induced voltage on the antenna terminals, when the point source's direction but not its distance is varied. Thus, a driving plane wave field's magnitude but not direction in front of the receiving antenna is kept constant, and we want to know how much of the wave's power actually gets in, as function of $\uv u$. 
\item
On the other hand, the standard concept of ``gain in transmission'' quantifies how much a transmitting antenna's far field intensity, or amplitude, varies as function of direction when the distance to the point of observation is fixed. 
\end{itemize}

There are two different entities involved: (1) the gain-in-transmission and (2) the gain-in-reception. But, fortunately, there are also two different situation to plug these entities in: the TX and the RX situations. Therefore, it is  possible, though still miraculous, that the two different gain-quantities can be numerically represented by a single function. This function is then simply called the directional power gain $G(\uv u)$ (or the directional amplitude gain $\mathcal G(\uv u) = \sqrt{G(\uv u)}$, if we want to deal with field amplitudes  rather than field intensities). Another point of view is to maintain that there exists only a single gain quantity, namely, the gain in transmission, and the reception directional sensitivity is expressed in terms of the transmission gain. 

To proceed this, we need the principle of reciprocity. This is a statement that (under certain conditions) there is a symmetry, reciprocity, in the mutual coupling between subsystems of  an electromagnetic system.  For a simple electronic two-port circuit, consisting only of linear elements such as shown in \Fig{Reciprocity}, the statement of reciprocity can be phrased in the following way: If a generator current $I_A= I_0$ in port~A causes a voltage 
$U_A^{(B)} = U_0$ in port B, then, if we interchange the current generator and the voltmeter, and again extract $I_0$ from the generator, the voltmeter again will show the value $U_0$. For ordinary circuit elements, this result is already built-in into the Kirchoff rules used to compute the internal currents and voltages in the circuit, so that for any given configuration, such as shown in \Fig{Reciprocity}, one may prove the reciprocity by directly computing the voltage $U_0$ resulting from the driving current $I_0$. 

Although it cannot any more proved from Kirchoff rules, the same reciprocity statement holds also for the two-port system shown in \Fig{ReceptionGain}, where subsystem $A$ is the radar antenna of interest, and subsystem $B$ is a small far-away test antenna. From the reciprocity and the linearity properties of the system, we argue in the caption text of \Fig{ReceptionGain} that the directional dependancy of the voltage $V_\mathrm{REC}$ observed at the terminals of the receiving antenna when the antenna is illuminated with transmission from the test antenna in direction $\uv u$, is solely via $\mathcal G_T(\uv u)$, where  $\mathcal G_T(\uv u)$ has originally been defined as the gain-in-transmission quantity: 
\EQ{GainInReception}
	V_\mathrm{REC} = b \times 
						\mathcal G_T(\uv u) 
					\times 
						\norm {\vc E_\mathrm {REC}}	\,.
\EE
In \Eq{GainInReception}, neither $b$ nor  $\norm {\vc E_\mathrm {REC}}$ depend on the direction $\uv u$. The field $\vc E_\mathrm {REC}$ is the ``driving field'', which is just the far field of the test transmitter, and does not contain the re-radiated fields. From the form of \Eq{GainInReception} it may appear that a precise definition of the gain-in-reception can be done only up to a normalization constant, for we could as well write the right-hand-side as, say, 
$(2b) \times (\mathcal G_T/2) \times \norm {\vc E_{\rm REC}}$. We could leave this be so, for only the combination $b \times G_T$ is measurable. But we can also  fix the  normalization by requiring that the gain-in-reception is, well,  a gain, that is, integrates to $4\pi$.  With this natural normalization, the gain-in-reception becomes precisely equal to the gain-in-transmission, and one may dispense with the subscripts ''T`` and ``R'' altogether, as we do in most parts of these notes.  Or one can just use $G_T$ even when handling reception,  is we do in \Eq{EffArea2}. 


When the normalization is fixed, one can then uniquely determine the constant of proportionality $b$, by making use of the known radiation field of the test antenna. 
Instead of computing $V_{\rm REC}$, the normal and more useful way is to compute the actually received power (power delivered to an ideally matched load). This leads to the fundamental expression of the received power in terms of the effective area (effective aperture) $A_{\rm e}$ of an receiving antenna
\begin{eqnarray}
\label{Eq:EffArea1}	
	P_{\rm REC} &=& A_{\rm e} 
					\times \frac {\norm { \vc E_{\rm REC} }^2 } {  \eta }\,, \\
\label{Eq:EffArea2}	
	A_{\rm e} & = & \frac {G_T(\uv u) \lambda^2} { 4 \pi} \,.
\end{eqnarray}
The flow of logic is that \Eq{EffArea1} defines what is meant by the effective area, and then \Eq{EffArea2} is the expression found to that quantity by the reciprocity argument.  In \Eq{EffArea1}, $\eta$ is the impedance of vacuum, 377~$\Omega$, and 
${\norm { \vc E_{\rm REC} }^2 }/ {  \eta }$ , which has the dimension  W/m$^2$, is the intensity of the incoming monochromatic plane wave.

We have re-convinced ourselves that the gain in reception---for any antenna, array or not---is equal to the gain of the same antenna when used in transmission. In \EISCAT, we have got accustomed to the idea that even the small side lobes of our dish antennas are a bad thing. By planning now to incorporate array antennas, with their associated huge side lobes (the grating lobes), are we now committing a huge stupidity? 

One one hand, it is true that when there are significant side lobes, a significant amount of gain resides in them, and that gain is then not available in the direction of interest, the ``main lobe'' direction.  And that implies loss of signal detection sensitivity.  So it may appear that we indeed are doing something wrong. 

But on the other hand, it is in the nature of the array that not very much can be done to ``move'' gain from the non-interesting lobes to the interesting lobes. Naively, if there are $N$ elements, one would expect the maximum gain to be about $N$ times the element gain $G_E$. Actually, for a regular plain array of reasonably many elements, we show in section~\ref{Sec:NormalizedGeneralGain} that the effective area cannot  exceed the land area occupied by the elements, and so the maximum gain actually is $N \times 4 \pi D^2$ where $D^2$ is the area occupied by one element in units of $\lambda^2$. Thus the maximum gain is limited even more strongly than just by $N \times G_E$ (there appears to be no fundamental limit to how large the gain $G_E$ of an isolated element could in principle be). But as long as $G_E$ is not too large, $G_E <  4 \pi D^2$, the gain $N\times G_E$, which is also achieved in practice, is about as large as can be reasonably hoped for. 

In summary, for the regular planar array, the sensitivity is almost automatically about as good as can be hoped for, and therefore, any suggestion that we were ``losing gain'' or ``losing sensitivity'' (due) to the multiple grating lobes, is unfair. It is unfair in the same way as it would be unfair to complain that one is losing half of the available receive power to the re-radiation. The re-radiation is unavoidable by the nature of electromagnetism, not because of some incompetent engineering. 

What  the situation would be if we could allow irregular arrays and non-uniform excitation fields, I don't know. For example, people are talking about ``superdirective'' arrays : for instance, it is possible to have a linear array of isotropic elements where the gain approaches $N^2$, but that requires specifically tailored non-uniform spacing and specifically tailored  excitation fields.  

For conventional array designs, we need not be overly worried about the grating lobes, but that does not mean that we should not be \emph{somewhat} worried about the grating lobes. The situation with arrays is actually not too dissimilar from the situation with dishes. The basic gain pattern, and especially the directivity  (maximum gain) of a dish is mainly determined by the geometric aperture, so that only modest improvements in gain can be achieved by tailoring the details. For a sizable conventional planar array, the directivity is also largely determined by the geometric area, and can only be improved by so much  by tinkering the details. For arrays, in order to achieve the naturally available directivity,  we have the extra degree of freedom that we can use fewer elements if the elements themselves are directive. 

There is a prize to that flexibility, or course. The prize is not so much in terms of directivity, (and hence, not in terms of maximum detection sensitivity), but rather in terms of directional aliasing. 
%
%If there would only be the issue of sensitivity to consider, one could almost argue that the non-interesting lobes in the receiving array's gain function are only ``theoretical things'', and need not really concern a practicing engineer. But there is also the question of target direction, and ``direction-wise'', the grating lobes definitely are real enough to require engineering attention. 
%
That is, when the gain in the antenna side lobes (grating lobes or not) is not insignificant,  there can be a serious loss of information about the actual target direction. The side lobes can poke all over the sky, and  there appears to be no way to determine via which lobe(s) the observed power came in---\emph{unless we know a priori that there is no scattering coming from the non-intesting lobe directions}. 

If the large side lobes cannot be suppressed (using directional elements or irregular element placement),  we must in the very least arrange things so that potential targets in the side lobes are not illuminated by the transmitter. When the reception antenna is different from the transmission antenna, this should be possible, at least in principle. But how much does this constrain the available pointing schemes in practice, especially when using multi-beam-forming reception, must be inspected carefully. 

Another potential penalty for large-gain side lobes is that even if there would be no illumination in the side lobe directions, unwanted external RF signals may easily sneak in. On the other hand, the gain is large in only narrow cones, so perhaps this is not such a serious problem in practice.


%With $N$ isotropic elements, the maximum available directivity will be roughly $N$, no matter how the elements are placed (as shown already in the gain pictures of a two-element array, the actual maximum gain can be somewhat larger or smaller, depending on element placement and the beam steering angle). 


%############################################################
\section{A phased array}
\label{Sec:PhasedArray}
%############################################################
%
This section introduces the phased-array steering- and gain-related concepts, notations and computations as implemented in the m-files in the \prog{e3ant} package. 

\subsection{The array factor}
\label{Sec:ArrayFactor}
%
With reference to \Fig{ArrayFactor}, assume that the far-field electric field caused by the antenna element at the origin, in the direction of unit vector 
$\uv u$, is  $\vc{E_0}$. Then the far field of the element at position $\vc {d_m}$ is 
$\vc{E_m} = \vc{E_0} {\rm e}^{i\Psi_m}$, where $\Psi_m$ is the phase difference of the 
two waves when they arrive at the target. This difference corresponds to the  
distance $\Delta_m = \uv u \cdot \vc d_m$ of the element from the plane $\rm P_u$ normal to $\uv u$, and is 
$\Psi_m = 2 \pi \Delta_m / \lambda $. Therefore, the total field at the target is 
\EQ{TotalFarField}
	 \vc E = 
	 	\sum_m \vc E_m 
	 			= \vc E_0 \sum_m 
					\Exp { i \vc 2 \pi \uv u \cdot \frac {\vc d_m}{\lambda}} \,.
\EE
The sum multiplying the field $\vc E_0$ in \Eq{TotalFarField} takes care of the relative phases of the elements caused by their different positions,  and is called the array factor \AF. There may be also inherent phase and amplitude differences between the elements. These can  be accounted for by multiplying the complex exponentials by complex amplitudes $b_m$, and these can also be bundled into the array factor, which becomes 
\EQ{ArrayFactor_0}
	\AF(\uv u) = \sum_m b_m
					\Exp { i \vc 2 \pi \uv u \cdot \frac {\vc d_m}{\lambda}}\,.
\EE
The sum goes through all the elements comprising the array. 

Often in the litterature the exponent in the array factor \Eq{ArrayFactor_0} is written in terms of the wave vector 
$\vc k = k\uv u = (2 \pi / \lambda) \uv u$
of the plane wave arriving to the target from the antenna.  In this note, we prefer to work with the dimensionless unit vector 
 $\uv u $ instead, and will write most of our equations in terms of dimensionless quantities only. The basic reason is that the physical problem at hand, the far field antenna gain pattern, depends only on dimensionless quantities, like beam directions and the ratio of various lengths to the wavelength, and is thus inherently dimensionless. We also prefer to work directly on the discrete problem using the tools of discrete math, instead first moving matters to the continuous domain and then returning via Dirac delta-functions. Sometimes, our approach seems to result in slightly more compact equations.%
\footnote {
For instance, compare the equations 9.83-9.86 in Kildal's (factually excellent but typographically horrible) book \emph{Foundations of antennas}, to our \Eq{GenralPowerIntegral}.
}
 
In the e3ant package,  we assume that the array is rectangular in shape, regularly spaced, and in the xy-plane, with the longer side along the x-axes. We split the amplitudes $b_m = b_{m_xm_y}$ in such away that we can write the array factor as 
\EQ{ArrayFactor}
	\AF(u_x,u_y) =  {\sum ^{M_x-1,M_y-1}_{m_x=0,m_y=0} 
					a_{m_xm_y}{\rm e} ^ { i ( 2 \pi u_x D_x - \delta_x)m_x }
						{\rm e} ^ { i ( 2 \pi u_y D_y - \delta_y)m_y }
						}\,.
\EE
Here
$D_x = d_x/\lambda$ and $D_y = d_y/\lambda$
specify the array element spacing in the x- and y-directions, and $M_x$ and $M_y$ are the number of element rows in the y-and x-directions.  The cartesian x- and y-coordinates $u_x$ and $u_y$  of $\uv u$, also called the direction cosines because $u_x = \cos (\uv u,\vc x)$, uniquely specify the pointing direction in the upper half sphere,  the z-component is found by the normalization as
$u_z = +\sqrt{1 - u_x^2 - u_y^2}$.
The cartesian coordinates can be expressed in terms of the usual spherical coordinates $\phi$ and $\theta$, where the azimuth angle $\phi$ is measured in the xy-plane counter-clockwise from the positive x-axis, that is, towards the positive y-axis; and $\theta$ is the polar angle, measured from the positive z-axis, and is the complement of the elevation angle. But note that \emph{azimuth} in the \EISCAT\ pointing geometry programs is measured in clockwise direction from the north, irrespective of how our array is oriented. The spherical-to-cartesian conversion is
\begin{eqnarray}
	\label{Eq:Speherical2Cart}
	u_x & = & \sin(\theta)\cos(\phi) \\ \nonumber
	u_y & =  & \sin(\theta)\sin(\phi)\,.
\end{eqnarray}
The standard Matlab function \prog{sph2cart} can be used for this transformation.



\subsection{Array factor as 2-D discrete Fourier transform of the excitation field}
\label{Sec:AFas2DFT}
%-------------------------------------------------------------------------------------
%
We define a reference direction, $\vc u_0 = (u_x^0, u_y^0)$, by
\begin{eqnarray} \label{Eq:ReferenceDirection}
	u_x^0 &=& \delta_x/(2 \pi D_x) \\ \nonumber
	u_y^0 &=& \delta_y/(2 \pi D_y) \,.
\end{eqnarray}
The array factor \Eq{ArrayFactor} can then be written more economically using matrix notation as
\EQ{ArrayFactorCompact}
	\AF(\vc u) = \sum_{\vc m}  a_{\vc m}
					\Exp { i 2 \pi (\vc u - \vc u_0) D \vc m }\,,
\EE
where $\vc m = (m_x, m_y)$, considered a $2\times 1$ column matrix, the row matrix $\vc u = (u_x,u_y)$, and D is a $2 \times 2$ diagonal matrix with $D_x$ and $D_y$ as the elements. We wrote \Eq{ArrayFactorCompact} to resemble as much as possible a two-dimensional analogue of the standard definition of the 1-dimensional Fourier-transform of a sequency of number,
\[
	\Four{a}(\nu) = \sum_m a_m \Exp{i 2 \pi \nu m}\,.
\]
Indeed, \Eq{ArrayFactorCompact} shows that for the plane array, the array factor \AF\ is simply the 2-dimensional discrete-space Fourier-transform of the two-dimensional sequence $a_{\vc m}$ of the excitation amplitudes, evaluated at the point $(\vc u-\vc u_u)D$:
\EQ{ArrayFactorAsFourierTransform}
	\AF(\vc u) = \Four{a}((\vc u - \vc u_0) D)\,. 
\EE

\subsection{Grating zones and grating directions}
\label{Sec:GratingZones}
%-------------------------------------------------------------------------------------
%
The array factor of the regular grid is periodic, just as the the 1-dimensional Fourier-transform is. This periodicity corresponds to  kind of directional aliazing: any directions $(u_x,u_y)$ for which $(\Psi_x,\Psi_y)$ differ by $n\cdot 2\pi$ are identical: 
\EQ{DirectionAliazing}
	\AF(u_x + n_x/D_x, u_y + n_y/D_y) = \AF(u_x,u_y), 
\EE
for all  $n_x$, $n_y$ for which the \AF\ argument on left-hand-side stays within the unit circle, also called the circle of visibility in this context, 
$\{(u_x,u_y): u_x^2+u_y^2 <=1\}$.  
That means that the visibility circle is divided to size $(1/D_x) \times (1/D_y)$ rectangular cells, over which the \AF\ as a function of $(u_x, u_y)$ repeats periodically from cell to cell. Especially, the maxima of \AF\ are equal, and repeat periodically. The directions $\uv u_g$ of these maxima are called the grating directions of the array.

The cells are analogous to the Nyquist zones in sampled time-signals, and we refer to them either as the Nyquist zones or as the grating zones. It does not matter in a periodic structure where one considers a period to start, but in \Fig{GratingZones} we have centered the zones on the grating directions. 


\subsection{Phase steering}
\label{Sec:PhaseSteering}
%------------------------------------------------------------------------------------
%
The grating directions depend on the array element spacing $D_x$ and $D_y$, the parameters $\delta_x$, $\delta_y$, and, if no restrictions are placed on them, also on the complex-valued excitation amplitudes. But it follows from the triangle inequality applied to \Eq{ArrayFactorCompact} that
\EQ{ArrayTriangleEnequality}
	\abs {\AF} \leq \sum \abs {a_\vc m}\,.
\EE
If we restrict the excitation amplitudes to be real and positive, we can write the right-hand-side of \Eq{ArrayTriangleEnequality} without the absolute signs. On the other hand, we note from \Eq{ArrayFactorCompact} that the upper limit $\sum a_\vc m$ is reached when 
$\uv u = \uv u_0$. This means that the reference direction $\vc u_0$ maximizes $\abs{\AF}$, that is, is one of grating directions. Except when explicitly stated otherwise, we will in these notes restrict the amplitudes to be real and positive. Then the above argument, and the periodicity of $\AF$, show that the grating directions $\vc u_g$ do not depend on the $a_\vc m$,%
\footnote{
This also shows, incidentally, that pure amplitude jitter cannot change the beam maximum direction. In short, we can only have phase-steering, but not ``amplitude steering''.
}
 but can be solved solely from
\begin{eqnarray} \label{Eq:GratingConc_1}	
	\Psi_x & = & n_x 2\pi  \\	\nonumber
	\Psi_y & = & n_y 2 \pi \,
\end{eqnarray}
or
\begin{eqnarray} \label{Eq:GratingCondition}	
	2 \pi D_x \, u_x^g - \delta_x & = & n_x 2 \pi \\ \nonumber
	2 \pi D_y \,u_y^g - \delta_y & = & n_y 2 \pi \,.
\end{eqnarray}
We note that the reference direction $\vc u_0$ corresponds to $n_x=n_y=0$,
\begin{eqnarray} \label{Eq:GratingCondition}	
	2 \pi D_x (\, u_x - u_x^0)  & = & 0 \\ \nonumber
	2 \pi D_y (\,u_y - u_y^0) & = & 0 \,.
\end{eqnarray}

When we want to transmit to a given reference direction $\vc u_0$, the relative phase of the elements, say the initial start-up-phase $\Psi_{m_xm_y}^0$ of the oscillator driving the element $(m_x,m_y)$, must be made to change from element to element across the antenna as
\EQ{InitialPhase}
	 \Psi_{m_xm_y}^0 =  m_x \delta_x + m_y \delta_y,
\EE
with $\delta_x$ and $\delta_y$ solved from from \Eq{ReferenceDirection} as
\begin{eqnarray} \label{Eq:FindingDeltaX}
	\delta_x & = & u_x^0/(2 \pi D_x) \\ \nonumber
	\delta_y & = & u_y^0/(2 \pi D_y) \,.
\end{eqnarray}
With the definition \Eq{FindingDeltaX}, $\delta_x$ and $\delta_y$ will in general not be in the range $[-\pi,\pi]$, nor within any other single interval of length $2\pi$. One might refer to the numbers $\delta_x$ and $\delta_y$ solved from \Eq{FindingDeltaX} as the unwrapped phase steering angles. For plugging into the initial phase $\Psi_{m_xm_y}^0$, $\delta_x$ and
$\delta_y$ can of course wrapped to a fixed interval, say to $[-\pi,\pi]$. In terms of grating directions, we are then just using some other of the equivalent grating directions as the reference direction. For programming, the benefit of using the unwrapped steering angles is that then there is a one-to-one correspondence between the beam direction of interest and the steering angles. Therefore, the unwrapped angels are what are used in this package. \Fig{BeamSteering} illustrates the use of wrapped and unwrapped steering angles, for an 1-D array with $D_x = 2$.


\subsection{The array factor with equal excitation amplitudes }
\label{Sec:AFforEqualAmps}
%------------------------------------------------------------------------------------
%
When the excitation amplitudes $a_{m_xm_y}$ are all equal (we take them all equal to unity then), the x-and y-sums in \Eq{ArrayFactor} decouple, and the sum can readily be computed in closed form as a product of two Direchlet kernels:
\begin{eqnarray}
	\label{Eq:ArrayGainClosedForm}
	\AF &=& \sum_{m_x=0}^{M_x-1} \Exp { i \Psi_x m_x } 
			\sum_{m_y=0}^{M_y-1} \Exp { i \Psi_y m_y } \\
		&=& \Exp{i\Phi} M_x M_y\cdot
			\diric ( \Psi_x, M_x ) \cdot \diric ( \Psi_y, M_y ) \,,
\end{eqnarray}
where $\Phi$ is a non-observable phase factor, which we ignore,
\begin{eqnarray}
	\label{Eq:PhaseSteering1}
	\Psi_x & = & 2 \pi u_x D_x - \delta_x 
			= 2 \pi D_x (\, u_x - u_x^0) \\	\nonumber
	\Psi_y & = & 2 \pi u_y D_y - \delta_y
			     = 2 \pi D_y (\, u_y - u_y^0)
\end{eqnarray}
and the Dirichlet kernel is defined by
\EQ{DiricKernel}
	\diric(\Psi,M) =  \frac {\sin (M\Psi/2) } {M\sin(\Psi/2) }.
\EE
The function \prog{diric} in Matlab signal processing toolbox implements \Eq{DiricKernel}. The magnitude of the Dirichlet kernel is periodic by $2\pi$. One period is plotted in \Fig{DiricKernel} for a few values of $M$, using \prog{plot-diric.m}.



\subsection{Parseval's theorem}
\label{Sec:Parseval2D}
%--------------------------------------------------------------------------------
%
%
We will need the Parseval's theorem for two-dimensional sequencies. Recall that for the 1-dimensional sequence, Parseval's theorem---spectral domain and power domain representation of signal energy are equal---is
\EQ{Parseval1D}
	\int_0^1 \abs {\Four {a}(\nu)}^2 \, d\nu = \sum_m \abs { a_m}^2.
\EE
Moreover, due to $\Four a(\nu)$ periodicity by 1, it follows from \Eq{Parseval1D} that
\EQ{Parseval1D_2}
	\int_0^{1/D} \abs {\Four {a}((\nu-\nu_0)D)}^2 \, d\nu 
				=  \frac 1 D \sum_m \abs { a_m}^2\,,
\EE
for any constants $\nu_0$ and $D$. The 2D-analogue of \Eq{Parseval1D_2} holds, 
\EQ{Parseval2D_2}
	\int \abs {\Four {a}((\vc u-\vc u_0)D)}^2 \, d^2\vc u 
				= \frac 1 {D_xD_y} \sum_{\vc m} \abs { a_\vc {m}}^2\,.
\EE



\subsection{Antenna gain and the power integral}
\label{Sec:GainAndPI}
%--------------------------------------------------------------------------------
%
The directive gain (which we will also call power gain in this note) of an antenna in the direction $\uv u$ is the ratio of the power radiated per unit solid angle into that direction, divided by the power density of the same total power radiated isotropically,
\EQ{DefinitionOfGain}
	G(\uv u) = \frac { dP } {d\Omega} / \frac { P } {4 \pi} \,.
\EE
The power density is proportional to the squared modulus of the total field, so is proportional to $\abs{\AF}^2$. If the antenna elements themselves have non-isotropic gain, all equal to $\GE(\uv u)$, the power density $dP/d\Omega$ is proportional to 
$\GE(\uv u) \AF( \uv u)^2$,
\EQ{GainPropToGEAF2}
	G = \frac 1 {\rm PI} \cdot \GE \, \abs{\AF}^2.
\EE
From \Eq{DefinitionOfGain} we \Eq{GainPropToGEAF2} we get antenna's ``power integral'' ${\rm PI}$ as 
\EQ{GainNormalizer}
	{\rm PI} =  \frac {1}{4 \pi}\int_{4\pi}\GE\, \abs{\AF}^2 \,d \Omega \,.
\EE
The array factor can  always be evaluated numerically directly from the defining sum \Eq{ArrayFactorCompact}; or by computing the 2D Fourier transform \Eq{ArrayFactorAsFourierTransform} by FFT; or, as we mostly do in this package, where we take  the excitation field as constant, even from the closed expression \Eq{ArrayGainClosedForm}. For many purposes, like when inspecting pointing accuracy, this is already enough, for only the relative gain, that is, the gain relative to the maximum level, the beam center, may be of interest. But when the attainable signal levels are of concern,  the absolutely normalized gain of \Eq{GainPropToGEAF2} is required. The problem then is to evaluate the power integral.
	 
	 
	 
\subsection{The power integral for an array with isotropic elements}
\label{Sec:PIforIsotropicArray}
%----------------------------------------------------------------------------------------
%
For the array with isotropic elements, $\GE =1$, the power integral
over the full solid angle can readily be evaluated. 
The squared magnitude of the array factor is
\EQ{AFSquared}
	\abs { \AF } ^2 = \sum a_\vc m \cc a_{\vc m'}
					\Exp{ i 2 \pi \vc u_0 D (\vc m-\vc m') }
						\Exp{ i 2 \pi \vc u D (\vc m-\vc m') } 
\EE

The only non-trivial step is to evaluate the integral
\EQ{AFPowerInt}
	I = \int_{4 \pi} \Exp { i 2 \pi \vc u D (\vc m - \vc m') }\, d \Omega(\uv u),
\EE
Noting that the orientation of the coordinate system does not matter when integrating over the full solid angle, we will orient the z-axis of our 3D spherical coordinate system along the direction of  the vector
$D(\vc m-\vc m')$, so that $\theta$ is  the polar angle of $\uv u = (\vc  u,u_z)$ from that direction, and hence the integrand in $I$ becomes
\[
	\Exp { i 2 \pi \cos \theta \norm { D (\vc m - \vc m')} } 
					\sin\theta d\theta d\phi \,.
\]
The integral can be immediately evaluated over $\theta$ (and trivially,$\phi$), to give
\EQ{Sinc}
	I = 4\pi \,\sinc ( 2 \pi \norm { D (\vc m - \vc m') } ) \,.
\EE
The power integral thus is
\EQ{SimplePowerIntegral}
		\rm {PI} = \sum a_\vc m \cc a_{\vc m'} \,
			\sinc ( 2 \pi \norm { D (\vc m - \vc m') } )\,\Exp { i 2 \pi u_0D(m-m')}\,.
\EE
%This expression can be computed without trouble with Matlab, but is not enormously illuminating.

 It may be observed that $G = \abs{\AF}^2/{\rm PI}$, with $\AF$ taken from \Eq{AFSquared} and PI from \Eq{SimplePowerIntegral}, 
 has the expected special cases. For instance, when $D_x= 0$ and $D_y=0$, we have only one, isotropic, element, so we expect 
$G \rightarrow 1$ when $D_x \rightarrow 0, D_x \rightarrow 0$, and this clearly happens. For the case of two elements along the x-axis, $a_{00} = 1$ and 
$a_{01} = \pm 1$, with $D_x = D, D_y = 0$, the absolutely normalized gain is
\EQ{SimpleDipole}
	G = 
		\frac { 
			1 \pm  \cos [2 \pi D ( u_x - u_x^0 )]
		}{
			1 \pm \sinc (2 \pi D) \cdot \cos 2 \pi D  u_x^0 
		}\,,
\EE
where $u_x = \sin\theta $, $u_x^0 = \sin\theta_0 $. Here, as in general, the normalization depends both on the array spacing, the excitation pattern, and the beam direction. 

%The antenna directivity $\mathcal D$ is defined as the maximum absolutely normalized gain,
%\EQ{DirectivityDefinition}
%	\mathcal = G(\uv u_0) = 1 \pm 1
%\EE
% so for the dipole, 


\subsection{The power integral for an array with directional elements}
\label{Sec:PIforGeneralCase}
%----------------------------------------------------------------------------------------------
%
%
When the element gain \GE\ depends on direction, the power integral cannot in general evaluated in a closed form. However, for arrays with reasonably large number of elements both in the x- and y-directions, an approximation can be found as follows. For such an array, the array factor resembles a sum of delta functions, that is, \AF\ has narrow beams around the widely separated grating directions, and pretty much zero elsewhere. Denoting by $\Delta\Omega_g$ the solid angle around the grating direction $\vc u_g$ that contain the essential part of the \AF\ in that direction, we write the power integral as the sum of integrals over the support regions,
\EQ{ApproxPowerIntegral_1}
	4\pi \cdot {\rm PI} = \int _{4\pi} \GE \, \abs{\AF}^2 \, d \Omega 
			\approx
				\sum_g \int _{\Delta\Omega_g} 
					\GE \abs {\AF}^2 \, d \Omega\,.
\EE
We assume that the element gain is wide compared to the size $\Delta\Omega_g$,
so that we can take \GE\ to be constant in that region, and take it out of the integral,
and use \Eq{ArrayFactorAsFourierTransform} to replace \AF\ by the 2-D Fourier transform of the excitation amplitude-sequence,
\EQ{ApproxPowerIntegral_2}
	4\pi \cdot {\rm PI} \approx
			\sum_g  \GE(\vc u_g) 
				\int _{\Delta\Omega_g} 
					\abs {\Four a((\vc u - \vc u_0) D)}^2 \, d \Omega(\uv u)\,. 
\EE
The differential surface element, on the surface of unit sphere, corresponding the solid angle $d\Omega$, is equal of the size of the projection $d^2 \vc u$ to xy-plane of that surface element, divided by the cosine of the polar angle $\theta_g$ of $\uv u$ at the element,
\EQ{ApproxPowerIntegral_3}
	dS_g(\uv u) = \frac {d^2 \vc u} { \cos \theta_g}\,.
\EE
This corresponds to change of variables from the spherical coordinates on the surface of the sphere to the cartesian coordinates on the xy-plane. The precise boundary of the area of integration does not matter, as it anyway is assumed to be in the 0-region of the integrand. We make the substitution \Eq{ApproxPowerIntegral_3} to \Eq{ApproxPowerIntegral_2}. Then we also expand the area of integration to cover the whole grating zone $Z_g$ hosting the direction $\vc u_g$; this just adds some more 0-region to the area, for there is at most one grating beam in a grating zone. The power integral becomes
\EQ{ApproxPowerIntegral_4}
	4\pi \cdot {\rm PI} =
			\sum_g  \frac {\GE(\vc u_g)} {\cos \theta_g} 
				\int _{Z_g} 
					\abs {\Four a((\vc u - \vc u_0) D)}^2 \, d^2 \vc u\,. 
\EE
Finally, we use Parseval's theorem for 2-D sequencies, \Eq{Parseval2D_2}, to get 
\EQ{GenralPowerIntegral}
	{\rm PI} = \left (\sum_g  \frac {\GE(\vc u_g)} {\cos \theta_g} \right )
			\frac 1 {D_xD_y} \frac {\sum \abs {a_\vc m}^2 } { 4\pi } \,.
\EE


\subsection{Array gain for an array with directional elements}
\label{Sec:NormalizedGeneralGain}
%--------------------------------------------------------------------------------------
%
Consider an array with the excitation amplitudes all unity, and directional elements with power gain \GE. From \Eq{ArrayGainClosedForm}, \Eq{GainPropToGEAF2} and \Eq{GenralPowerIntegral}, the absolutely normalized gain is
\begin{eqnarray} \label{BasicUniformAmpGain}
	G(\uv u) & = &\frac { \GE(\uv u) (M_xM_y)^2 [\diric()\diric()]^2  \ 4\pi D_xD_y }
			{ M_xM_y\sum_g  \frac {\GE(\vc u_g)} {\cos \theta_g} } \nonumber \\
	   & = &
	   		\frac {\GE(\uv u) } {  \sum_g  \frac {\GE(\vc u_g)} {\cos \theta_g} }
			\frac {4 \pi A } { \lambda^2} \cdot [\diric()\diric()]^2 \,,
\end{eqnarray}
where we used
\[
	D_xD_yM_xM_y = \frac { d_xM_x d_yM_y } { \lambda^2} 
		= \frac  {L_xL_y} { \lambda^2 } = \frac A { \lambda^2} \,.
\]
The factor \diric()\diric() is unity in the grating directions, so the maximum gain, the antenna directivity $\mathcal D(\uv u)$, to grating direction $\uv u$, is
\EQ{BasicDirectivity}
	\mathcal D(\uv u) = 
		\frac {\gE(\uv u) } {  \sum_g  \frac {\gE(\vc u_g)} {\cos \theta_g} }
			\frac {4 \pi A } { \lambda^2}\,.
\EE
The grating sum $\sum_g$ is to be evaluated over all the grating directions $\vc u_g$ which are the periodic replicas of the given direction $\vc u$, in the visibility circle, by period $1/D_x$ in x-direction and $1/D_y$ in y-direction. 

If $D_x < 0.5$ and $D_y < 0.5$, the grating sum contains only the single element $\vc u_g = \vc u$. For such a dense array, the directivity depends on the beam direction, 
\EQ{DirectivityForDenseArray}
	\mathcal D(\uv u) = \frac {4 \pi A \cos(\theta) } {\lambda^2} \,,
\EE
but  does not depend at all on the element pattern, nor the element spacing (as long as it is denser than the above limit). For instance, if the area of  our benchmark $50\times20$ array of density $D = 1.5$ wavelength, would be covered with 0.5 wavelength spacing or tighter, the broadside $(\theta=0)$ gain would always be 
$4\pi\times50\times20\times1.5^2=$~44.5~dBi.
The result is geometrically natural, as it says 
that the effective area $A_{\rm eff}= G\lambda^2/4\pi$ of the antenna is just the area of the antenna as seen from the target, that is, is equal to the projection of the area to the direction perpendicular the beam direction. Interestingly, the result is analogous to the sampling theorem result for time-signals, which says that if the signal is sampled fast enough, namely, so fast that there can be no aliazing, then no information is lost.  In the dense array case, what seems to happen is that when the incoming plane way is sampled tightly enough in space---so tightly that no directional aliasing can occurs---again ``no signal is lost'',  now in the sense that the element grid behaves as it would cover without holes all of the area that is within its outer boundaries. We cannot perhaps hope to do any better, and that might be why the 
element gain does not effect the overall gain at all. 

For less dense grids, the elements (non-normalized) gain, $\gE$, affects the array beam shape and directivity.



%If there is any \emph{systematic} error in the phasing steps, the beam direction changes from the desired $(u_x,u_y)$ in accordance of 
%\Eq{GratingCondition}. Small, zero-mean errors that vary randomly from element to element instead tend to add ``incoherently'', and the main effect is to broaden the beam and lower the gain, rather than to shift the beam direction. One may also note that while the relation between the direction cosine $u_x$ and $\delta_x$ is linear, the relation between the beam direction angle $\theta$ and $\delta_x$,  in the xz-plane, is 
%$\theta = \arcsin (\delta_x/2\pi D_x)$, so that
%\EQ{DeltaTheta}
%	d\theta = \frac { d\delta } { 2 \pi D_x \cos\theta}.
%\EE
%This would suggest that we need to be particularly worried  about $\delta_x$ and $\delta_y$ accuracy on the low elevations. But on the other hand, also the beams themselves get wider by the same $1/\cos(\theta)$ factor, and this tends to reduce the need of excessive accuracy. 

%Given a desired beam direction $(u_x,u_y)$, \Eq{GratingCondition} has an infinity of solutions for $\delta_x$ and $\delta_y$, differing by $n 2 \pi$. The solution becomes unique if we require that the phasing step is in some particular interval of length 
%$2\pi$, such as  $[-\pi,\pi]$.
%But in the package, we solve $\delta_x$ and $\delta_y$ by requiring that $n_x$ and $n_y$ in \Eq{GratingCondition} are both equal to zero. This result in the even more simple connection between $u_x$ and $\delta_x$:  
%\begin{eqnarray} \label{Eq:PhasingAngles}	
%	\delta_x & = & 2\pi D_x u_x \\ 	\nonumber
%	\delta_y & = & 2\pi D_y u_y  \,.
%\end{eqnarray}
%A blessing for programming in the choice of \Eq{PhasingAngles} is that $\delta_x$ and $\delta_y$, just like $u_x$ and $u_y$, or $\phi$ and $\theta$,  can be used to uniquely single-out one particular phase-steered grating lobe---note that in phase-steering each grating beam is moved simultaneously by an amount that is the same for all beams in the $u_x,u_y$ space though not in $\phi,\theta$ space. The two choices are illustrated in \Fig{BeamSteering} for $D_x=2.0$.  The function \prog{beamsteering} was used to produde the plot.

%For a transmitting antenna, the grating directions correspond to those directions where the elementary waves of the antenna elements all add in phase; in non-grating  directions, the wave is killed by destructive interference. If the antenna elements are isotropic, all the grating directions have equal gain, equal to $G_0=M_xM_y$. It is essential to note that when we say ``isotropic elements'', we really mean isotropic all over the full solid angle, including the downward directions. Such an array would need to be in free space to avoid ground reflection, so \Eq{ArrayFactor} might appear too much of an idealized representation for a real antenna. But \Eq{ArrayFactor} becomes useful when, for example, the array consists of directional elements who's beam do not see the ground in a significant amount. That is what we will assume below.

%For a receiving antenna with isotropic elements, the simultaneous-multi-beam character of the array is analogous to the aliasing that happens when under-sampling a time-signal, and much for the same reason. The reason is not related to wave interference as in transmission, but to the loss of information when monitoring the incoming wave front only on a discrete set of points. Even if we could record the phase of the incoming wave continuously at each antenna element, the grating ambiguity in the target direction cosines $(u_x, u_y)$ by $1/D_x$ and $1/D_y$ would remain. This is analogous to the ambiguity of the signal frequency modulo to the sampling rate in sampled time signals, where it is due to monitoring the signal only on a ``too sparse'', discrete, set of times. 

%In time signals, the ambiguity is removed by killing the unwanted aliases by anti-alising filtering. In the array case, the ambiguity-removing job of the antialiasing filter is done by directional antenna elements. 

%The quantities $1/D_x= \lambda/d_x$ and $1/D_y$ take the place of the Nyquist-frequency.  If the possible target directions are a priori restricted within a single grating zone,  there is no loss of directional information in the array. In bistatic radar reception, it should not be too difficult to ensure this condition. So a more significant reason for using directional element also in bistatic reception is simply to increase sensitivity. 



\subsection{Gain model for the array element}
\label{Sec:ArrayElement}
%-------------------------------------------------------------------------
%
We will assume a simple analytical form for the array element gain. We will assume circular polarization, and will assume axially symmetric element power gain pattern. As suggested by Kildar (p. 61), we will use the form
\EQ{ElementGain}
	\GE = \GE(\theta') = G_{\rm e} \cos^{n_e}(\theta'/2)\,,
\EE
where $\theta'$ is the angular offset from the axis direction $(\phi_E,\theta_E)$ of the element. Normalization of \GE\ to $4\pi$ over the solid angle gives the relation
\EQ{ElementGainRelation1}
	n_e = 2\, G_e - 2
\EE
between the pattern exponent $n_e$ and the maximum gain $G_e$. The relation between $G_e$ and the half-power beam width $W_e$ follows from
$ 0.5 = [\cos (W_e/4)]^{2G_e-2}$,
\begin{eqnarray}
	W_e & = & 4 \arccos [0.5^{1/(2G_e-2)}] \label{Eq:Gain2Width}\\ 
	G_e & = & 0.5 \, \left( 2 + \frac { \log(0.5)} {\log[\cos(W_e/4)] } \right) \,.
\end{eqnarray}
For instance, for  a 10~dBi element, $G_e = 10$, and \Eq{Gain2Width} gives beamwidth $W_e = 63\degr$. The  gain pattern of this element, as well as the element which has width~40\degr and gain~13.7, are shown in \Fig{ElementPatterns}. 

%So, for instance, an element with gain Ge = 10~dBi in the direction $(\phi_E, \theta_E)$ increases the antenna grating lobe gain in the direction $(\phi_E, \theta_E)$ by 10~dB from over $G_a=M_xM_y$, and  by $G_{\rm E}(\phi,\theta)$ in the other directions. With a 1000 element array, the maximum available gain, the gain at a center of a grating lobe which is phase-steered to  $(\phi_E, \theta_E)$, would be 40~dBi. We call this maximal gain the reference gain, $G_{\rm ref}$, of the antenna.  

%To plot the array gain in various directions at the center of the  phase-steered beam, is thus equivalent to plotting the gain $G_e$ of the element, multiplied by the factor $G_a$, which is just the number $M_xM_y$ of contributing elements. This result may or may not appear self-evident. If not, consider the following: In a grating direction, we add $M_xM_y$ equal amplitudes $\vc E_0$, so the total field is $\vc E =  M_xM_y \vc E_0$, so the power density is $(M_xM_y)^2 \norm {\vc E_0}^2$, which is  $(M_xM_y)^2$ times the power density produced by a single element. But the system power gain is by definition  normalized  by the isotropic power density of the system, which now is $M_xM_y$ times the isotropic density due to a single element. So the net increase in power density over isotropic situation is only by the factor  $(M_xM_y)^2/M_xM_y= M_xM_y$,  as claimed. 


\subsection{Computing the antenna directivity and beamwidth}
\label{Sec:ComputingDirectivityAndBW}
%----------------------------------------------------------------------------------------
%
The function \prog{powerint} computes the arrays's power integral from \Eq{GenralPowerIntegral} and the directivity from \Eq{BasicDirectivity}, for the case of unit excitation amplitudes. Function 
\prog{plot\_directivity} can be used to plot the directivity as a function of the beam direction. The curve is generated by tracking the maximum gain of a given beam when it is phase-steered; that beam is not necessarily the strongest beam of the array at all steerings.\Figure{Directivity1} shows the directivity of an $50\times20$ array with 1.5 wavelength spacing, assuming an element with 10~dBi gain,  both when the element is pointed in the array broadside direction, and when the element has been tilted 40\degr\ from the vertical.  The directivity of a dense array of the same physical size is also plotted for comparison, from \Eq{DirectivityForDenseArray}.

To find antenna beam width, having the non-normalized gain $\gE \abs{\AF}^2$ is sufficient. In fact, the element pattern is normally so wide compared to the 
grating beams of \AF\ that we can compute the antenna beamwidth from the array factor alone. Function \prog{beamwidth} computes the beamwidth in a vertical (fixed $\phi$) plane, basically by solving numerically the equation 
\EQ{BeamWidthEquation}
	\AF(\theta,\phi_0) = 1/\sqrt 2
\EE	
in the neighbourhood of  the beam direction $(\phi_0,\theta_0)$. The explicit 
$\diric()\diric()$ form ,\Eq{ArrayGainClosedForm}, is used for the \AF. 

Even though \prog{beamwidth} does not resort to the shortcut, it would be sufficient to solve numerically only the  beamwidth of a vertical beam, since the vertical beamwidth as a function of the polar angle in a given $\phi$ plane scales very precisely as $1/\cos\theta$. To see this, note that in a fixed vertical plane, \AF\ is a function of $u_x -u_x^0$, that is,
$\AF = f(\sin \theta - \sin \theta_0)$,  for some function $f$. Linearizing the argument of $f$ in the neightbourhood of $\theta_0$ as 
$(\cos\theta_0)(\theta-\theta_0)$,
we can state the equation \Eq{BeamWidthEquation} for the beamwidth $W$ as
\[
	f[\cos \theta_0 \cdot (W/2)] \approx 1/\sqrt 2 \,.
\]
The right-hand-side is a constant, so the product $\cos \theta_0 \cdot (W/2)$ must also be approximately constant when $\theta_0$  is varied.

The function \prog{plot\_maxgain} is an expanded version of \prog{plot\_directivity}, and plots into a single figure both the directivity, the vertical beamwidth, and the element's gain, as a function of polar angle; an example is shown in \Fig{MaxGainAndBeamWidth}.  The element gain has been normalized to unity at the maximum, and the antenna directivity has been normalized by dividing with the ``reference gain'' $G_{\rm ref}$,
which we define to be the elements directivity (element's maximum absolutely normalized gain $G_{\rm e}$) multiplied by the number of elements in the array,
\EQ{ReferenceGain}
	\Gref = M_x M_y \mathcal D_{\rm E} \,.
\EE

The benefit of the reference gain is that it is an invariant measure of gain for a given array.%
\footnote{
Another possibility would be to use as the gain reference the maximum directivity of a similarly sized dense array. \Gref\ is a little easier to calculate, and also seems to be numerically more near the maximum directivity for our typical non-dense arrays.
}
In particular, it does not depend on the phase steering. And at the same time, is a rather good approximation of the maximum directivity. In many plots we express the gain relative to \Gref. For the 1000~element array of 10~dBi elements, the reference gain is 10000, or 40~dB. It can be seen in 
\Fig{MaxGainAndBeamWidth} that with these normalizations, the antenna gain, indeed, follows ``on the average'' the element's gain pattern. 
%If we instead would normalize the directivity by the maximum value of the directivity over all phase steering angles, the directivity curve would fall systematically below the element's curve. 

In \Fig{Directivity1} it can be noted that the directivity curve is very smooth when the elements have been directed vertically, but has deep downwards spikes when the elements have been tilted by 40\degr. To understand why, it us useful to have a global view of the grating directions and their relation to the element gain pattern and the circle of visibility. Such a  view is provided by the function \prog{planearray}, which we describe next.


\subsection{Array gain and grating directions}
\label{Sec:PlaneArray}
%---------------------------------------------------------------
%
The function \prog{planearray} plots in one panel the array's array factor and element gain pattern in arbitrary vertical planes as function of the polar angle (by default, the plotting plane is determined by the element's direction).  A separate panel shows a  a zoomed-in part around the maximum value  (in the chosen plane) of the relative gain 
$(1/G_{\rm ref})\GE\abs{\AF}^2$. And there is a third panel that shows the grating directions in the $u_xu_y$-plane, the circle of visibility, and the projection of the antenna elements halfpower cone to the $u_xu_y$-plane.
An example is \Fig{PlaneArrayA}.
If allowed by a flag, \prog{planearray} draws into a separate window a 3-D~version of the grating-direction panel of the main figure. This can then be freely rotated interactively on screen using Matlab's built-in interaction tools. An example is \Fig{PlaneArrayB}.

One of the uses of \prog{planearray} is in trying to understand the behaviour of results produced with more specialized functions of the package. For example, in \Fig{DirectivityDip} we have used \prog{planearray} to find out the rationale behind the dips in the directivity curves that sometimes are there, and sometimes not. 

There is considerable amount of (slightly redundant) information packed into the header of the \prog{planearray} output figure \Fig{PlaneArrayA}. 
\begin{description}
%
\item[ARRAY] 
This line gives the array size as number of columns ($M_x$) and number of rows ($M_y$), the element spacing in the x- and y-directions ($D_x,D_y$) in units of wavelength, and the unwrapped phase-steering angles $\delta_x$ and $\delta_y$  for the marker beam, which is beam 1 in the figure's Grating Panel. The steering angles relate via \Eq{ReferenceDirection} and \Eq{Speherical2Cart} to the direction $\phi, \theta$ of the marker beam, given in header line 3. In the input section of \prog{planearray.m}, the phase steering can be specified either directly in terms of $\delta_x$ and $\delta_y$, or via the required direction of the marker beam.
%
\item[ELEMENT] 
 This line specifies the direction of the array element ($\phi,\theta$), the half power beam width ($w$), and the directivity ($G$). The element is assumed to be of the simple form $\cos^n(\theta/2)$ as described in section~\ref{Sec:ArrayElement}. The last item ($A_{\rm eff}/A$), the ratio of effective area to the physical area, is computed for the current phase steering, and corresponds to the maximum directivity among the grating beams, which may or may not be the directivity of the marker beam. The ratio is computed as 
\EQ{EffectiveArea}
	A_{\rm eff}/A = \frac { \max_g \mathcal D_g } { 4 \pi M_xM_yD_xD_y } \,.
\EE
%
\item[BEAM~1] 
This line gives the direction of the marker beam, (the beam 1, marked as the blue solid dot in the Grating Panel), the vertical half-power width ($w$) of the marker beam as computed by \prog{beamwidth}, the directivity of the marker beam 
($\mathcal{D}_1$) and the next stongest beam ($\mathcal{D}_5$) (if the beam~1 is not the  strongest beam, the directivity of the strongest beam is given), and the reference gain (\Gref). The directivities are given with respect to the reference gain, which is computed from \Eq{ReferenceGain}. The directivities are found by computing the absolutely normalized gain in the grating directions using \Eq{BasicDirectivity}.
\item[GRATING]
This line lists the directions and directivities of all the grating beams, starting with the marker beam. The directivities are given with respect to the reference gain.
\end{description}




%\Eq{ArrayFactor} is used in $G$. 
%For a given array and a given vertical plane $\phi = \phi_0$, it is sufficient to solve \Eq{BWequation} numerically only a for single elevation, say the vertical direction. In a fixed vertical plane, the array factor \Eq{ArrayFactorExplicit} is of the form
% \EQ{AFinVerticalPlane}
% 	\AF = f(\sin \theta - \sin \theta_0)
% \EE 
%where we have used $\Psi_x = 2\pi \cos\phi \sin\theta - \delta_x$ and written the phase-steering step $\delta_x$  via \Eq{PhasingAngles} in the form $2\pi D_x\cos\phi \sin\theta_0$, and similarly for $\Psi_y$. We solve numerically the equation $f(x) = 1/\sqrt 2$ and find $x = w_+$, and after that, we get $\theta_{+}$ for any $\theta_0$ from $\sin \theta = w_{+} + \sin \theta_0$. And similarly for $\theta_{-}$, and then the  beam width is  $W = \theta_{+} - \theta_{-}$.

%In the vicinity of $\theta_0,$ we can write \Eq{AFinVerticalPlane} in the form 
%$\AF \approx f[\cos \theta_0 \cdot (\theta-\theta_0)]$, so that
%$f[\cos \theta_0 \cdot (W/2)] \approx 1/\sqrt 2$. This shows the product $\cos \theta_0 \cdot (W/2)$ to be approximately constant

%
%, the above solution $w_{+}$, and therefore, 
%\EQ{WidthInverselyProp}
%	W \approx \frac {2 w_{+}} { \cos \theta_0} \,.
%\EE
%When $M$ is not too small, in the $\phi=0$ plane $w_{+}$ is to a good approximation the solution of the even simpler equation
%\EQ{WidthInverselyProp2}
%	\frac {sin \pi L_x u_{+}} {\pi L_x w_{+}} = \frac 1 {\sqrt 2},
%\EE
%which gives $\pi L_x u_{+} = 1.392$, so that 
%\EQ{WidthInverselyProp3}
%	W(\theta) \approx \frac {50.7\degr} { L_x \cos \theta} \,,
%\EE
%where $L_x=M_xD_x$ is the array size in units of wavelength.


\subsection{2-D beam cross section}
\label{Sec:2DBeamCrossSection}
%----------------------------------------------------------------------------
%
The vertical beamwidth for a few array sizes is plotted in \Fig{BeamWidthD15}, when the beam is in the xz-plane. However, the width of the beam in a fixed vertical plane is not a a complete measure of the beam size. To get a complete picture, it is desirable to plot the gain in the whole plane of the beam cross section, for instance, as gain-countor plot. The relative gain
\EQ{AntennaRelativeGain}
	g(\phi,\theta) = \gE \abs{\AF}^2
\EE
if sufficient for this purpose. Function \prog{arraygain} evaluates \Eq{AntennaRelativeGain} in arbitrary directions for the regularly spaced xy-array, using the analytic $\diric()\diric()$ form for the array factor, and assuming the simple $\cos^(\theta/2)$ form for the array element. The function \prog{beamshape2d} uses \prog{arraygain} to compute and plot the beam cross sections.  Only the array factor \AF\ is actually included into the gain computation, though, which means that the beam side-lobes will be somewhat inaccurate. The gain is normalized to unity at the beam center. 

A few examples are in \Fig{BeamShape2D}. The cross section is expressed in proper angular units, by dividing $\phi$ by the sine of the polar angle.  The plots show the 0.5, 0.1 and 0.01 relative power contours. Only the last one is visible in any of the side lobes. The vertical beam width, computed separately by \prog{beamwidth}, is also indicated in the plots. The present implementation of \prog{beamshape2d} cannot handle vertical or near-vertical pointing. Also, the computation takes a noticeable amount of time, about 15 seconds on a 2~GHz~G5, when using a $300\times300$ grid. (One should perhaps try the 2-D FFT method here, perhaps it would be faster, even though we would need quite long FFTs to get comparable angular resolution.)


\section{Phase and time accuracy}
\label{Sec:PhaseAndTime}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
How accurately does one need to be able to control the phase-steering element-to-element phase steps $\delta_x$ and $\delta_x$? 
If $\delta$ is changed systematically by $\Delta \delta$, the beam direction $\theta$ changes  by an amount $\Delta \theta$, which is calculable from
\Eq{ReferenceDirection} and \Eq{Speherical2Cart}.  But because also the array beam width  depends on the pointing direction, it is not quite obvious how ``pointing accuracy'' or pointing granularity should be usefully defined. Namely, if the beam is wider, there is less need to have its direction exactly along some nominal direction. The same applies to the desirable pointing granularity: there is not much sense to change the nominal beam direction at all if the change is only a very small part of the beam width. Therefore, 
\begin{itemize}
\item It seems appropriate to normalize the directional error tolerances and the granularity requirements by the beam width. 
\end{itemize}
Due to the $1/\cos\theta$ factor, we would be more tolerant against $\Delta \theta$, and require less $\theta$-granularity, in low elevations than on high elevations. 

What implications would accepting such a $\theta$-dependent approach have to the phase/time accuracy requirements? We will argue below that the implications would be all for the good.

While the relation between an applied phasing step $\delta$ and the resulting beam direction $\theta$ is non-linear%
\footnote{%
%----------
Basically, the relation is via the same $1/\cos\theta$ factor as the relation between beam tilt and beam width. When using normalized quantities, the $1/\cos\theta$ factor cancels out.
} 
 the relation between $\delta$ and the $u-$ or $\Psi$-variables is linear; that is, $\delta$ is pretty much the same as $u$ or $\Psi$. Anything that is simple in terms of $u$, will also be simple in terms of $\delta$. And one of the simple things will be the normalized quantities. To verify this, note that the beam's width in the $u$-space, $W_u$, will be the same number $W_u$ everywhere in the $u$-space, because beam steering just shifts the grating zones as a whole, without ``deforming'' them. This in turn follows already from \Eq{ArrayFactorCompact}, which shows that the array factor depends only on the \emph{difference} $u-u_0$. Thus, if $du$ is some tolerance, or a granularity cell dimension in the u-space, the ratio $du/W_u$ will be constant in the $u$-space. For \emph{small} $du$ and $W_u$, a constant ratio $du/W_u$ will imply the same, constant, ratio in terms of \emph{any} variable, such as the $\theta$, that depends smoothly on $u$. This confirms  that the normalized quantities of type $d\theta /W_\theta$ will not depend on the pointing direction, and are therefore the natural ones to specify and describe tolerances and granularities.  

We want the quantitative relation between chances of $\delta_x$ and $\delta_y$, and chances in the  normalized quantities. %
%
%
%The beam width $W_\theta$ can be computed from \Eq{WidthInverselyProp3}. The normalized direction change  is
%\EQ{RatDef}
%	\frac {\Delta \theta } { W_\theta }
%		= \frac {\Delta \delta } {2 \pi D_x \cos \theta } 
%			/
%			  \frac {2 x_{+} } { \pi L_x \cos \theta } 
%		= \frac {M_x \Delta \delta} { 4 x_{+} },
%\EE
%so that
%\EQ{DeltaAccuracyRequirement}
%	\Delta \delta 
%		= \frac {4  x_{+} } {M} \frac {\Delta \theta } { W_\theta }
%			\approx \frac {5.57} {M} \frac {\Delta \theta } { W_\theta } \,.
%\EE
%Note that this requirement for $\Delta \delta_x$ does not dependent on the beam elevation, for the $\cos \theta$ factors cancelled out in \Eq{RatDef}. For example, when $M_x = 50$, the change of the vertical pointing direction in the $\phi=0$ plane by one half power beam width, $\Delta \theta = W_\theta$, requires 
%$\Delta \delta_x = 6.38\degr$, independent of the elevation. To move the beam across one grating zone (and thus to cover all directions with some of the grating beams) using this step size, requires $360/6.38$ = 56 steps.
%
In terms of the phase variable $\Psi_x = 2 \pi u_x D_x$, the effect of phase steering by $\delta_x$ is to translate the array factor $\AF(\Psi_x)$ by $\delta_x$, without changing its shape. The change $\Delta \delta$ shifts the pattern $\AF(\Psi)$ by 
$\Delta \Psi = \Delta \delta$, and changes the beam direction by $\Delta \theta$. What is the relation between $\Delta \delta$  and the normalized change $\Delta \theta / W_\theta$?  

It suffices to study $\AF(\Psi)$ around the origin. In terms of $\Psi$,  the array's half power beamwidth corresponds to the $\Psi$-interval
$w_{\Psi} = 2\Psi_{+}$, where
\EQ{HalfWidthWithPsi}
	\frac 1 {\sqrt{2}} = \diric(\Psi_{+},M) \approx \frac {\sin (\Psi_{+}M/2)} { \Psi_{+}M/2 } \,.
\EE
We solve this to get $\Psi_{+}M/2 = 1.3916$, so that 
\EQ{XXX}
	w_{\Psi} = \frac { 5.57} {M} \,.
\EE
Because 
\EQ{XXXX}
	\frac {\Delta \Psi } { w_{\Psi} } \approx \frac {\Delta \theta}  { W_\theta } \,,
\EE
we get
\EQ{XXXX}
	\Delta \delta = \Delta \Psi 
			 = \frac {\Delta \Psi } { w_{\Psi}  } w_{\Psi}
				 \approx \frac {\Delta \theta}  { W_\theta } 
						 	\cdot \frac { 5.57} {M} \,.
\EE

For instance, $\delta_x$ granularity 
$\Delta \delta_x = \Delta \Psi_x = 5.57/M_x$
corresponds to beam-width sized granularity, for all elevations. The above argument applies to the y-direction also. So the grid of  uniform, beam-with adjusted beam-steering steps is 
just a regularly spaced grid of $(\delta_x, \delta_y)$ -values. To get the full half-sphere of directions, it is sufficient and necessary to have one grating zone covered by such a grid. For instance, for a $50\times20$ array, a~``$0.1\times$ beamwidth'' granularity-spec would require about
$2\pi 2\pi / (0.1\times5.57/50)(0.1\times5.57/20) = 127000$
distinct directions.


\subsection{Timing accuracy versus pointing accuracy}
%
Conceptually, to phase an array with the phasing steps $\delta_x$ and $\delta_y$, one would compute an initial phase offset matrix
\EQ{InitialPhaseOffsets}
	\delta(m_x,m_y)  = m_x \delta_x + m_y \delta_y
\EE
and load the phase offset registers of the DDS system at each element $(m_x, m_y)$ with these values, and clear the phase accumulators to zero. Then all the DDSs would start generating an output phase at a common moment of time, at the desired radar RF frequency $\fRF$. The phase offset register would have enough bits to divide $2\pi$ down to milliradians, so to get accurate initial offsets into the offset-registers should not be a problem. But we will assume in this model for the phase jitter that the exact moment of the DDS start varies a little from element to element. We will assume that the start time error is a gaussian random variable with zero mean and standard deviation 
$\Delta t$. 

In this model, the phase of transmission at element $n=(m_x,m_y)$ would be
\EQ{OutputPhase}
	\Phi_n(t) =  2 \pi \fRF (t + dt_n) + \delta(n) 
				= [2 \pi \fRF t + \delta_n ] + 2 \pi \fRF dt_n \,,
\EE
where $dt_n$ is the random error in the DDS start time and $\delta_n$ is the programmed phase. This means that there is a random error in the relative phases of the elements which also has zero mean, and standard deviation 
\EQ{ElementPhaserJitter}
	\Delta \psi = 2 \pi \fRF \Delta t \,.
\EE 
With \fRF = 225~MHz, the numeric  relation is
\EQ{PhaseJitterFromTimeJitter}
	\Delta \psi \ [\degr] = 8.1\times 10^{-2} \Delta t \ [\rm {ps}] \,.
\EE

Beam-with-sized pointing granularity for a $M=50$ array requires phasing step 6.4\degr. If we insert 6.4\degr\ to \Eq{PhaseJitterFromTimeJitter}, we get $\Delta t =  79$~ps, which looks like a short time. And, worse,  we will need to point the arrays with clearly better than a beam-width granularity, perhaps with a $0.1\times$beam-with granularity. Does this mean that we are in a trouble?  No, we no not need to control element timing with 8~ps accuracy. To be able to point the array with $0.1\times W_\theta$ accuracy on a $M=50$ array, we would need ``only'' to be able to 
\begin{enumerate}
\item Set the phase offset at each elements with 0.64\degr resolution (10 bits), and
\item Start the DDSs without  having a timing error \emph{gradient} across the array. 
\end{enumerate}
A constant offset clearly would not matter, and we will show below by simulation that small random offsets do not matter (much), either. What would change the pointing direction would be if the start time error would \emph{vary systematically} across the array, say increase with a constant step from element to element. 

It is possible to imagine the DDS start timing to be implemented in such a way that systematic start time gradient would occur naturally. For instance, if we were using a trigger that spreads from the origin across the array.  Or if we were having a part DDS, part analog up-conversion to RF,  the analog LOs, even though obviously being phase-locked, could still have a systematically increasing initial phase across the array. To be avoided.

Instead, all the DDSs should (conceptually) have their own clock, which starts the DDS using only information that is independent of the pointing direction. Say, starts after a hardwired, calibrated-once, element-depending, delay after receiving a centrally generated trigger pulse. Or starts directly based on some pre-programmed instant of time at the element's local clock. 

Even small random timing errors will to some degree resemble an overall phasing gradient, and thus change the beam direction. And even if not changing the beam direction, the timing jitter would cause incoherence to the array's radiation, and this would reduce the available level of constructive interference that is the basic of the beam-forming, and thus would reduce the maximum available gain. Simulation seems to indicate that the actual required timing accuracy is not anywhere near the 8~ps. Rather, it appears that someting like 100~ps would already be enough.

\section{Jitter calculations}
\label{Sec:Jitter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\subsection{Method}
%
To allow both amplitude and phase jitter at the antenna elements, we write the array factor as
\EQ{ArrayFactorJitter}
	\AF(u_x,u_y) = \abs {
					\sum_{m_x} \sum_{m_y} a_{m_xm_y}
						\Exp{i \psi_{m_xm_y}} 
						\Exp{i 2 \pi D_x(u_x-u_x^0)m_x } 
							\Exp{i 2 \pi D_y(u_y-u_y^0)m_y }
						} \,,
\EE
where
$u_x^0 = \delta_x/2\pi D_x$ and 
$u_y^0 = \delta_y/2\pi D_y$ 
are the direction cosines of the phase-steered beam. The amplitudes $a$ are taken to jitter around unity with a distribution that we will take to normal with variance 
$\Delta a$
\EQ{AmplitudeJitter}
	a = 1 + {\rm N}(0,\Delta a). 
\EE
The errors $\psi$ of the steering phase steps $\delta_x$ and $\delta_y$ will be normally distributed around zeros with standard deviation $\Delta \psi$
\EQ{PhaseJitter}
	\psi =  {\rm N}(0,\Delta \psi). 
\EE
Without any jitter, the maximum value of \AF, the (relative) gain in direction $(u_x^0,u_y^0)$,
is equal to the number $N = M_xM_y$ of array elements. The first observation is that, with only phase errors, but not amplitude errors,
\[
	\AF(u_x,u_y) <= \sum_n\abs{\dots} = N,
\]
and there can be equality only if all the phases $\psi_n$ are  zero. The power integral, \Eq{GenralPowerIntegral},  normalizing the gain should not depend much on small changes of the phases of the excitation amplitudes, so  the phase errors will mean that the maximum gain gets lower.
% (That is, it cannot happen  that the beam would just somehow reshape itself to some narrower, higher-gain shape in some direction, not even move to some other direction with the original gain level.)
Changes of the magnitudes of the excitation amplitudes would cause first-order changes in the  power integral which contain the factor $\sum \abs{a_n}^2$. We avoid this by constraining the sum always to be equal to $N$ in the simulation.

We will only consider pointing and beam shape in the $\phi=0$ plane, and will assume that the phase-steered pointing also is in this plane so that $\phi_0=0$, too. Then the last exponential factor in \Eq{ArrayFactorJitter} is always unity, and the array factor in direction $\theta_k$ becomes
\EQ{ArrayFactorJitter1D}
	\AF(\theta_k) = \abs {
			\sum_{m=0}^{M_x-1} 
				\left( \sum_{n=0}^{M_y-1} a_{m,n}
					\Exp {i \psi_{m,n}} \right)
						\Exp {i \Psi_k m } 
				} \,,
\EE
where
$\Psi_k = 2 \pi D_x ( \sin \theta_k - \sin \theta^0)$. 
 
The simulations are done by the function \prog{planearray\_jitter}. A simulation run consists of a number of trials, and has the following six steps.
\begin{enumerate}
%----------------
\item
As input, specify element's timing jitter $\Delta t$ in picoseconds and element's amplitude jitter $\Delta a$ around the value 1. Specify the direction of the undistorted beam $\theta^0$. Specify the number of trials. Specify the number of points in the $\theta_k$-grid.
\item
From the timing jitter standard deviation $\Delta t$, compute the corresponding phase jitter $\Delta \psi$.
\item
Select the range for $\theta_k$ so that it covers the expected main beam around the given $\theta^0$, and a few side maxima around it.
%
\item Compute the fiddle-factor matrix $Z(m,k) = \Exp{\Psi_k m}$. This is common to all trials of the run and needs to be computed only once.  
%
\item In each trial
%
\begin{enumerate}
%%
\item Use the random number generator \prog{randn} to generate the matrices
$(a_{m,n})$ and  $(\psi_{m,n})$, having the distributions \Eq{AmplitudeJitter} and \Eq{PhaseJitter}.
%%
\item Normalize the amplitudes by dividing each of them by 
$\sum_{m,n} (a_{m,n})^2 = 1$.
%%
\item Compute $\AF(\theta_k)$ by direct summation according to \Eq
{ArrayFactorJitter1D}.
%%
\item Estimate beam maximum direction, gain, and halfpower beamwidth by inspecting $\AF(\theta)$, and append these three numbers to the three vectors of results.
\end{enumerate}
%
\item Using the result vectors, produce a result plot, such as \Fig{Jitter1}. 
The plot shows the distribution of the amplitude change, the beam direction change, and the beam width change in the simulation run, as
\begin{enumerate}
%%%
\item
Histogram of the beam amplitude change away from the expected value 1,
\[
	\Delta \abs{\AF} = \abs{\AF}_{\rm trial} - 1.0 \,.
\]
Note that this is the array factor magnitude change. Change of the gain $G=\abs{\AF}^2$ is about twice as large in the \%-units used in the histogram.
The mean value and standard deviation of $\Delta \abs{\AF}$ over the trials is shown as item one in line three of the plot header.
%%
\item
Histogram of the beam direction change around the value $\theta^0$
\[
	\Delta \theta = \theta^0_{\rm trial} - \theta^0 \,.
\]
The mean value and standard deviation of $\Delta \theta$ over the trials is shown in line three of the plot header.
%%
\item
Histogram of the beam width change from the computed value $W_0$ of the undistorted beam,
\[
	\Delta W = W_{\rm trial} - W_0\,.
\]
The mean value and standard deviation of $\Delta W$ over the trials is shown as the last item in line three of the plot header.
\end{enumerate}
%
\end{enumerate}

\subsection{Results}
%
Figures~\ref{Fig:Jitter1}-\ref{Fig:Jitter4} show the beam shape jitter characteristics for a $50\times20$ element array when the timing jitter at the elements varies from 100~ps to 1000~ps. In all cases, we assumed amplitude jitter 0.2 around the undistorted value of 1.0, (and normalized the amplitude power sum to unity). The beam width, in the xz-plane in this vertical pointing is $W=0.68\degr$. This means that if we can accept $0.1\times W$ errors in pointing, in essentially
 \emph{no} simulation run, should $\Delta W$ exceed 0.07\degr. The panel (b) of the figures show that this requirement clearly is fulfilled for timing jitter up to 500~ps, but starts to become questionable at the timing jitter of 1000~ps. The  changes in beam width are similarly small up to about 500~ps. 
 
What is, perhaps, more troublesome is the loss of gain. At  $\Delta t = 100~ps$, the mean loss of gain in the main beam is about 10\% (0.5 dB), at $\Delta t = 300~ps$ the loss is about 25\% (1.3~dB) and at 500~ps about 50\% (3.0~dB). 

We emphasize that the loss of gain is mostly due to the ``incohence'' caused by the phase jitter. If we keep in the above four runs the input parameters otherwise intact but set the element amplitude jitter to zero, the beam jitter distributions change very little from those shown in Fig.~\ref{Fig:Jitter1}-\ref{Fig:Jitter4}. For example, the gain loss at 500~ps reduces from the 50\% to about 44\%.

Unless there is some fundamental problem with these simulation, it appears very clear that to get, say $0.1\times$beamwidth pointing accuracy, it is definitely enough to be able to control the element phase with something like 10--20\degr\ accuracy (clock timing with 100--300~pc accuracy at 225 MHz), as long as the phase errors at individual elements are uncorrelated. The large number of elements (1000 in this simulation) then takes care about averaging the distortions so that the main effect is just some loss of gain. The randomness of the timing/phasing errors at the elements is so important that it perhaps should be enforced.



\section{SNR estimate for the test array}
\label{Sec:TestarraySNR}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
To get a rough estimate of \SNR\ for the Kiruna test array, assume that the test array is oriented towards the VHF antenna, long size (the x-direction) towards the VHF antenna, and that the VHF antenna is perpendicular to that direction, at 
$x=L=200$~km in the test array coordinate system, and assume that the line from the test array to the VHF antenna is perpendicular to the VHF vertical direction (``flat Earth''), see \Fig{ta_snr_calc}. Also, assume optimal polarization matching and assume that the angle $\chi$ between the electric field and the scattering direction is constant over the whole common volume (in our case, it is then equal to the elevation angle $\epsilon$ from the test array to the center of the common volume). We use the bistatic radar equation to estimate the received signal power $P_{\rm s}$
\EQ{BistaticRadarEq}
	P_{\rm s} = P_x \times \frac {\lambda^2}{ (4 \pi)^3}	
				\frac {D_1 D_2}
				{ R_1^2 R_2^2} \times
				 \sin^2(\chi) \sigma_e \times n_e  V_{\rm eff} \,,
\EE
where the effective scattering volume is
\EQ{Veff}
	V_{\rm eff} 
		= \int _{\rm CV} dV(P)
			\frac { g_1(P)g_2(P) } { (r_1/R_1)^2 (r_2/R_2)^2 } \,.
\EE
Quantities indexed by ``1'' refer to the VHF antenna system, quantities indexed by ``2'' refer to the test array system.  The quantities $g_1$ and $g_2$ are the relative gains of the VHF antenna and the test array in the direction of the point $P$ in the common volume, so that the absolutely normalized gains in the direction of $P$
are 
$G_1(P) = D_1 \times g_1(P)$ 
and
$G_2(P) = D_2 \times g_2(P)$. 
The relative gains are normalized to unity towards the center of the beams, the point $Q$. 

For the vertical VHF beam, we use a gaussian beam shape approximation in the 
$XY$ plane at altitude $z$ 
\EQ{SimpleVHFbeam}
	g_1(x,y) = \Exp{-\frac {(x/r_1)^2}{A} - \frac {(y/r_1)^2}{B}}\,.
\EE
with $A = 3.97 \times 10^{-5}$ and $B = 3.19 \times 10^{-5}$, which correspond to half power beam width of 1.7\degr\ in the north-south $(=x)$ direction, and 
0.6\degr\ in the east-west $(=y)$ direction, and 
$r_1^2 =  x^2 + y^2 + z^2$. \Eq{SimpleVHFbeam} is evaluated by \prog{simple\_vhfbeam.m} in the package. We take the VHF antenna directivity to be 
$D_1 = 43.2$~dBi, which corresponds to an effective area of $3000~{\rm m}^2$.

The test array directivity $D_2$ as a function of the zenith  angle of the phase-steered beam  in the $XZ$-plane is computed by \prog{plot\_maxgain.m}, which evalutes 
\Eq{BasicDirectivity}. For the array element gain, we use the simple approximation given by \Eq{ElementGain}, with the element directivity 11.5~dBi. For the present purpose this seems a fair enough approximation of the gain diagrams provided by the element's manufacturer. The directivity $D_2$ is shown in \Fig{ta_directivity}. For the zenith angle 35\degr\ (elevation 55\degr), which correspond to the element Yagi maximum gain direction, and common volume  center at 300~km above the VHF antenna, we find $D_2 = 28.1$~dBi. The relative gain $g_2$ of the test antenna is just taken to be the array factor \AF\ squared, computed from 
\Eq{ArrayGainClosedForm} using 
\prog{arraygain.m}. The presumption is that an element's beam is wide compared to the arrays's grating lobe width. \Fig{ta_beamsection55} shows the perpendicular cross section of the resulting test array beam shape $g_2$, projected to the common volume distance $R_2=360$~km, which corresponds to  300~km altitude. As marked in the figure, the half power beam width in the meridian plane is  3.7\degr. 

The effective volume \Eq{Veff} is evaluted by \prog{common\_volume.m} by setting up a sufficiently tight rectangular grid of evaluation points which cover a sufficiently large 3D region around the common volume center point $Q$, and replacing the integral by the Riemann sum,
\EQ{Veff_compu}
	V_{\rm eff} 
		\approx \Delta V  \times \sum_P \Gamma(P) 
		 \equiv \Delta V \times \sum _P
			\frac { g_1(P)g_2(P) } { [r_1(P)/R_1]^2 [r_2(P)/R_2]^2 } \,.
\EE
where $\Delta V = dx\, dy\, dz $ is the volume of the grid's cell. We take the grid bounding box  
$\Delta X \times \Delta Y \times \Delta Z$ to be so large that it fully encompasses at least all the terms $\Gamma(P)$ that are larger than 0.01. For the common volume at the altitude 300~km, a box with $\Delta X = 30$~km, $\Delta Y = 10$~km and  
$\Delta Z = 90$~km is large enough. With 
$dx = 0.3$~km,  $dy = 0.1$~km and $dz = 0.5$~km, the grid has
1.85~million points. Without any attempt of optimization it takes about nine minutes by a 2~GHz Mac~G5 to complete \prog{common\_volume.m}, returning 
$V_{\rm eff} =1340\ {\rm km}^3$. 

The program \prog{common\_volume.m} keeps all terms $\Gamma(P)$ of the sum in memory, together with the corresponding ranges $r_1(P)$ and $r_2(P)$. By binning 
$\Gamma(P)$ as a function of the pulse propagation delay 
$(r_1+r_2)/c$, it is possible to inspect how the strength of the received signal increases as a function of time when the common volume is filled.%
\footnote{
The points of constant propagation delay define a scattering surface, an ellipsoidal surface slicing the common volume. For a very short transmitted pulse, at any instant of time, the received signal is the sum of all the rays scattered through the surface. It is the area of this surface, times its (small) thickness, that defines the volume element that is relevant when inspecting how the whole volume is filled. Rather than computing the volume analytically, 
\prog{common\_volume.m} just picks all those points $\Gamma(P)$ that have the propagation delay in a given small interval of time. 
}
The top panel 
of \Fig{ta_volume55} shows the filling of the scanttering volume by a long pulse, longer than about 600~\us. For a significantly shorter pulse, the volume is never fully filled, and the maximal signal strength is less. For instance, the standard \EISCAT\ VHF experiment 
\prog{tau1} uses an alternating code with 72~\us\ baud length. The bottom panel of \Fig{ta_volume55}, computed for a 70~\us\ pulse, shows that the maximum effective scattering volume is only 25\% of the full volume when using the \prog{tau1} illumination.

It is also possible to plot horizontal slices of the effective volume as contour plots of the value of $\Gamma(P)$ on the slice. An example is the horizontal slice through the center of the volume at altitude 300~km,  shown 
in~\Fig{ta_zslice55}. The effective area 
\EQ{EffectiveSliceArea}
	A = dxdy \sum_{P \in {\rm slice}}  \Gamma(P)
\EE
of the slice is 30~km$^2$. \Fig{ta_zslice55} plots the effective area as a function of altitude throughout the scattering volume.

By assuming electron density $n_e=10^{11}\ {\rm m}^{-3}$, and using $P_x = 1$~MW, the expected signal power is estimated from \Eq{BistaticRadarEq} into
\Table{ta_snr_compu} 
on~\Page{Tab:ta_snr_compu}, for three common volumes and for two pulse lengths. We assume 20~kHz receiver bandwidth, as in \prog{tau1} for VHF, and system temperature 150~K, to estimate the noise power and then find the \SNR\ values as shown in \Table{ta_snr_compu}: %
%
\begin{description}
%===================
\item [1. For the common volume at 120~km]we predict a \SNR\ of about 9\% when transmission uses a long enough pulse ($\gtrsim 300$~\us) to fill the volume, and about 4\% for a 70~\us\ pulse.
\item [2. For the common volume at 300~km]we predict a \SNR\ of 22\% when transmission uses a pulse long enough ($\gtrsim 500$~\us) to fill the volume, and 6\% for a 70~\us\ pulse.
\item[3. For the common volume at 600~km]we predict a \SNR\ of 27\% when transmission has a pulse long enough ($\gtrsim 1500$~\us) to fill the common volume, and 2\% for a 70~\us\ pulse.
\end{description}%
%===================%
We note that in the case of volume-filling pulses, the larger common volume size compensates the larger distances, but that this is not the case for a short pulse of a fixed length. We also note that \SNR\ is smaller for the 120~km altitude volume than in the higher volumes mainly because of the substantially smaller polarization factor. 

%:TABLE
\begin{table}
\caption[Computing SNR for the test array.] 
{
\BL{Predicting \SNR\ for the test array.} We use \Eq{BistaticRadarEq}, for three common volume altitudes: 120~km, 300~km and 600~km, and two pulse lengths: a volume-filling long pulse  (LP) and a 70~\us\ pulse. We use constant electron density 
$n_e = 10^{11} \ {\rm m}^{-3}$, and make no temperature correction to the electron scattering cross section 
$\sigma_e = 10^{-28}\ {\rm m}^2$. 
%
The main work in the computation is to estimate the effective scattering volume $V_{\rm eff}$, using \Eq{Veff_compu}. 
Transmission power 1~MW and optimal polarization matching are assumed. 
%
For the noise power, we use system temperature 150~K, assume receiver bandwidth $B = 20$~kHz, and estimate the power as
$P_{\rm noise} = k_{\rm B} \Tsys B$. 
%
In the package, the \SNR\ is computed by 
\prog{testarray\_snr.m}, using effective volumes computed by 
\prog{common\_volume.m}. 
}
\begin{center}
\begin{tabular}{||l|l|l|l||}
\hline\hline
$P_x$
	&   $1\times10^6$~W
	&   $1\times10^6$~W
	&   $1\times10^6$~W 	\\	
$R_1$  
	&   \textbf{120~km}    
	&   \textbf{300~km}    
	&   \textbf{600~km}     	\\
$n_e$   
	&   $1.0\times 10^{11} \ {\rm m}^{-3}$   
	&   $1.0\times 10^{11} \ {\rm m}^{-3}$   
	&   $1.0\times 10^{11}\  {\rm m}^{-3}$ \\
$\epsilon_2$   	
	&   30\degr   
	&   55\degr   
	&   70\degr   \\ 
$R_2$  
	&   233~km     
	&   363~km     
	&   634~km 	\\	 
$\chi$  
	&   32\degr   
	&   57\degr   
	&   72\degr	\\
$\sin^2\chi$  
	&  0.28   
	&  0.67   
	&  0.88 	\\
$V_{\rm eff}$ \rm LP  
	&  155~km$^3$   
	&  1340~km$^3$   
	&  13600~km$^3$ \\
$V_{\rm eff}$ 70~\us       
	&   67~km$^3$    
	&   342~km$^3$    
	&   1250~km$^3$ \\
$G_{\rm e}$ 
	& 11.5~dBi
	& 11.5~dBi
	& 11.5~dBi \\
$D_1$     
	& 43.2~dBi
	& 43.2~dBi
	& 43.2~dBi	\\
$D_2$      
	& 25.4~dBi
	& 28.0~dBi
	& 28.5~dBi	\\
$P_{\rm s}$ LP    
	& $3.61 \times 10^{-18}$~W
	& $9.24 \times 10^{-18}$~W
	& $11.0 \times 10^{-18}$~W	\\ 
	\hline
$\Tsys$    
	& 150~K
	& 150~K
	& 150~K	\\
$B$    
	& 20~kHz
	& 20~kHz
	& 20~kHz	\\
$P_{\rm noise}$  
	& $4.14 \times 10^{-17}$~W
	& $4.14 \times 10^{-17}$~W
	& $4.14 \times 10^{-17}$~W \\
	\hline
\SNR~LP  
	& \textbf{0.09}
	& \textbf{0.22}
	& \textbf{0.27}	\\
\SNR~70~\us  
	& \textbf{0.04}
	& \textbf{0.06}
	& \textbf{0.02}	\\
\hline\hline	
\end{tabular}
\end{center}
\label{Tab:ta_snr_compu}
\end{table}%

%:HERE

\newpage
\appendix

\section{Figures to Chapters~2--7}
\label{Sec:Figures}
%############################################################
%
Listing of the figures the is on~\Page{ListOfFigures}. There are a few more figures in this compilation than are referred to in the main text. Also, there are considerable amount of details, both in the figures and in their captions, that are not handled elsewhere in the notes. For many of figures we indicate the Matlab \prog{m-files} in the \prog{e3ant} package that were used to generate them.   

%:Fig:BeamSteering
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/steering_E3D_color}
\caption [Beam steering.] 
{
\BL{Beam steering, reception view in the continuous-time domain.}
A far-away point source in direction $\uv u$ produces time- and space varying incoming electric field 
$s(t,\vc r,\uv u) \vc E_{\rm p}$ near the antenna array of $M$ elements. The vector $\vc E_p$ is taken to be complex-valued to represent polarization; it may depend on the direction $\uv u$, but not on the position $\vc r$ or the time $t$.   The elements sniff the incoming field at points $\vc R_m$ so that a (complex-valued, to represent the polarization) voltage $s_m(t)$ is generated across the terminals of element $m$. This voltage is amplified by a real factor $a_m$ and fed to the beam-former system, which may be either a time-steering system (TS) or a phase-steering system~(PS). In the TS system, the signal $a_m s_m$ at element $m$ is delayed by an amount $T_m$ which depends on the element position and the desired steering direction $\uv u_0$, before being fed to an adder which produces the final beam-formed signal $z(t)$. In the PS~version of the beam-former, there is no explicit delaying, but instead the phase of $a_m s_m(t)$ is adjusted by an angle $\Psi_m$, computed from the element position, the desired beam direction, and the average frequency $\bar \omega$ of the incoming pulse. The figure represents the array elements by semi-spheres to suggest an isotropic element gain in the upper half-sphere. When desired, a non-isotropic element power gain $\rm {g_E}$ can be explicitly incorporated by replacing $a_m$ by 
$a_m \sqrt{\rm {g_E(\uv u)}}$.
}
\label{Fig:BeamSteering}
\end{figure}



%:Fig:TwoElementArray1
\begin{figure}
\centering
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D01_Th60}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D01_Dty}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D04_Th60}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D04_Dty}
}
\caption [A two-element array 1.] 
{
\BL{Gain pattern and directivity of  an vertical array of two isotropic elements.} Panels~(a) and~(b) are for element separation $d = 0.1\lambda$, panels~(c) 
and~(d) are for $d = 0.4\lambda$. The beam steering in panels~(a) and ~(c) has been to 60\degr\ from boresight (horizontal beam). The 3D gain pattern is obtained from the curves shown by rotating them around the vertical axis, which is also the direction of the array axis. The polar plots are labeled by the beam elevation angle, and the gain is in absolute units. Both of these arrays are dense ($D < 0.5\lambda$),  so there are no grating lobes apart the main lobe, but there nevertheless is a rather well-developed ordinary side lobe in~(c). 
}
\label{Fig:TwoElementArray1}
\end{figure}


%:Fig:TwoElementArray2
\begin{figure}
\centering
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D10_Th60}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D10_Dty}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D18_Th60}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D18_Dty}
}
\caption [A two-element array 2.] 
{
\BL{Gain pattern and directivity of  an vertical array of two isotropic elements.} Panels~(a) and~(b) are for element separation $d = 1.0\lambda$, panels~(c) 
and~(d) are for $d = 1.8\lambda$. The beam steering in panels~(a) and ~(c) has been to 60\degr\ from boresight (horizontal). The 3D gain pattern is obtained from the curves shown by rotating them around the vertical axis, which is also the direction of the array axis. The polar plots are labeled by the beam elevation angle, and the gain is in absolute units. In~(a), there are two grating lobes and one ordinary, but large, side-lobe, while in~(c), all the lobes have equal directivity, and are grating lobes. 
}
\label{Fig:TwoElementArray2}
\end{figure}


%:Fig:TwoElementArray3
\begin{figure}
\centering
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D14_Th00}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D14_Th16}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D14_Th20}
}
\subfigure[] {
\includegraphics[width=0.42\linewidth]{figures/tea/tea_D14_Dty}
}
\caption [A two-element array 3.] 
{
\BL{Gain pattern and directivity of  an vertical array of two isotropic elements.} Element separation is $d = 1.4\lambda$. Beam steering is to 0\degr\ (horizontal) in panel~(a), to elevation 16\degr\ in~(b) and to 20\degr\ in ~(c). In~(a), all the three lobes are grating lobes, in~(b), there are three grating lobes, and in~(c), only two grating lobes. As function of the steering angle, the directivity oscillates around the value 2, the absolute maximum value 2.14 is achieved with the steering angle 
20.9\degr.
}
\label{Fig:TwoElementArray3}
\end{figure}

%:Fig:RandomArray
\begin{figure}
\centering
\subfigure[] {
\includegraphics[width=0.43\linewidth]{figures/randant/regant}
}
\subfigure[] {
\includegraphics[width=0.43\linewidth]{figures/randant/randant_1}
}
\subfigure[] {
\includegraphics[width=0.43\linewidth]{figures/randant/randant_2}
}
\subfigure[] {
\includegraphics[width=0.43\linewidth]{figures/randant/randant_3}
}
\caption [Randomized array.] 
{
\BL{Randomizing array element positions.} Panel~(a) shows the array factor
$\uv u  \mapsto {\rm AF} (\uv u - \uv u_0)$
 for a $12\times 4$ regular planar array with isotropic elements.  The array has been phase-steered to 60\degr\ elevation. Panels~(b) and~(d) shows two randomizations, where the grid positions in $x$- and $y$-directions have been increased by a random amount, uniformly distributed between 0 and one wavelength. In panel~(d), also the z-position has been similarly randomized.
}
\label{Fig:RandomArray}
\end{figure}


%:Fig:tx_equiv_circuit
%
\begin{figure}
\centering
\subfigure {
	\includegraphics[width=0.7\linewidth]{figures/tx_equiv_circuit}
}
\caption [TX equivalent circuit.] 
{
\BL{TX equivalent circuit.}
}
\label{Fig:tx_equiv_circuit}
\end{figure}


%:Fig:Reciprocity
\begin{figure}
\centering
\subfigure[] {
	\includegraphics[width=0.5\linewidth]{figures/reciprocity_circuit_a}
}
\subfigure[] {
	\includegraphics[width=0.5\linewidth]{figures/reciprocity_circuit_b}
}
\caption [Reciprocity in a two-port system.] 
{
\BL{Reciprocity in electronic circuitry.} Assume that in panel~(a), a current $I_A = I_0$ is applied to port A of a two-port circuit, and that it causes the voltage $V_A^{(B)} = U_0$ in port B. Then assume that the current generator and the voltmeter are interchanged, to get the situation shown in panel~(b). Assume that the generator is adjusted so that it produces the same current $I_0$ to port B,  $I_B = I_0$. Then the statement of reciprocity is that the voltage meter at port A will read $U_0$, $V_B^{(A)} = U_0$. For the specific circuitry shown here, this can be verified by direct computation of the voltage, which in both cases gives $U_0 = Z_{AB} I_0$, where 
$Z_{AB} = Z_1 Z_3 / ( Z_1 + Z_2 + Z_3)$.  The internal currents and voltages in cases~(a) and~(b) are different---for instance, the currents through $Z_2$ and $Z_3$ are equal in case~(a) and non-equal in case~(b)---but the
\emph{coupling} between the ports is the same; in both cases, it is quantified by the same linear relationship involving the impedance $Z_{AB}$. 
}
\label{Fig:Reciprocity}
\end{figure}




%:Fig:ReceptionGain
\begin{figure}
\centering
\subfigure {
\includegraphics[width=0.7\linewidth]{figures/reception_gain}
}
\caption [ReceptionGain.] 
{
\BL{Antenna directional gain in reception.} A small test antenna, e.g. a short dipole, is at a fixed distance from the antenna of interest, always oriented perpendicularly to the direction unit vector $\uv u$.  
%
We envision $\uv u$ but not the distance to be varied by moving the test antenna, while always keeping it perpendicular to $\uv u$, and inquiry the dependency on $\uv u$ of the voltage $V_B^{(A)}$ at $A$ caused by the current at $B$, the situation shown in panel~(b).  We first consider the transmission from A as in panel~(a). 
%
Total transmitted power is proportional to $I_A^2$, so by definition of the 
directional amplitude gain $\mathcal G_T(\uv u)$, the far field $\vc E_T$ in direction $\uv u$ is proportional to $\mathcal G_T(\uv u) I_A$. On the other hand, the induced voltage $V_A^{(B)}$ depends linearly on $\vc E_T$, so that also $V_A^{(B)}$ is proportional to $I_A$ and $\mathcal G_T$. 
%
We write this as 
$V_A^{(B)} = Z_{AB} I_A$, where $Z_{AB} = a \,\mathcal G_T(\uv u)$ and the factor  $a$ that does not depend on  $\uv u$. By reciprocity, the impedance $Z_{AB}$ gives also the coupling from $B$ to $A$ in panel~(b): 
$V_B^{(A)} = a \,\mathcal G_T(\uv u) \, I_B.$  
%
The (linear) relation between $\norm{\vc E_R}$ and $I_B$ cannot depend on $\uv u$, so we must also have  $V_B^{(A)} = b \, \mathcal G_T(\uv u) \, \norm{\vc {E_R}}$, with some $b$ that is independent of $\uv u$. That is, all directional dependency in $V_B^{(A)}$ comes via $\mathcal G_T(\uv u)$.  This shows that the gain pattern in reception is equal to the gain pattern in transmission. 
%
To find the constants of proportionality $a$ and $b$ requires knowledge of the actual radiation fields associated with a short dipole. With standard assumptions of polarization and impedance matching in the receiving system, this leads to the general result 
$A_\mathrm {eff} = (\mathcal G_T(\uv u))^2 \lambda^2/4\pi$
for the effective area of an receiving antenna.
}
\label{Fig:ReceptionGain}
\end{figure}






\clearpage

%:Fig:ArrayFactor
\begin{figure}
\centering
\includegraphics[width=0.50\linewidth]{figures/arrayfactor}
\caption [Array delay geometry.] 
{
\BL{Computing the time delay/the phasing factor for an array element}.
We are interested in computing the far field of an antenna array in the direction $\uv u$, when the array elements are at the positions $\vc R_m$.  The plane $ {\rm P}_u$ is normal to $\uv u$. For a monochromatic plane wave, the relative phases of the fields $\vc E_m$ are equal to the elements' phase distances $2 \pi \Delta_m/\lambda$ from this plane.  The time distance is $T_m = \Delta_m/c$, independent of the wave length. 
}
\label{Fig:ArrayFactor}
\end{figure}


%:Fig:DiricKernel
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/diric}
\caption [Diriclet kernel.] 
{
\BL{Magnitude of the Dirichlet kernel for three values of the M-parameter.}
 The value of the largest local maxima, located at about $\Psi \approx 3\pi/M$ and $\Psi \approx 2\pi - 3\pi/M$, and the smallest local maximum, is  indicated. The largest maximum has value of about 0.212 (-13.5 dB in terms of power), roughly independent of M for any larger M, while the smallest maximum, near $\Psi\approx \pi$, goes towards zero as 1/M. The kernel has zeros at the points $\Psi = 2\pi n/M$.
}
\label{Fig:DiricKernel}
\end{figure}


%:Fig:GratingZones
\begin{figure}
\centering
\includegraphics[width=0.55\linewidth]{figures/gratingzones}
\caption [Grating zones.] 
{
\BL{Grating zones of an regular, rectangular  plane array.}
The element spacing is $D_x=D_y = 1.5$. The array is phase-steered so that the beam of zone Z(1,0), the solid dot, points to $\phi =10.0\degr$, $\theta=60.0\degr$. The unwrapped phasing angles are $\delta_x = 460.5\degr$, $\delta_y= 81.2\degr$.
}
\label{Fig:GratingZones}
\end{figure}


%:Fig:BeamSteering
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/beamsteer_D20_1}
\includegraphics[width=0.78\linewidth]{figures/beamsteer_D20_2}
\caption [Two representations of a beam's phase-steering phase.] 
{
\BL{Beam polar angle as function of the element-to-element phase step.}
The element spacing is $D_x$ = 2.0. In the top panel, the phase step $\delta_x$ is computed from $\delta_x = 2\pi D_x u_x$, in the bottom panel, $\delta_x$ has been shifted to the interval $[-\pi,\pi[$. The beams' grating zones are also indicated. Note the non-linear dependence of $\theta_0$ on $\delta_x$. The top panel is perhaps the better choice when focusing on a single beam when it moves through the full range of pointing directions.  The bottom panel instead emphasizes the in fact there are a set of equivalent grating beams, which are all steered simultaneously. The plots were produced by \prog{beemsteering.m}. 
}
\label{Fig:BeamSteering}
\end{figure}


%:Fig:ElementPatterns
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/elementpatterns}
\caption [A simple antenna element gain pattern.] 
{
\BL{The $\cos^n(\theta/2)$ gain pattern.}%
The left panel shows the gain in linear units, the right panel in dBi. The blue solid line represents a beam with directivity 10.0~dBi and beam-width 63.2\degr. The dashed red line represents a beam with directivity 13.7~dBi and beam-width 
40.0\degr.
}
\label{Fig:ElementPatterns}
\end{figure}



%:Fig:MaxGainAndBeamWidth
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/maxgain50x20}
\caption [Directivity and vertical beam width.] 
{
\BL{Directivity and vertical beam width of an array.}
The $50\times20$, $1.5\times1.5$ rectangular plane array uses 
10~dBi elements, tilted 40\degr\ from the vertical. The directive has been normalized by the arrays reference gain. In addition to the directivity, the top panel shows the element's gain pattern, normalized to unity at its maximum. All the plots are for the vertical plane that contains the element's direction. The figure was produced with \prog{plot\_maxgain}.
}
\label{Fig:MaxGainAndBeamWidth}
\end{figure}


%:Fig:BeamWidthD15
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/beamwidthD15}
\caption [Beam width for a few array sizes.] 
{
\BL{Beam width for a few sizes of a linear array.} 
Element spacing is 1.5~wavelengths. The number of elements $M$ and the beam width to bore-sight direction $W(0)$ are given in the legend.   
}
\label{Fig:BeamWidthD15}
\end{figure}


%:Fig:PlaneArrayA
\begin{figure}
\centering
%\subfigure[] {
	\includegraphics[width=0.78\linewidth]{figures/planearrayA}
%}
%\subfigure[] {
%	\includegraphics[width=0.50\linewidth]{figures/planearrayB}
%}
\caption [Inspecting the array pattern with \prog{planearray}.] 
{
\BL{Inspecting the array pattern with \prog{planearray}.} 
}
\label{Fig:PlaneArrayA}
\end{figure}


%:Fig:PlaneArrayB
\begin{figure}
\centering
\includegraphics[width=0.78\linewidth]{figures/planearrayB}
\caption [A 3D view of an array's grating directions.] 
{
\BL{A 3D view of an array's grating directions.} This figure was produced by \prog{planearray}, with parameters as in \Fig{PlaneArrayA}. 
}
\label{Fig:PlaneArrayB}
\end{figure}




%:Fig:BeamShape2D
\begin{figure}
\centering
\subfigure[] {
\includegraphics[width=0.45\linewidth]{figures/beamshapeA00E40}
}
\subfigure[] {
\includegraphics[width=0.45\linewidth]{figures/beamshapeA15E40}
}
\subfigure[] {
\includegraphics[width=0.45\linewidth]{figures/beamshapeA30E40}
}
\subfigure[] {
\includegraphics[width=0.45\linewidth]{figures/beamshapeA15E25}
}
\caption [Beam's cross-sectional shape.] 
{
\BL{Shape of an array's beam cross section}. Panels~(a)-(c) are for elevation~50\degr, panel~(d) for elevation~25\degr. The rectangular plane array has size $M_x=50$, $M_y=20$ elements, with uniform element spacing of 1.5 wavelengths. The contour plot shows the beam power gain at the 0.5, 0.1 and 0.01 levels compared to the beam center. The plotted cross section is perpendicular to the beam axis, with the plot x-axis in the horizontal plane; that is, the view is as seen along the beam axis, away from the radar. The plots were produced by \prog{beamshape2d.m}.
}
\label{Fig:BeamShape2D}
\end{figure}

%:Fig:Directivity1
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/directivity1}
\caption [Dips in the array directivity pattern.] 
{
\BL{Narrow dips in the array directivity pattern.} 
The figure shows the directivity of an $50\times20$ array, with 1.5~wavelength spacing, in the vertical plane through the elements' direction. The element has gain $G_e = 10$~dBi. Both the curve for vertical elements and elements tilted by 40\degr\ are shown. Also is shown the directivity of a dense $(D < 0.5)$ array of the same physical boundary. 
}
\label{Fig:Directivity1}
\end{figure}


%:Fig:DirectivityDip
\begin{figure}
\centering
\subfigure[$\theta_1=4.0\degr,$  $ g_4=g_9 = $ -23~dB] {
\includegraphics[width=0.38\linewidth]{figures/gratingA04}
}
\subfigure[$\theta_1=5.0\degr$] {
\includegraphics[width=0.38\linewidth]{figures/gratingA05}
}
\subfigure[ $\theta=4.0\degr$, $g_4=g_9=$ -11~dB] {
\includegraphics[width=0.38\linewidth]{figures/gratingB04}
}
\subfigure[$\theta_1=5.0\degr$] {
\includegraphics[width=0.38\linewidth]{figures/gratingB05}
}
\caption [Explaining the directivity dips.] 
{
\BL{Explaining the directivity dips.} 
This figure illuminates the origin of the dip at $\theta\approx-4.5\degr$ in the directivity curves of \Fig{Directivity1}. In panels (a) and (b), the array elements are vertical, in panels (c) and (d), the elements have been tilted to $\phi_{\rm E}=0, \theta_{\rm E}=40\degr$. When the marker beam (beam 1) is phase-steered from $4\degr$ to $5\degr$, two grating beams move out of the circle of visibilitity. For the tilted elements, a still significant amount of power is suddenly taken and then re-released, for the gain of both the horizontal beams is still only about 10~dB down from the main beams. Instead, for the vertical  elements, beams 4 and 9 have so little gain that what they do near the boundarary of the visibility circle does not matter in the power budget.
The figure was produces with \prog{planearray}.
}
\label{Fig:DirectivityDip}
\end{figure}


%:Fig:Jitter1
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/jitter50x20t100a20}
\caption [Jitter simulation 1.] 
{
\BL{Jitter simulation 1.} Simulated array factor jitter in a $50\times20$ element array in x-direction, when element timing jitter is $\Delta t = 100$~ps, the corresponding element phase jitter 8.1\degr, and the element amplitude jitter is 20\% around 1.  The undistorted beam has been directed in vertical direction, and has half-power width of 0.68\degr\ in the x-direction.
}
\label{Fig:Jitter1}
\end{figure}

%:Fig:Jitter2
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/jitter50x20t300a20}
\caption [Jitter simulation 2.] 
{
\BL{Jitter simulation 2.} Simulated array factor jitter in a $50\times20$ element array in x-direction, when element timing jitter is $\Delta t = 300$~ps, the corresponding element phase jitter 45\degr, and the element amplitude jitter is 20\% around 1.  The undistorted beam has been directed in vertical direction, and has half-power width of 0.68\degr\ in the x-direction.
}
\label{Fig:Jitter2}
\end{figure}


%:Fig:Jitter3
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/jitter50x20t500a20}
\caption [Jitter simulation 3.] 
{
\BL{Jitter simulation 3.} Simulated array factor jitter in a $50\times20$ element array in x-direction, when element timing jitter is $\Delta t = 500$~ps, the corresponding element phase jitter 24\degr, and the element amplitude jitter is 20\% around 1.  The undistorted beam has been directed in vertical direction, and has half-power width of 0.68\degr\ in the x-direction.
}
\label{Fig:Jitter3}
\end{figure}


%:Fig:Jitter4
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/jitter50x20t1000a20}
\caption [Jitter simulation 4.] 
{
\BL{Jitter simulation 4.} Simulated array factor jitter in a $50\times20$ element array in x-direction, when element timing jitter is $\Delta t = 1000$~ps, the corresponding element phase jitter 81\degr, and the element amplitude jitter is 20\% around 1.  The undistorted beam has been directed in vertical direction, and has half-power width of 0.68\degr\ in the x-direction.
}
\label{Fig:Jitter4}
\end{figure}

\clearpage

%:Fig:ta_snr_calc
\begin{figure}
\centering
\includegraphics[width=0.50\linewidth]{figures/ta_snr/snr_comp}
\caption [TA: Geometry for computing the effective volume.] 
{
TA: \BL{Geometry for computing the effective volume.} We make two simplifications to the actual geometry. First, we assume flat Earth. Second, we assume that the VHF antenna rotation axes is along the y-axis in the figure, that is, perpendicular to the line from TA to the VHF antenna, which is our x-axis. The effective volume is computed using \Eq{Veff_compu}. $Q$ is the center point of the common volume. $P$ is a point in the computation grid. The angle 
$\chi$ is the angle between the polarization vector and the direction of the scattered wave. We did, by oversight, take $\chi$ to be constant over the whole computation grid. We did let the distances $r_1$ and $r_2$ to vary in the proper way, though.  
}
\label{Fig:ta_snr_calc}
\end{figure}


%:Fig:ta_directivity
\begin{figure}
\centering
\includegraphics[width=0.70\linewidth]{figures/ta_snr/ta_directivity}
\caption [TA: Array directivity as function of beam elevation.] 
{
TA: \BL{Directivity as a function of the beam's zenith angle.} The plot is produced by \prog{plot\_maxgain.m}, based on \Eq{BasicDirectivity} and the simplified element gain of \Eq{ElementGain}, with assumed element directivity  
$G_{\rm e} = 11.5$~dBi, and element zenith angle $\theta=35\degr$.  The dark portion of the curve corresponds to directivity that is at most 3~dB below the reference directivity $G_{\rm ref} = 48 \times G_{\rm e} = 28.3$~dBi. The bottom panel gives the half power beam width in the vertical plane. The markers in the top panel are at zenith angles
13.0\degr, 20.0\degr, 35.0\degr and 60.1\degr, corresponding to common volume altitudes 1000~km, 600~km, 300~km and 120~km. The directivities in these directions are 26.1~dBi, 28.7~dBi, 28.1~dBi and 25.4~dBi. The plot was produced by \prog{plot\_maxgain.m}.
}
\label{Fig:ta_directivity}
\end{figure}


\clearpage

%:Fig:ta_beamsection30
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{figures/ta_snr/ta_beamsection30}
\caption [TA: Beam cross section for common volume at 120~km.] 
{
TA: \BL{Receiver beam perpendicular cross section} through the center of the common volume, at 120~km altitude above the VHF antenna, at the distance of 233~km from the test array. Beam elevation is 30\degr. The contours give the relative gain 
$g = \abs{\AF}^2$, normalized to unity at the beam center. The half-power vertical beam width (red line) is 6.1\degr. The plot was produced by \prog{beamshape2d.m}.
}
\label{Fig:ta_beamsection30}
\end{figure}


\clearpage

%:Fig:ta_beamsection55
\begin{figure}
\centering
\includegraphics[width=0.55\linewidth]{figures/ta_snr/ta_beamsection55}
\caption [TA: Beam cross section for common volume at 300~km.] 
{
TA: \BL{Receiver beam perpendicular cross section} through the center of the common volume, at 300~km altitude above the VHF antenna, at the distance of 360~km from the test array.  Beam elevation is 55\degr. The half-power beam width (red line) is 3.70\degr.
}
\label{Fig:ta_beamsection55}
\end{figure}


%:Fig:ta_beamsection70
\begin{figure}
\centering
\includegraphics[width=0.55\linewidth]{figures/ta_snr/ta_beamsection70}
\caption [TA: Beam cross section for common volume at 600~km altitude.] 
{
TA: \BL{Receiver beam perpendicular cross section} through the center of a common volume at 600~km altitude. The beam elevation is 70\degr, and the range to the center of the common volume is 635~km.  Beam elevation is 70\degr. The half-power beam width (red line) is 3.23\degr.  
}
\label{Fig:ta_beamsection70}
\end{figure}

\clearpage

%:Fig:ta_volume30
\begin{figure}
\centering
\includegraphics[width=0.70\linewidth]{figures/ta_snr/ta_volume30}
\caption [TA: Filling of the common volume at 120~km altitude.] 
{
TA: \BL{Filling of the common volume at about 120~km altitude.}
The top panel shows how the common volume fills as a function of the propagation time of a long, volume-filling, pulse. For instance, the signal that is received at about 1400~\us\ after the start of transmission, comes from the whole 155~km$^3$ common volume. The curve at the bottom panel gives the effective scattering volume as function of time for a 70~\us\ pulse. Such a pulse is never able to illuminate the whole volume, so the maximal scattering volume is less than the size of the common volume.
The plots are produced by \prog{common\_volume.m}.
}
\label{Fig:ta_volume30}
\end{figure}


%:Fig:ta_zslice30
\begin{figure}
\centering
\includegraphics[width=0.70\linewidth]{figures/ta_snr/ta_zslice30}
\caption [TA: Horizontal slice through the common volume at 120~km altitude.] 
{
TA: \BL{Horizontal slices through the common volume at about 120~km altitude.} In the top panel, the curves are contours of the quantity $\Gamma$, defined in \Eq{Veff_compu}, at the nominal beam intersection altitude. The bottom panel gives the effective are, defined in \Eq{EffectiveSliceArea}, as a function of altitude. 
The plot was produced by \prog{common\_volume.m}. 
}
\label{Fig:ta_zslice30}
\end{figure}


\clearpage

%:Fig:ta_volume55
\begin{figure}
\centering
\includegraphics[width=0.60\linewidth]{figures/ta_snr/ta_volume55}
\caption [TA: Filling of the common volume at 300~km altitude.] 
{
TA: \BL{Filling of the common volume at 300~km altitude.}
}
\label{Fig:ta_volume55}
\end{figure}

%:Fig:ta_zslice55
\begin{figure}
\centering
\includegraphics[width=0.60\linewidth]{figures/ta_snr/ta_zslice55}
\caption [TA: Horizontal slice through the common volume at 300~km altitude.] 
{
TA: \BL{Horizontal slice through the common volume at 300~km altitude.} The curves are contour curves of the ``relative gain''  $\Gamma$, defined in \Eq{Veff_compu}. 
}
\label{Fig:ta_zslice55}
\end{figure}



%:Fig:ta_volume70
\begin{figure}
\centering
\includegraphics[width=0.60\linewidth]{figures/ta_snr/ta_volume70}
\caption [TA: Filling of the common volume at 600~km altitude.] 
{
TA: \BL{Filling of the common volume at 600~km altitude.}
}
\label{Fig:ta_volume70}
\end{figure}


%:Fig:ta_zslice70
\begin{figure}
\centering
\includegraphics[width=0.60\linewidth]{figures/ta_snr/ta_zslice70}
\caption [TA: Horizontal effective area of the common volume at 600~km altitude.] 
{
TA: \BL{Horizontal slice through the common volume at 120~km altitude.}
}
\label{Fig:ta_zslice70}
\end{figure}


\clearpage

\section{Pointing geometry}
\label{Sec:PointingGeometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
The function \prog{sitegeom1.m} computes and plots elevation, azimuth, range and the beam intersection angle $\chi$ at the specified site, for Troms\o\ vertical, field-aligned and CP2 pointing schemes. The pointing info for several prospective and current sites are shown 
Fig.~{\ref{Fig:PurnuvaaraGeometry}--{\ref{Fig:AbiskoGeometry}. The program calls the official \EISCAT\ geometry package
\prog{geom} (standard \EISCAT\ filesystem location
\url{/kst/eros4/geom}) to perform the geometry computations, so this directory must be on the Matlab path. The package has been modified to allow the standard \EISCAT\ ESR site to be \emph{replaced}  by an arbitrary site.  The geometry package  version~1.4 or higher contains these modifications.

\vspace{1cm}

\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_purnuvaara}
\caption [Purnuvaara pointing geometry.] 
{
\BL{Pointing directions from Purnuvaara} to Troms\o.
}
\label{Fig:PurnuvaaraGeometry}
\end{figure}


\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_sodankyla}
\caption [Sodankyl\"a pointing geometry.] 
{
\BL{Pointing directions from Sodankyl\"a.}
}
\label{Fig:SodankylaGeometry}
\end{figure}


\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_porjus}
\caption [Porjus pointing geometry] 
{
\BL{Pointing directions from Porjus.}
}
\label{Fig:PorjusGeometry}
\end{figure}


\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_kiruna}
\caption [Kiruna pointing geometry.] 
{
\BL{Pointing directions from Kiruna.}
}
\label{Fig:KirunaGeometry}
\end{figure}


\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_koutokeino}
\caption [Koutokeino pointing geometry.] 
{
\BL{Pointing directions from Koutokeino.}
}
\label{Fig:KoutokeinoGeometry}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=0.90\linewidth]{figures/geom_abisko}
\caption [Abisko pointing geometry] 
{
\BL{Pointing directions from Abisko.}
}
\label{Fig:AbiskoGeometry}
\end{figure}


\clearpage
\newpage

\section{Matlab functions}	
\label{Sec:Matlab}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
There are two types of m-files in the e3ant directory: m-files that produce plots, and m-files that don't. The plotting files have simple headers and do not usually allow parameter input on the command line. Instead, they require that the input parameters  be hardcoded in the files themselves. Plotting normally requires so much parameters and fine-tuning that putting all that info into call parameter list is impractical. Thus, the files must be manipulated, but I have made an effort to indicate what can be safely modified.  The other group of m-files perform some clearly defined computation and have normal parametrized headers, and the normal Matlab help should work usefully in their case.

\subsubsection{Plotting functions}
%
\begin{itemize}
\item \prog{beamshape2d} --- Plot beam's 2D cross section.
\item \prog{beamsteering} --- Plot beam direction as a function of phasing angle.
\item \prog{common\_volume} --- Compute and plot the size of the effective scattering volume.
\item \prog{planearray} --- Plot array gain in V-plane at any azimuth.
\item \prog{planearray-jitter} --- Plot beam shape jitter distributions.
\item \prog{plot\_maxgain} --- Plot maximum available gain (the element's gain) and the vertical beamwidth as function of elevation.
\item \prog{simplebeam} --- Plot the $cos^n(\theta/2)$ gain pattern.
\item \prog{sitegeom1} --- Plot a sites's pointing directions for certain Troms\o\ beam directions.
\end{itemize}

\subsubsection{Computation-only functions}
\begin{itemize}
\item \prog{arraygain} Compute array factor and element gain in arbitrary directions.
\item \prog{beamwidth} Compute vertical beam width of an array.
\item \prog{grating\_dir} Compute an array's grating beam directions.
\item \prog{powerint} Computes an array's directivity and power integral.
\item \prog{simplegain} Compute an element's normalized gain assuming $\cos^n(\theta/2)$ shape.
\item \prog{simple\_vhfbeam} Gaussian approximation to VHF antenna beam shape.
\item \prog{testarray\_snr} Compute the expected \SNR\ for the test array.
\end{itemize}






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%					Listing of arraygain
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\clearpage
%\section{Listing of arraygain.m}
%\label{Sec:ArrayGainM}

%\lstinputlisting[%
%     showstringspaces=false,%
%     frame={tb},%
%     lineskip=-1pt,%
%     extendedchars=true,%
%     basicstyle=\footnotesize\ttfamily,%
%     numbers=left,%
%     stepnumber=1,%
%     numberstyle=\tiny,%
%     xleftmargin=2em,%
%     language=C,%
%     breaklines]{code/arraygain.m}



\end{document}
