Correct use of fmmod and fmdemod ?

8 views (last 30 days)
Russell Geschrey
Russell Geschrey on 19 Sep 2021
Hello,
I am trying to modulate a square pulse in matlab but when I pass it through fmmod and fmdemod I get an unexpected result. Am I using these functions correctly? Is there something wrong I am doing with sampling?
clear
Fs = 100; %sample frequency
Ts= 1/Fs;
symbol_duration= 1; %Time duration of the pulse in seconds
t= 0:Ts:symbol_duration;
degree= 1; %Degree of the Legendre Polynomial "space"
Fc = Fs/2-1; %% This is the carrier frequency of the baseband frequency
p = zeros(1,length(t))+1;
freqdev= max(abs(p)) ; %% Need to research this more
modulated_p = fmmod(p,Fc,Fs,freqdev);
dmod_p = fmdemod(modulated_p,Fc,Fs,freqdev);
plot(t,p,'c',t,dmod_p,'b--');
legend('Original Signal','Demodulated Signal')

Answers (1)

Ashutosh Singh Baghel
Ashutosh Singh Baghel on 19 Oct 2021
Hi Russell,
I believe you want to implement 'fmmod' and 'fmdemod' on a square pulse.
According to the Nyquist-Sampling theorem, the sampling frequency used should be greater than twice the most significant frequency content in the message. In practice, it is best to buffer some frequency gap between the sampling frequency and twice of frequency content rather than using the limiting cases of the Nyquist theorem.
The sampling frequency here is suggested to be more than the sum of contents of frequency deviation and highest frequency together.
Please refer to the following example for a sinusoidal waveform through 'fmmod' and 'fmdemod' on the MATLAB Documentation page.

Community Treasure Hunt

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

Start Hunting!