How to Generate Narrowband and Wideband FM Signal using MATLAB?


FM stands for Frequency Modulation, a technique used in communication systems for long distance transmission of data and information. The frequency modulation involves the alteration in the frequency of the signal so that it can be transmitted over long distances without any distortion of the information. In this tutorial, I am going to explain how to generate narrowband and wideband FM signal using MATLAB.

Before going to learn about generating narrowband and wideband FM signals, let us first get an overview of FM signal and its types.

What is an FM Signal?

An FM signal is a modulated signal which is obtained by changing the instantaneous frequency by keeping the amplitude and phase of the signal constant. It is one of the most widely used analog modulation technique in telecommunication and radio broadcasting.

  • In frequency modulation, a high-frequency signal called carrier signal is used to carry the original message signal over long distances.

  • When the original message signal is imposed upon the high-frequency carrier signal, the resulting signal is called the "frequency modulating signal".

  • There is a parameter called modulation index (denoted by the symbol "β") that is used to determine the amount of modulation. It plays a vital role in controlling the bandwidth and characteristics of the frequency modulated signal.

Types of FM Signals

Depending on the value of modulation index, the FM signals can be classified into the following two types −

  • Narrowband FM Signal

  • Wideband FM Signal

Let us discuss these two types of FM signals in detail.

What is a Narrowband FM Signal?

A narrowband FM signal, also called NBFM signal, is a type of FM signal whose modulation index is less than 1, i.e., β < 1.

Narrowband FM signals have a smaller frequency deviation from the frequency carrier signal. Also, this signal has a relatively narrow bandwidth that depends on the frequency of the modulating signal.

The narrowband FM signals are mainly used in limited bandwidth communication systems and audio signal broadcasting.

What is a Wideband FM Signal?

A wideband FM signal is a FM signal whose modulation index is greater than 1, i.e., β > 1. It is also known as WBFM signal. Therefore, a wideband FM signal has a larger frequency deviation from the frequency of the carrier signal. It also has a wider bandwidth.

Wideband FM signal are mainly used in FM radio broadcasting, radar systems, and some special types of communication systems.

Let us now learn how we can generate a narrowband and wideband signal using MATLAB.

Generate Narrowband FM Signal Using MATLAB

In MATLAB, there is a built-in function "fmmod" that can be used to generate a narrowband FM signal.

The steps involved in generating a narrowband FM signal using MATLAB are as follows −

  • Step (1) − Define the time sampling for frequency modulation.

  • Step (2) − Specify the frequencies of message signal and carrier signal.

  • Step (3) − Generate the message signal and carrier signal.

  • Step (4) − Specify the modulation index. For narrowband signal, it should be less than 1.

  • Step (5) − Use the "fmmod" function to generate the narrowband FM signal.

  • Step (6) − Display the generated narrowband FM signal.

Example

Let us take an example to practically understand how to generate a narrowband FM signal in MATLAB.

% MATLAB program to generate narrowband FM signal
% Define the time sampling for frequency modulation
fs = 2000;  % Sampling frequency (2 kHz)
t = 0:1/fs:5;  % Time from 0 to 5 second with a sampling rate of 2 kHz

% Specify the frequencies of message and carrier signals
fm = 50;	% Frequency of message signal (50 Hz)
fc = 300;	% Frequency of carrier signal (300 Hz)

% Generate the message signal and carrier signal
m = sin(2*pi*fm*t);
c = cos(2*pi*fc*t);

% Provide the modulation index (beta)
beta = input('Enter the modulation index (for narrowband signal, beta < 1): ');

% Generate the narrowband FM signal
nbfm = fmmod(m, fc, fs, beta);

% Display the message, carrier, and narrowband signals
figure;

subplot(3,1,1);
plot(t, m, 'r', 'Linewidth', 2);
title('Message Signal');
xlabel('Time');
ylabel('Amplitude');
grid on;

subplot(3,1,2);
plot(t, c, 'b', 'Linewidth', 2);
title('Carrier Signal');
xlabel('Time');
ylabel('Amplitude');
grid on;

subplot(3,1,3);
plot(t, nbfm, 'g', 'Linewidth', 2);
title('Narrowband FM Signal');
xlabel('Time')
ylabel('Amplitude')
grid on;

Run this MATLAB code in a MATLAB compiler to get the output. Ensure that your MATLAB compiler has Communication Toolbox installed.

Generate Wideband FM Signal Using MATLAB

We can also use the "fmmod" function to generate a wideband FM signal.

The steps involved in generating the wideband FM signal using MATLAB are as follows −

  • Step (1) − Define the time sampling for frequency modulation.

  • Step (2) − Specify the frequencies of message signal and carrier signal.

  • Step (3) − Generate the message signal and carrier signal.

  • Step (4) − Specify the modulation index. For wideband signal, it should be greater than 1.

  • Step (5) − Use the "fmmod" function to generate the wideband FM signal.

  • Step (6) − Display the generated wideband FM signal.

Example

Let us see an example to understand how to generate a wideband FM signal using MATLAB.

% MATLAB program to generate wideband FM signal
% Define the time sampling for frequency modulation
fs = 2000;	% Sampling frequency (2 kHz)
t = 0:1/fs:5;	% Time from 0 to 5 second with a sampling rate of 2 kHz

% Specify frequencies of message and carrier signals
fm = 500;	% Frequency of message signal frequency (500 Hz)
fc = 150;	% Frequency of carrier signal (150 Hz)

% Generate message and carrier signals
m = sin(2*pi*fm*t);
c = cos(2*pi*fc*t);

% Provide the modulation index 
beta = input('Enter the modulation index (beta > 1 for wideband signal): ');

% Generate wideband FM signal
wbfm = fmmod(m, fc, fs, beta);

% Display the message, carrier, and wideband signals
figure;
subplot(3,1,1);
plot(t, m, 'r', 'Linewidth', 2);
title('Message Signal');
xlabel('Time')
ylabel('Amplitude')
grid on;

subplot(3,1,2);
plot(t, c, 'b', 'Linewidth', 2);
title('Carrier Signal');
xlabel('Time')
ylabel('Amplitude')
grid on;

subplot(3,1,3);
plot(t, wbfm, 'g', 'Linewidth', 2);
title('Wideband FM Signal');
xlabel('Time')
ylabel('Amplitude')
grid on;

Run this code in a MATLAB compiler with Communication Toolbox installed to get the output.

Conclusion

This is all about generating narrowband and wideband FM signals using MATLAB. In MATLAB, we have to control the modulation index "beta" while performing frequency modulation. If the beta > 1, the resulting frequency modulating signal will be a wideband FM signal, and if the beta < 1, the frequency modulating signal will be a narrowband FM signal. In this tutorial, I explained the process of generating narrowband and wideband FM signals using MATLAB with the help of example.

Updated on: 05-Oct-2023

132 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements