# MUltiple SIgnal Classification (MUSIC) Implementation

I have a linear 4 element antenna array currently in my design, I am able to obtain the I/Q data from each antenna. Now I am trying to implement the MUSIC algorithm to obtain the AoA (Angle of Arrival). I have read some articles about the algorithm, however, I did not come across any article that explains how theory can be implemented in practice. I have few question hope some one will support me.

1. Are there any tutorials or articles that describes the MUSIC algorithm implementation detail? I prefer in C/C++ language. But any other language is also ok.

2. In the derivation of the MUSIC algorithm, normally it assumes N number of sources. Is this the number of actual sources or does it also counts multipath signals?

3. Are there any articles describing MUSIC algorithm implementation once we have the I/Q data?

Thanks a lot!!

I'm going to group number 1 and 3 as related.

1. For a high level description of MUSIC, you can take a look at MATLAB's overview here. One of the main steps in the algorithm is to find the eigenvectors of a correlation matrix, which can be done via singular value decomposition or other methods. MATLAB has functions for this, so you may want to find equivalent functions in C/C++, or implement your own. The other steps in the algorithm are more implementation agnostic: mostly data collection and simple vector operations.

2. Using an N-element array, MUSIC can resolve at most N - 1 sources. These can be real sources or their images and must be dealt with accordingly.

For some more specific implementation details, I have an answer here where we go through the process of collecting data and performing MUSIC in MATLAB.

• Hi Envidia, Many thanks for the reply. In a real scenario, even though I know the actual number of sources, with the multi path effects there can be multiple signals incoming to each antenna. In this case how should I handle it? Aug 31 '20 at 4:56
• @radar101 There are a few ways. The most simple, but still effective, is to discard returns that have calculated angles from areas outside your zone of interest or from directions that are "impossible", for example a return originating from the ground when you're trying to find an airborne target. In more hostile environments like jamming, this is more difficult and must employ more advanced techniques. Aug 31 '20 at 5:32
• Hi Envidia, Thanks for the reply. My design will be used in indoor for tracking purpose. In this case are there any recommended algorithm do you recommend so that I can read about them? Also for MUSIC, is 4 antennas are sufficient? Aug 31 '20 at 6:24
• @radar101 I don't have any specific algorithms that I could openly give. If you have good SNR, 4 antennas should not be a problem as long as they are designed well. Aug 31 '20 at 16:12
• Thanks for the information Aug 31 '20 at 17:22

There is library called armadillo - for C/C++. Using it, you can implement almost everything as in octave - free analog for matlab. Matlab has special modules (phased) which I suppose could highly simplify work, but I haven't found C analogs for those modules. http://www2.ee.unsw.edu.au/~elias/Theses/Gu2016.pdf - there are multiple algorithms for MUSIC, and you can test all of them, using octave, then implement using armadillo. They work good for DOA. One of problems - you have to find proper distance, and there you have to calculate DOA. There are 2D Music - for range and angle but I had no success with them to this moment.