How can I find the carrier frequency and sidelobe frequencies from the following data that i collected on Matlab

9 次查看(过去 30 天)
I've collected data from a wav file in matlab in the time domain and frequency domain but I'm not sure how to find the carrier frequency or sidelobes frequency from the data or if there is a piece of a code that does this for me ( couldn't find any code like this on google)
The reults ive collected are below:
The last image is frequency domain (amp vs frequency)

回答(1 个)

Star Strider
Star Strider 2021-12-25
The link shows only the plots.
This applies to the second plot (of the one-sided Fourier transform of the signal).
First increase the frequency resolution of the fft call that created that plot by zero-padding it using:
NFFT = 2^(nextpow2(L)+2);
and then include the ‘NFFT’ value in the fft call. The frequency vector will need to reflect that, my usual approach being:
Fv = linspace(0, 1, NFFT/2+1)*Fn; % Frequency Vector For Frequency Domain Plot
Iv = 1:numel(Fv); % Index Vector
where ‘Fn’ is the Nyquist frequency for the signal, and ‘Iv’ indexes the fft results appropraitely.
Second use xlim to isolate the x-axis between 3.5 and 5.5 kHz to see the detail. The findpeaks function (on the same signal as being plotted) can be helpful in determining the indices of the peaks, and from them, the frequencies and amplitudes.
The frequency resolution of the fft is important, so increase ‘NFFT’ in powers-of-2 (for efficiency) untli the plot demonstrates adequate separation of the carrier and sidelobes.
.
  2 个评论
Samuel Pappalardo
Samuel Pappalardo 2021-12-25
How can I impliment this on the code
so far i got
%Task 1
[y,fs] = audioread('Samuel_Pappalardo.wav')
t = (0:size(y,1)-1)/fs;
figure;
plot(t, y);
title ('Time Domain')
xlabel ('Time')
ylabel ('Amplitude')
grid on
pspectrum (y,fs)
% frequency domain
nfft = 1024;
f = linspace(0,fs,nfft);
y = abs(fft(y,nfft));
figure;
plot(f(1:nfft), y(1:nfft));

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by