Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# rootmusic

Root MUSIC algorithm

## Syntax

```W = rootmusic(X,P) [W,POW] = rootmusic(X,P) [F, POW] = rootmusic(...,Fs) [W,POW] = rootmusic(...,'corr') ```

## Description

`W = rootmusic(X,P)` returns the frequencies in radians/sample for the `P` complex exponentials (sinusoids) that make up the signal `X`.

The input `X` is specified either as:

• A row or column vector representing one realization of signal

• A rectangular array for which each row of `X` represents a separate observation of the signal (for example, each row is one output of an array of sensors, as in array processing), such that `X'*X` is an estimate of the correlation matrix

```[W,POW] = rootmusic(X,P)``` returns the estimated absolute value squared amplitudes of the sinusoids at the frequencies `W`.

The second input argument, `P` is the number of complex sinusoids in `X`. You can specify `P` as either:

• A positive integer. In this case, the signal subspace dimension is `P`.

• A two-element vector. In this case, `P(2)`, the second element of `P`, represents a threshold that is multiplied by λmin, the smallest estimated eigenvalue of the signal's correlation matrix. Eigenvalues below the threshold λmin`*P(2)` are assigned to the noise subspace. In this case, `P(1)` specifies the maximum dimension of the signal subspace.

The extra threshold parameter in the second entry in `P` provides you more flexibility and control in assigning the noise and signal subspaces.

The length of the vector `W` is the computed dimension of the signal subspace. For real-valued input data `X`, the length of the corresponding power vector `POW` is given by

```length(POW) = 0.5*length(W) ```

For complex-valued input data `X`, `POW` and `W` have the same length.

```[F, POW] = rootmusic(...,Fs)``` returns the vector of frequencies `F` calculated in Hz. You supply the sampling frequency `Fs` in Hz. If you specify `Fs` with the empty vector `[]`, the sampling frequency defaults to 1 Hz.

```[W,POW] = rootmusic(...,'corr')``` forces the input argument `X` to be interpreted as a correlation matrix rather than a matrix of signal data. For this syntax, you must supply a square matrix for `X`, and all of its eigenvalues must be nonnegative. You can place the `'corr'` option anywhere after the `P` input argument.

### Note

You can use the output of `corrmtx` to generate such an array `X`.

## Examples

collapse all

Estimate the amplitudes for two sinusoids in noise. The separation between the sinusoids is less than the resolution of the periodogram, $2\pi /N$ radians/sample. Use the autocorrelation matrix as the input to `rootmusic`.

```rng default n = (0:99)'; frqs = [pi/4 pi/4+0.06]; s = 2*exp(1j*frqs(1)*n)+1.5*exp(1j*frqs(2)*n)+ ... 0.5*randn(100,1)+1j*0.5*randn(100,1); [~,R] = corrmtx(s,12,'mod'); [W,P] = rootmusic(R,2,'corr')```
```W = 2×1 0.7946 0.8917 ```
```P = 2×1 4.1535 0.7797 ```

## Diagnostics

If the input signal, `x` is real and an odd number of sinusoids, `p` is specified, the following error message is displayed:

```Real signals require an even number p of complex sinusoids. ```

## Algorithms

The MUSIC algorithm used by `rootmusic` is the same as that used by `pmusic`. The algorithm performs eigenspace analysis of the signal's correlation matrix in order to estimate the signal's frequency content.

The difference between `pmusic` and `rootmusic` is:

• `pmusic` returns the pseudospectrum at all frequency samples.

• `rootmusic` returns the estimated discrete frequency spectrum, along with the corresponding signal power estimates.

`rootmusic` is most useful for frequency estimation of signals made up of a sum of sinusoids embedded in additive white Gaussian noise.