4
$\begingroup$

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 4 in 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)

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ The FFT plot is linear ? The MUSIC plot is in dB. This will amplify smaller components. $\endgroup$
    – Harris
    Commented Sep 7, 2023 at 20:17

1 Answer 1

4
$\begingroup$

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.

You are using pmusic(). MUSIC (MUltiple SIgnal Classification) is a general algorithm that can estimate all kinds of parameters out of a signal. pmusic() is a MATLAB function that utilizes this algorithm to evaluate peaks' location in the spectrum of the signal. More to the point, it does not mind a better representation of the level in other frequencies (not the location of the peaks).

I thought the whole point of the MUSIC algorithm is that it is supposed to give more accurate results than the FFT.

Not at all! FFT is an analytical method to represent a given signal in the frequency domain. There can be a vast discussion on the accuracy of the method given the parameters it is executed with but it is a mathematical operation with a close solution. MUSIC algorithm, however, is an optimization method. As an optimization method, it is iteratively estimating the optimal solution to a problem. It can actually generate two different solutions given the same problem and two different initialization. Optimization methods are usually used when a close solution cannot be formulated. Each of these two can be better depending on the specifics of the problem. For example, how close are the frequencies? How fast to you want your solution? What is your tolerance for accuracy?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.