# MUSIC Algorithm in LabView not Working Well

I am working on performing the MUSIC Algorithm in LabView. The hardware testbed includes four phase-locked receiving channels and a coherent single-channel transmitter (first I will verify the MUSIC using SMA cables and 4-way splitter then I will verify it using 4 elements Uniform Linear Array).

When I test the MUSIC, it seems to be not working really well. First, the MUSIC spectrum was at an angle of 0° which is right because there is a 0 phase difference between the four channels. Then, to check the MUSIC further, I added a fake angle to see if the MUSIC spectrum is shifted to that fake angle. At fake angles of 0°, 20°, 90°, and 180°, the MUSIC is working well, however, at some angles (30°, 40°, 50°, 60°), the MUSIC spectrum shows two peaks for example at 60°, it shows peaks at 60° and 120°?

I didn't know what is the reason for that? • For certain antenna arrangements, MUSIC cannot tell the difference between some directions. For example, a linear array cannot tell between "left" and "right" -- the wavefront arrives at the antennas at exactly the same time in both cases.
– MBaz
Mar 13, 2022 at 15:02
• Thank you dear Mbaz for your reply.....Could you please clarify your answer? by the way I haven't tested the MUSIC with antenna yet .....@MBaz Mar 13, 2022 at 16:12
• Could you please give a little more information on the problem? What is the simulated inter-element distance, is the problem formulated as a ULA at this stage, what is the frequency content of the "impinging" signal? Mar 13, 2022 at 19:57
• @ZaellixA. At this stage, I am testing the MUSIC with SMA cables and a 4-way splitter. Basically, I am transmitting 1 signal of a frequency of 2.5GHz and receiving 4-channels with zero phase difference between them. After running the codes, the MUSIC spectrum was at 0° which is right because there is a 0 phase difference between the 4 channels. To check the MUSIC further, I added a fake angle to see if the MUSIC spectrum is shifted to that angle. At angles of 30° or 35° the MUSIC spectrum shows 2 peaks at 30° and 150°. At other angles, the MUSIC is working well and the spectrum shows 1 peak. Mar 14, 2022 at 10:25
• I can't think of a good reason why this happens only at $30^{o}$ and $35^{o}$. I am not an expert and personally cannot reach any explanation without more information. To my understanding, for MuSiC you have to also use the array manifold, which I don't know what you have used for. Maybe there's an issue with the way you calculate it and you get some wrong numbers for those two angles (or some other angles close to those, not sure how many angles you have searched for). Mar 14, 2022 at 10:41

I am not sure this is what the problem is in your algorithm but, from the image you have attached it seems that you get the array manifold (or else steering vector) wrong. For a Uniform Linear Array (ULA), as the one you say you use, the array manifold is of the form

$$\mathbf{a} \left( \omega, \theta \right) = \left[ 1, e^{j k m d \cos \left( \theta \right)}, \ldots, e^{j k \left( m - 1 \right) d \cos \left( \theta \right)} \right]^{T}, ~ ~ ~ ~ ~ ~ m = 1, 2, \ldots N$$

where $$\omega$$ is the radial frequency given by $$\omega = 2 \pi f$$ with $$f$$ being the temporal frequency (2.5 GHz in your case), $$\theta$$ is the angle of incidence, $$k$$ the wavenumber given by $$k = \frac{\omega}{c} = \frac{2 \pi}{\lambda}$$ with $$c$$ the speed of propagation (the speed of light in your case where you could possibly make corrections on that if you know the exact speed of propagation), $$\lambda$$ the wavelength of the frequency of interest, $$m$$ the sensor index (starting from 0) and $$N$$ the total number of sensors.

This formulation of the array manifold is valid when one of the sensor's position is used as reference (so that the exponent of the first element is zero giving the 1 in the first position). An alternative formulation where the centre of the array is used as the reference is

$$\mathbf{a} \left( \omega, \theta \right) = \left[e^{-j k \left( \frac{N - 1}{2} - 0 \right) d \cos \left( \theta \right)}, e^{-j k \left( \frac{N - 1}{2} - 1 \right) d \cos \left( \theta \right)}, \ldots, e^{j k \left( \frac{N - 1}{2} - 1 \right) d \cos \left( \theta \right)}, e^{j k \left( \frac{N - 1}{2} - 0 \right) d \cos \left( \theta \right)} \right]^{T} \\ \mathbf{a} \left( \omega, \theta \right) = \left[e^{j k \left( m - \frac{N - 1}{2} \right) d \cos \left( \theta \right)} \right]^{T}, ~ ~ ~ ~ ~ ~ m = 0, 1, \ldots N - 1$$

In this formulation half the elements are complex conjugate of the rest. This may or may not be convenient, depending on the application.

Now, in your image, you seem to be multiplying with $$m$$ before calculating the cosine term, effectively putting $$m$$ inside the cosine function. So, instead of the first equation presented above you seem to be calculating

$$\mathbf{a} \left( \omega, \theta \right) = \left[ 1, e^{j k d \cos \left( m \theta \right)}, \ldots, e^{j k d \cos \left(\left( N - 1 \right) \theta \right)} \right]^{T}, ~ ~ ~ ~ ~ ~ m = 1, 2, \ldots N$$

I haven't run any simulations to see if this could be indeed the problem and I am not able to deduce that just by looking at the array manifolds, but I am sure that this does provide some wrong results. Based on my intuition and limited previous experience with MuSiC I am almost certain that if you correct this it will provide some improvements. I am not sure whether it will amend the issue completely though.

• Yes ZaellixA you are right.... I corrected the codes of the ULA steering vector in LabView and the MUSIC algorithm is now working well and the Pseudo Spectrum shows only one peak. Thanks a lot and God bless you. 🙂 Mar 15, 2022 at 16:37

Your array is basically sampling the data spatially.
Ambiguity, like 2 peaks, happens when the density of the array isn't enough.

So in most cases what you see is aliasing.

• Dear Eric, At this stage, I am testing the MUSIC with SMA cables and a 4-way splitter I haven't tested using the ULA array. Mar 14, 2022 at 10:30