FM Demodulation creates huge spikes of high frequencies.
조회 수: 1 (최근 30일)
이전 댓글 표시
[x,Fs]=audioread("recording-file.m4a");
T = 1/Fs;
t=0:T:length(x)/Fs-T;
FM = 10.7*10^6;
Fs2 = (10.7*12)*10^6;
fvar = 3.5*10^3;
modulated = fmmod(x,FM,Fs2,fvar);
figure,plot(t,modulated),grid on, xlabel("tiempo"), ylabel("amplitud"), title("S. modulada")
demod = fmdemod(modulated,FM,Fs2,fvar);
figure,plot(t,demod),grid on, xlabel("tiempo"), ylabel("amplitud"), title("S. demodulada")
댓글 수: 0
답변 (1개)
Abhijeet
2023년 4월 4일
편집: Abhijeet
2023년 4월 4일
Hi,
It looks like the issue might be related to aliasing. When you modulate the signal, you are increasing the frequency range of the signal, which means that you need to increase the sampling rate to avoid aliasing. However, in your code, you are not increasing the sampling rate when you perform the demodulation.
To fix this, you can try increasing the sampling rate when you perform the demodulation, by setting Fs2 to a higher value than FM. For example, you can try setting Fs2 to 2 times the maximum frequency in the modulated signal, which can be computed as 2*(FM + fvar).
Here's the modified code:
[x,Fs]=audioread("recording-file.m4a");
T = 1/Fs;
t=0:T:length(x)/Fs-T;
FM = 10.7*10^6;
Fs2 = 2*(FM + fvar); % increase the sampling rate for demodulation
fvar = 3.5*10^3;
modulated = fmmod(x,FM,Fs2,fvar);
figure,plot(t,modulated),grid on, xlabel("tiempo"), ylabel("amplitud"), title("S. modulada")
demod = fmdemod(modulated,FM,Fs2,fvar);
figure,plot(t,demod),grid on, xlabel("tiempo"), ylabel("amplitud"), title("S. demodulada")
I hope this resolves your issue.
Thanks !!
참고 항목
카테고리
Help Center 및 File Exchange에서 Specialized Power Systems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!