Frequency modulation - MATLAB fmmod (2024)

Frequency modulation

collapse all in page

Syntax

y = fmmod(x,Fc,Fs,freqdev)

y = fmmod(x,Fc,Fs,freqdev,ini_phase)

Description

example

y = fmmod(x,Fc,Fs,freqdev) returns a frequency modulated (FM) signal y, given the input message signal x, where the carrier signal has frequency Fc and sampling rate Fs. freqdev is the frequency deviation of the modulated signal.

Note

  • The value of Fs must satisfy Fs ≥ 2Fc.

  • The value of freqdev must satisfy freqdev < Fc.

y = fmmod(x,Fc,Fs,freqdev,ini_phase) specifies the initial phase of the modulated signal.

Examples

collapse all

FM Modulate a Sinusoidal Signal

Set the sampling frequency to 1kHz and carrier frequency to 200 Hz. Generate a time vector having a duration of 0.2 s.

fs = 1000; fc = 200; t = (0:1/fs:0.2)';

Create two tone sinusoidal signal with frequencies 30 and 60 Hz.

x = sin(2*pi*30*t)+2*sin(2*pi*60*t);

Set the frequency deviation to 50 Hz.

fDev = 50;

Frequency modulate x.

y = fmmod(x,fc,fs,fDev);

Plot the original and modulated signals.

plot(t,x,'c',t,y,'b--')xlabel('Time (s)')ylabel('Amplitude')legend('Original Signal','Modulated Signal')

Frequency modulation - MATLAB fmmod (1)

Input Arguments

collapse all

xInput message signal
scalar | vector | matrix | 3-D array

Input message signal, specified as a scalar, vector, matrix, or a 3-D array. Each element of x must be real.

Data Types: single | double

FcCarrier frequency
positive real scalar

Carrier frequency in hertz (Hz), specified as a positive real scalar.

Data Types: single | double

FsSampling rate
positive real scalar

Sampling rate in hertz (Hz), specified as a positive real scalar.

Data Types: single | double

freqdevFrequency deviation
positive real scalar

Frequency deviation of the modulated signal in hertz (Hz), specified as a positive real scalar.

Data Types: single | double

ini_phaseInitial phase
real scalar

Initial phase of the modulated signal in radians, specified as a real scalar.

Data Types: single | double

Output Arguments

collapse all

y — Frequency modulated output signal
scalar | vector | matrix | 3-D array

Frequency modulated signal, returned as a scalar, vector, matrix, or 3-D array.

Version History

Introduced before R2006a

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Frequency modulation - MATLAB fmmod (2)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

Europe

Asia Pacific

Contact your local office

Frequency modulation - MATLAB fmmod (2024)
Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5505

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.