I created a signal with two sinusoids and added increasing amounts of random noise to it. The results of running the FFT and MUSIC on this signal are shown in the image below.
Ignoring the fact that the scaling is wrong on the x-axes of the FFT plots, in what way are the results for the MUSIC algorithm better than the FFT? For me the MUSIC results look worse as the graphs seem overly smooth and thus fail to resolve the two spectral peaks when the noise is increased, whereas they are clearly visible in the FFT plots. And this is despite the fact that we have to tell the MUSIC algorithm that we expect two spectral peaks (the
pmusic(x_1,4)), whereas the FFT doesn't need this information.
I thought the whole point of the MUSIC algorithm is that it is supposed to give more accurate results than the FFT. So what am I missing here, am I not interpreting the plots correctly? Is there a problem with the code? Ultimately, what does the MUSIC algorithm give us that the FFT doesn't?
Here is the code I used to generate the image.
clc clear all close all N = 400; n = 0:N; x = cos(0.22*pi*n) + sin(0.2*pi*n); x_1 = x + 0.02*randn(size(n)); x_2 = x + 0.05*randn(size(n)); x_3 = x + 0.1*randn(size(n)); fft_x_1 = abs(fft(x_1)); fft_x_1 = fft_x_1(1:N/2); fft_x_2 = abs(fft(x_2)); fft_x_2 = fft_x_2(1:N/2); fft_x_3 = abs(fft(x_3)); fft_x_3 = fft_x_3(1:N/2); music_x_1 = pmusic(x_1,4); music_x_2 = pmusic(x_2,4); music_x_3 = pmusic(x_3,4); figure subplot(3,2,1); plot(fft_x_1) title('FFT') subplot(3,2,2) pmusic(x_1,4) subplot(3,2,3) plot(fft_x_2) title('FFT') subplot(3,2,4) pmusic(x_2,4) subplot(3,2,5) plot(fft_x_3) title('FFT') subplot(3,2,6) pmusic(x_3,4)