Borrar filtros
Borrar filtros

FM Demodulation creates huge spikes of high frequencies.

2 visualizaciones (últimos 30 días)
Jaime
Jaime el 27 de Mzo. de 2023
Comentada: Jaime el 12 de Abr. de 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")

Respuestas (1)

Abhijeet
Abhijeet el 4 de Abr. de 2023
Editada: Abhijeet el 4 de Abr. de 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 comentario
Jaime
Jaime el 12 de Abr. de 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.

Iniciar sesión para comentar.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by