# rootmusicdoa

Direction of arrival using Root MUSIC

## Syntax

• `ang = rootmusicdoa(R,nsig)` example
• `ang = rootmusicdoa(___,'Name','Value')` example

## Description

example

````ang = rootmusicdoa(R,nsig)` estimates the directions of arrival, `ang`, of a set of plane waves received on a uniform line array (ULA). The estimation uses the root MUSIC algorithm. The input arguments are the estimated spatial covariance matrix between sensor elements, `R`, and the number of arriving signals, `nsig`. In this syntax, sensor elements are spaced one-half wavelength apart.```

example

````ang = rootmusicdoa(___,'Name','Value')` allows you to specify additional input parameters in the form of Name-Value pairs. This syntax can use any of the input arguments in the previous syntax.```

## Examples

collapse all

### Three Signals Arriving at Half-Wavelength-Spaced ULA

Assume a half-wavelength spaced uniform line array with 10 elements. Three plane waves arrive from the 0°, –25°, and 30° azimuth directions. Elevation angles are 0°. The noise is spatially and temporally white Gaussian noise.

Set the SNR for each signal to 5 dB. Find the arrival angles.

```N = 10; d = 0.5; elementPos = (0:N-1)*d; angles = [0 -25 30]; Nsig = 3; R = sensorcov(elementPos,angles,db2pow(-5)); doa = rootmusicdoa(R,Nsig)```
```doa = -0.0000 30.0000 -25.0000```

The `rootmusicdoa` function finds the correct angles.

### Three Signals Arriving at 0.4-Wavelength-Spaced ULA

Assume a uniform line array 10 elements, as in the previous example. But now the element spacing is smaller than one-half wavelength. Three plane waves arrive from the 0°, –25°, and 30° azimuth directions. Elevation angles are 0°. The noise is spatially and temporally white Gaussian noise. The SNR for each signal is 5 dB.

Set the `ElementSpacing` property value to the interelement spacing, 0.4 wavelengths. Find the arrival angles.

```N = 10; d = 0.4; elementPos = (0:N-1)*d; angles = [0 -25 30]; Nsig = 3; R = sensorcov(elementPos,angles,db2pow(-5)); doa = rootmusicdoa(R,Nsig,'ElementSpacing',d)```
```doa = -25.0000 0.0000 30.0000 ```

The `rootmusicdoa` function finds the correct angles.

## Input Arguments

collapse all

### `R` — Spatial covariance matrixcomplex-valued positive-definite N-by-N matrix

Spatial covariance matrix, specified as a complex-valued, positive-definite, N-by-N matrix. In this matrix, N represents the number of elements in the ULA array. If `R` is not Hermitian, a Hermitian matrix is formed by averaging the matrix and its conjugate transpose, `(R+R')/2`.

Example: [ 4.3162, –0.2777 –0.2337i; –0.2777 + 0.2337i , 4.3162]

Data Types: `double`
Complex Number Support: Yes

### `nsig` — Number of arriving signalspositive integer

Number of arriving signals, specified as a positive integer.

Example: 2

Data Types: `double`

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside single quotes (`' '`). You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ‘ElementSpacing', 0.4

### `'ElementSpacing'` — ULA element spacing0.5 (default) | real-valued positive scalar

ULA element spacing, specified as a real-valued, positive scalar. Position units are measured in terms of signal wavelength.

Example: 0.4

Data Types: `double`

## Output Arguments

collapse all

### `ang` — Directions of arrival anglesreal-valued 1-by-M row vector

Directions of arrival angle, returned as a real-valued, 1-by-M vector. The dimension M is the number of arriving signals specified in the argument `nsig`. Angle units are degrees and angle values lie between –90° and 90°.

## References

[1] Van Trees, H.L. Optimum Array Processing. New York: Wiley-Interscience, 2002.