# doa

Direction of arrival of signal

## Description

`[`

calculates the direction of arrival of a signal when the transmission source is either a
single-feed antenna defined using a `phiArrival`

,`thetaArrival`

] = doa(`obj`

,`freq`

)`conformalArray`

object or an incident
plane-wave defined using a `planeWaveExcitation`

object.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

To estimate the direction of arrival, the `doa`

function uses the
fundamentals of RF propagation from the transmission to the reception of the signal. The phase
of a far-field received signal *E _{R}(r)* at an
individual antenna is:

$${E}_{R}(r)\text{\hspace{0.17em}}\alpha \text{\hspace{0.17em}}{e}^{j\beta r}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(1)$$

where *β* is the propagation constant of the received signal and
*r* is the distance between the transmit and receive elements.

For a given transmit antenna, the position of the antenna element is
[*x*_{tx},
*y*_{tx},
*z*_{tx}], where

$${x}_{tx}=\rho \mathrm{cos}(\phi )\mathrm{sin}(\theta )\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(2)$$

$${y}_{tx}=\rho \mathrm{sin}(\phi )\mathrm{sin}(\theta )\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(3)$$

$${z}_{tx}=\rho \mathrm{cos}(\theta )\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(4)$$

where *ρ* is the distance between the transmit element and the
geometrical midpoint of the receive antenna array. *θ* is the elevation
angle or the angular position of the transmit element from the *z*-axis and
*φ* is the azimuth angle that lies in the
*xy*-plane.

Assume that:

The receiver array is a homogenous linear or rectangular array with identical elements.

The separation between two adjacent elements of the receiver array is uniform. For a linear array, the element spacing is

*d*. For a rectangular array, the row spacing is_{space}*d*and the column spacing is_{row}*d*._{col}The receiver array has an equal number of elements along each axis. The number of elements along each axis of the array is even. For a linear array, the number of elements is

*N*. For a rectangular array, the number of elements in a row is_{elem}*N*and the number of elements in a column is_{row}*N*._{col}

For a uniform linear array (ULA) where the receive array elements lie along the
*x*-axis, the position of the
*n*^{th} elements is

$${x}_{po{s}_{n}}=\frac{{d}_{space}}{2}({N}_{elem}+1-2n)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(5)$$

where *N _{elem}* is the number of elements in the
ULA.

For the uniform rectangular array (URA), which lies in the *xy*-plane,
the position of the receive array element in the
*n*^{th} row and
*m*^{th} column is
[*x*_{posn}
*y*_{posn}],
where

$${x}_{po{s}_{n}}=\frac{{d}_{col}}{2}({N}_{elem}+1-2n)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(6)$$

$${y}_{po{s}_{n}}=\frac{{d}_{row}}{2}({M}_{elem}+1-2m)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(7)$$

Consider a single-antenna transmitter located at (*x _{tx}*,

*y*,

_{tx}*z*). This equation determines the far-field separation

_{tx}*r*between the receiver array element and the transmitter for a ULA:

$${r}_{n}=\sqrt{{({x}_{tx}-{x}_{po{s}_{n}})}^{2}+{({y}_{tx})}^{2}+{({z}_{tx})}^{2}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{(ULA)}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(8)$$

.

This equation determines the far-field separation *r* between the
transmitter and the element in the *m*^{th} column
and *n*^{th} row of a URA:

$${r}_{m,n}=\sqrt{{({x}_{tx}-{x}_{po{s}_{n}})}^{2}+{({y}_{tx}-{y}_{po{s}_{n}})}^{2}+{({z}_{tx})}^{2}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{(URA)}\text{\hspace{0.17em}}\text{\hspace{0.17em}}(9)$$

The function uses these equations to calculate the phase of the electric field by doing a full-wave electromagnetic simulation and uses this phase to calculate the direction of arrival in terms of the elevation and azimuth angles.

## Version History

**Introduced in R2022a**