Why will be obtained FWHM in the frequency domain twice the value expected?

조회 수: 2 (최근 30일)
zahra
zahra 2022년 8월 10일
댓글: dpb 2022년 8월 10일
Hi everyone .I wrote a code in MATLAB. In section 2, the FWHM value is almost twice the value I expected. Where is the problem? run order: 1.section 1 2.simulink 3.section 2
  댓글 수: 5
zahra
zahra 2022년 8월 10일
Thank you so much for your explanation
According to you, the frequency axis is between -63.87 and +63.87 MHz and it is correct, so I don't think the problem is due to the Nyquist frequency.
dpb
dpb 2022년 8월 10일
No -- that's the one I computed -- the one I got from your code as written is double that -- what do your plots of your original code show on the frequency axis?
If I take your code instead of mine above, I get
>> L=1000; % arbitary length; immaterial yours is n2
>> fs2 = 12774e4; % your sample rate
>> n2=L; % set your n2 to something
>> f2 = (0:n2-1)*(fs2/n2); % the way you computed the f vector
>> f2(end) % and your thus-computed Fmax
ans =
127612260
>>
You see that's returning the Fmax value as being (essentially) the same as the sampling frequency, or about double the Nyquist. That's what's doubling your results from what you think should be.
You see the difference in the two? There's an "L/2" in the (0:L/2) portion in mine but your's goes from (0:n2) so the maximum will be twice what mine produces. But, you've still got a 2-sided spectrum at
Signal_fft =fft(Signal_I + 1i*Signal_Q);
plot(f2,real(Signal_fft));
but you've plotted it against a baseband (0:Fs) frequency vector instead of one from (-Fmax:+Fmax). That's why you didn't have a length mismatch with the positive frequency of the FFT being only half as many points as the total -- you plotted both negative and positive frequencies.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Analog Filters에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by