FM Demodulation creates huge spikes of high frequencies.

1 Ansicht (letzte 30 Tage)
Jaime
Jaime am 27 Mär. 2023
Kommentiert: Jaime am 12 Apr. 2023
[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")

Antworten (1)

Abhijeet
Abhijeet am 4 Apr. 2023
Bearbeitet: Abhijeet am 4 Apr. 2023
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 !!
  1 Kommentar
Jaime
Jaime am 12 Apr. 2023
Hi, in your code the demodulation is using the same Fs2 as for modulation. But I tried increasing it and it it not help.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Specialized Power Systems finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by