Modulation

Radio Frequency
Modulation
Signal Processing
Explanation of signal modulation, different types of modulation, and characteristics of electromagnetic waves and applications.
Author

Mohammed Gayazuddin

Published

November 18, 2025

Modulation is the process of encoding information (i.e., the baseband signal) onto a carrier signal. This is achieved by altering the characteristics of an electromagnetic wave.

An electromagnetic wave has three primary characteristics:

import numpy as np
import matplotlib.pyplot as plt


Fs = 1000   # Sampling frequency
T = 1/Fs    # Sample Time

A = 2       # Amplitude of 2
f = 5       # 5 HZ frequency
phi = np.pi/4       # phase of pi/4 rad 
t = np.arange(0, 1, T)  # sample for 1 sec

wave = A * np.sin(2*np.pi*f*t +  phi)

plt.figure(figsize=(10, 4))
plt.plot(t, wave)
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.title("Sine Wave")
plt.grid()
plt.show()

Above is a simple sine wave that demonstrates all three fundamental characteristics of a signal.
This wave has:

By manipulating one or more of these characteristics, we can modulate a signal.

How does modulation works? by defination it says encoding data onto a carrie wave, but how does it work? let say our baseband signal is a sin wave \(\sin(\phi)\) and let our carrier signal be another sin wave \(\cos(\Theta)\)

Important Note on Modulation! ⚠️

Modulation is fundamentally a multiplication operation in the time domain, not simple addition. \[ x(t) = m(t)\cdot\cos\left(2\pi f t + \phi\right) \]

What’s the diffrence? 🤔

Adding two signals merely combines their instantaneous values and results in both signals coexisting independently, similar to playing two audio tracks at the same time. No information is transferred or encoded.

In contrast, modulation involves multiplying a baseband signal with a high-frequency carrier, causing the carrier to vary according to the baseband. This process shifts the baseband spectrum to higher frequencies, enabling efficient transmission.

While modulation is multiplication in the time domain, it appears as superposition of frequency-shifted components in the frequency domain, which explains the emergence of sidebands in AM/FM systems.

What is the need for modulation? 🤔

The baseband signal, which contains the actual information (data), is typically a low-frequency signal. Low-frequency signals are impractical to transmit directly over long distances.

As we know, the length of an antenna for a given wave should be approximately one-fourth of the wavelength. Low-frequency signals have very large wavelengths—sometimes in kilometers—making the required antenna size impractical.

Another important purpose of modulation is to transmit multiple channels of information over a single communication medium. This is achieved using Frequency Division Multiplexing (FDM). FDM allows multiple signals to be transmitted simultaneously, each using a different carrier frequency. Since the channels operate at different frequencies, they do not interfere with one another. At the receiver, the signal is demodulated to extract the original information.

Different types of modulation

There are two main categories of modulation:

  1. Analog modulation
  2. Digital modulation

flowchart LR 
    A(Modulation Types) --> B(Analog Modulation)
    A --> C(Digital Modulation)

    B --> D(Amplitude Modulation)
    B --> E(Frequency Modulation)
    B --> F(Phase Modulation)

    C --> G(Amplitude Shift Keying)
    C --> H(Frequency Shift Keying)
    C --> I(Phase Shift Keying)
    C --> J(Quadrature Amplitude Modulation)
    C --> K(Quadrature Phase Shift Keying)
    C --> L(Orthogonal Frequency Division Multiplexing)

Analog Modulation

In analog modulation, an analog baseband signal is encoded onto a carrier signal.
Common techniques used in analog modulation include:

1. Amplitude Modulation (AM): The amplitude of the carrier wave is varied in proportion to the instantaneous amplitude of the baseband (modulating) signal.

Mathematical representation:
\[ x(t) = A_c \left[ 1 + k\, m(t) \right] \cos\!\left( 2\pi f_c t + \phi \right) \]

Generating the Baseband Signal

Let the baseband signal be:
\[ m(t) = A_m \cos\left(2 \pi f_m t + \phi_1\right) \]

bFreq = 5
bAmp  = 0.7
bPhi  = np.pi / 5

baseBand = bAmp * np.cos(2 * np.pi * bFreq * t + bPhi)

plt.figure(figsize=(10, 4))
plt.plot(t, baseBand)
plt.title("Baseband Signal")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.grid()
plt.show()

Generating Carrier Signal

Let the Carrier signal be: \[ $c(t) = A_c \cos\left(2 \pi f_c t + \phi_2\right)$ \]

cFreq = 20
cAmp  = 1.2
cPhi  = np.pi / 2

carrier = np.cos(2 * np.pi * cFreq * t + cPhi)

plt.figure(figsize=(10, 4))
plt.plot(t, carrier)
plt.title("Carrier Signal")
plt.xlabel("Time")
plt.ylabel("Amplitude")
plt.grid()

plt.show()

Modulating the Signal

Let Modulated Signal be: \[ x(t) = [1 + k m(t)] c(t) \]

# Modulation index (0 < mu <= 1)
mu = 0.7

modulated_signal = cAmp * (1 + mu * baseBand / bAmp) * np.cos(
    2 * np.pi * cFreq * t + cPhi
)
plt.figure(figsize=(10,4))
plt.plot(t, modulated_signal)
plt.title("Modulated Signal")
plt.xlabel("Time")
plt.ylabel("Amplitude")
# plt.xlim(0, 0.3)
plt.grid()
plt.show()

2. Frequency Modulation (FM): The frequency of the carrier wave is varied according to the amplitude of the modulating signal—either increasing or decreasing based on the input.

3. Phase Modulation (PM): The phase of the carrier wave is varied in accordance with the instantaneous amplitude of the modulating signal. Phase modulation is closely related to frequency modulation, but it modifies the phase directly rather than the frequency.


Digital Modulation

In digital modulation, an digital baseband signal is encoded onto a carrier signal. common techniques used in digital modulation include:

1. Amplitude Shift keying:

2. Frequency Shift keying:

3. Phase Shift keying:

4. Quadrature Phase Shift keying:

5. Quadrature Amplitude Modulation:

6. Orthogonal Frequency Division Multiplexing