Direction of Arrival Estimation

This modules is used for estimating the 2D direction of arrival (DoA) using 2D planner antenna array as shown in fig-[?]. The implementation expects the user to provide the antenna array parameters such as inter-antenna element spacing and number of antenna elements in both horizontal and vertical directions. The implementation expects more than 2 antennas in both the directions.

Alternative text

5G Toolkit provides three methods for estimating the DoA as shown in table below. All these methods offers different performance for different computational complexity. The quality of DoA estimates with number oof antennas in both the directions. Higher number of antenna in vertical direction improves the accuracy of elevation angle estimates. Similarly, the increased number of antennas placed Horizontally improves the resolution of azimuth angle estimates.

Table 37 Direction of Arrival Estimation Methods


Memory Complexity

Computational Complexity



















The comparison stated above is within these three methods only.


DFT_DoA and MUSIC_DoA are not updated yet. These two methods will be provided before the end of July.

The following examples illustrates the way to use the APIs to estimate the DOA using DoAEstimation.

Code example

# Ntx, Nty, dtx, dty will be taken from antenna arrays properties
# Hk is estimated at the receiver.
# However, for perfect CSI, it can be directly taken from channel.OFDM.
Lpath        = 5 # Returns DoAs for 5 strongest paths
doaEstimator = DoAEstimation("ESPRIT", Ntx, Nty, Hk.shape[1]) # Create a ESPRIT DoA Object
xoA_est      = doaEstimator(Hk, Lpath, dtx, dty)    # Return 2 x 5 DoA matrix
# row-0 is azimuth angles for each path
# row-1 is elevation angles for each path

The details about the input output interface of DoAEstimation is provided below.

class toolkit5G.Positioning.DoAEstimation(method, Nr_x, Nr_y, Nobservation)[source]

This module provides an API to estimate the 2D \((\) azimuth (\(\theta\)) and elevation (\(\phi\)) \()\) direction of Arrival using the method specified by the user. The module expects OFDM channel estimates (\(\text{H}_\text{k}\)) as an input and exploits the structure in this channel using number of antennas placed in columns (\(\text{N}_\text{r,x}\)), number of antennas placed in rows (\(\text{N}_\text{r,y}\)), spacing between antennas placed in columns (\(\text{d}_\text{r,x}\)) and spacing between antennas placed in rows (\(\text{d}_\text{r,y}\)) to estimate the 2D (\(\{(\theta_{l},\phi_{l})\}_{l=0}^{L-1}\)) angle of arrival traced by multi-paths (\(L\)) while propagating over the wireless channel.


Currently, DoAEstimation supports only “ESPRIT” based direction of arrival method.

  • method (str) – Defines the method for DoA estimation \(\{\) “ESPRIT”, “MUSIC”, “DFT” \(\}\)

  • Nr_x (int) – Defines the Number of Antenna in the receiver side along the x-axis.Should be a positive integer greater than 2.

  • Nr_y (int) – Defines the Number of Antenna in the receiver side along the y-axis.Should be a positive integer greater than 2.

  • Nobservation (int) – Defines the number of time samples. They may be fft size or fft size*numSymbols etc. Should be a positive non-zero integer.


Nr_x and Nr_x must be even integers to estimate 2D direction of arrivals.

  • Hk (np.ndarray) – Defines the channel matrix. It should have a size (Nr_x*Nr_y, Nobservation).

  • numPaths (int) – Defines the number of propagation paths.

  • d_spcgx_Rx (number) – Defines the spacing between antennas along x-axis. It should be >0.

  • d_spcgy_Rx (number) – Defines the spacing between antenna along y-axis. It should be >0.


[2, numPaths], np.number – Returns 2D direction of arrival for numPaths. Row-0 is azimuth angles for each path and row-1 is elevation angles for each path.


ValueError – [Error-DoAEstimation]: ‘method’ must be ‘ESPRIT’, ‘MUSIC’, ‘DFT’!

The details about the DoA estimation methods used in this package are discussed below.

DoA Estimation Methods