Function File: s = fmmod (m, fc, fs, freqdev)

Creates the FM modulation s of the message signal m with carrier frequency fc.

Inputs:

  • m: sinusoidal message signal
  • fc: carrier frequency
  • fs: sampling frequency
  • freqdev: maximum absolute frequency deviation, assuming m is in [-1:1].

Output:

  • s: The FM modulation of m

Demo

demo fmmod

See also: ammod, fmdemod, amdemod.

Demonstration 1

The following code

 ## Sampling Frequency
 fs = 400;

 ## Carrier Frequency
 fc = 200;

 ## Time Duration
 time = (0: 1 ./ fs:0.2)';

 ## Create two sinusoidal signals with frequencies 30 Hz and 60 Hz
 x = sin (2 .* pi .* 30 .* time) .+ 2 .* sin (2 .* pi .* 60 .* time);  

 ## Frequency Deviation
 fDev = 50;

 ## Frequency modulate x
 y = fmmod (x, fc, fs, fDev);

 ## plotting
 plot (time, x, 'r', time, y, 'b--')
 xlabel ('Time (s)')
 ylabel ('Amplitude')
 legend ('Original Signal','Modulated Signal')

Produces the following figure

Figure 1

Package: communications