- 10th November 2006, 18:13 #1

- Join Date
- Feb 2005
- Posts
- 195
- Helped
- 1 / 1
- Points
- 2,910
- Level
- 12

## music algorithm tutorial

Hi, everyone. I have a simple question about the direction finding by using MUSIC Algorithm.

since the antenna array output is:

X=A*F+N

where A is the steering vectors matrix, F is the excitations (complex number???) and N is the noise.

and the covariance matrix of the output X vector is:

S=E(XX*)=AE(FF*)A*+E(NN*)

For given number of incident wave, for example, D incident wave, the F is a fixed vector, and E(FF*) = FF*, therefore its rank is 1. Is it correct?

If possible, would you give me some hints about the numerical code for the MUSIC algorithm?

I am confused how can I construct the E(FF*). Should I use the time average? if so , what is the sampling frequency I should use? Is it larger than the carrier frequency?

Thanks in advance.

- 10th November 2006, 18:13

- 14th November 2006, 11:07 #2

- Join Date
- Nov 2006
- Posts
- 20
- Helped
- 1 / 1
- Points
- 1,191
- Level
- 7

## music direction finding

Refer Array signal processing by Neilson

To construct E(FF*) do u have the signal without noise i mean(F),go for E(XX*). music and espirit of DOA estimation methods coming under subspace methods.

Try understanding subspace methods and orthogonality concepts.

I will try to help with the matlab code for music

1 members found this post helpful.

- 20th November 2006, 05:28 #3

- Join Date
- Feb 2005
- Posts
- 195
- Helped
- 1 / 1
- Points
- 2,910
- Level
- 12

## music algorithm

Hi, deepabhargavi. Thanks for your reply.

I built the MATLAB code and do the test a few days ago. I found that the MUSIC algorithm can detect multiple non-coherent signals only, which although FF* at each sample is rank 1, but the time average SUM(FF*)/Number of Sampling is rank M=Number of Waveform.

When the input waveforms are coherent, for example, several single-frequency sinusoidal plane-wave, the MUSIC algorithm will not be able to distinguish it, since the rank of E(FF*) is always 1.

I am thinking whether there are other "High-Resolution" Algorithms can be used for Direction Finding of multiple coherent signals?

Thanks.

- 22nd November 2011, 13:48 #4

- Join Date
- Nov 2011
- Posts
- 2
- Helped
- 0 / 0
- Points
- 198
- Level
- 2

## Re: MUSIC Algorithm for Direction Finding

Hello,

I want to implement the MUSIC algorithm in MATLAB.

I have found a function for MUSIC [S,w] = pmusic(x,p).

Can any one tell me how i can find the Direction of Arrival

Bilal

- 13th October 2013, 18:53 #5

- Join Date
- Oct 2013
- Posts
- 121
- Helped
- 36 / 36
- Points
- 822
- Level
- 6
- Blog Entries
- 2

## Re: MUSIC Algorithm for Direction Finding

I would strongly advise against using the built-in Matlab functions, as I think it's far easier to write your own functions so you can be sure about what is going on.

I have written some very simple Matlab code for a basic 1D (azimuth only) MUSIC direction of arrival estimation, as many people seem to have trouble getting started with this:

Code:close all; clear all; clc; % ======= (1) TRANSMITTED SIGNALS ======= % % Signal source directions az = [35;39;127]; % Azimuths el = zeros(size(az)); % Simple example: assume elevations zero M = length(az); % Number of sources % Transmitted signals L = 200; % Number of data snapshots recorded by receiver m = randn(M,L); % Example: normally distributed random signals % ========= (2) RECEIVED SIGNAL ========= % % Wavenumber vectors (in units of wavelength/2) k = pi*[cosd(az).*cosd(el), sind(az).*cosd(el), sind(el)].'; % Array geometry [rx,ry,rz] N = 10; % Number of antennas r = [(-(N-1)/2:(N-1)/2).',zeros(N,2)]; % Assume uniform linear array % Matrix of array response vectors A = exp(-1j*r*k); % Additive noise sigma2 = 0.01; % Noise variance n = sqrt(sigma2)*(randn(N,L) + 1j*randn(N,L))/sqrt(2); % Received signal x = A*m + n; % ========= (3) MUSIC ALGORITHM ========= % % Sample covariance matrix Rxx = x*x'/L; % Eigendecompose [E,D] = eig(Rxx); [lambda,idx] = sort(diag(D)); % Vector of sorted eigenvalues E = E(:,idx); % Sort eigenvalues accordingly En = E(:,1:end-M); % Noise eigenvectors (ASSUMPTION: M IS KNOWN) % MUSIC search directions AzSearch = (0:1:180).'; % Azimuth values to search ElSearch = zeros(size(AzSearch)); % Simple 1D example % Corresponding points on array manifold to search kSearch = pi*[cosd(AzSearch).*cosd(ElSearch), ... sind(AzSearch).*cosd(ElSearch), sind(ElSearch)].'; ASearch = exp(-1j*r*kSearch); % MUSIC spectrum Z = sum(abs(ASearch'*En).^2,2); % Plot figure(); plot(AzSearch,10*log10(Z)); title('Simple 1D MUSIC Example'); xlabel('Azimuth (degrees)'); ylabel('MUSIC spectrum (dB)'); grid on; axis tight;

- 13th October 2013, 18:53

- 15th January 2014, 18:03 #6

- Join Date
- Nov 2013
- Posts
- 14
- Helped
- 0 / 0
- Points
- 115
- Level
- 1

## Re: MUSIC Algorithm for Direction Finding

hi..

will u help me for implementation of music algorithm? plz..

- 16th January 2014, 20:41 #7

- Join Date
- Oct 2013
- Posts
- 121
- Helped
- 36 / 36
- Points
- 822
- Level
- 6
- Blog Entries
- 2

## Re: MUSIC Algorithm for Direction Finding

My previous post provides a basic implementation of the MUSIC algorithm. What do you need to know more specifically?

If you want my help, please write whole words; "u" and "plz" are not words.

- 19th January 2014, 12:08 #8

- Join Date
- Nov 2013
- Posts
- 14
- Helped
- 0 / 0
- Points
- 115
- Level
- 1

## Re: MUSIC Algorithm for Direction Finding

- 24th January 2014, 11:26 #9

- Join Date
- Nov 2013
- Posts
- 14
- Helped
- 0 / 0
- Points
- 115
- Level
- 1

- 22nd March 2014, 23:13 #10

- Join Date
- Nov 2013
- Posts
- 14
- Helped
- 0 / 0
- Points
- 115
- Level
- 1

## Re: MUSIC Algorithm for Direction Finding

hello sir.. i have doubt

in received signal you have defined..k ..

how you select k?

means i am not getting that you have taken cos and sin term randomly ya thers is some reason behind that?

thank you sir.

- 23rd March 2014, 00:14 #11

- Join Date
- Oct 2013
- Posts
- 121
- Helped
- 36 / 36
- Points
- 822
- Level
- 6
- Blog Entries
- 2

## Re: MUSIC Algorithm for Direction Finding

As stated in my Matlab code, k is the

**wavenumber vector**.

You can find an excellent, concise explanation of the wavenumber vector on pages 5 - 6 of this pdf: link.

__Please note__:

(1) I hate being called "sir". This is simply not appropriate. You can call me weetabixharry or idiot or pig... but please not "sir".

(2) Please do not copy your posts to me in private messages. I will only respond here in the forum.