0% found this document useful (0 votes)
4 views22 pages

Modulation Classification Report

This report details a mini project on Automatic Modulation Classification (AMC) using Support Vector Machines and Random Forests to identify modulation schemes of communication signals. It covers theoretical foundations, feature extraction techniques, and the implementation of machine learning classifiers without deep learning. The project emphasizes the importance of AMC in various applications such as cognitive radio systems and signal intelligence.

Uploaded by

Venkata Sai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views22 pages

Modulation Classification Report

This report details a mini project on Automatic Modulation Classification (AMC) using Support Vector Machines and Random Forests to identify modulation schemes of communication signals. It covers theoretical foundations, feature extraction techniques, and the implementation of machine learning classifiers without deep learning. The project emphasizes the importance of AMC in various applications such as cognitive radio systems and signal intelligence.

Uploaded by

Venkata Sai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AUTOMATIC MODULATION CLASSIFICATION

Using Support Vector Machine & Random Forest

Mini Project Report


Minor in Artificial Intelligence

Submitted by
Thota Venkata Sai
Roll No: U24EC086
[Link] - Electronics and Communication Engineering
Sardar Vallabhbhai National Institute of Technology, Surat

Academic Year 2025-2026


Abstract
Automatic Modulation Classification (AMC) is the process of automatically identifying the modulation
scheme of a received communication signal without prior knowledge of the transmitter settings. This
capability is fundamental in cognitive radio systems, spectrum monitoring, electronic warfare, and
signal intelligence applications. This report presents a comprehensive study and implementation of
AMC using classical machine learning techniques — specifically Support Vector Machines (SVM)
and Random Forests — operating on statistically extracted features from received signal samples.
The project covers the theoretical foundation of analog and digital modulation schemes, the
generation of synthetic IQ (In-phase and Quadrature) signal samples, extraction of discriminative
features including higher-order cumulants, instantaneous amplitude/frequency/phase statistics, and
Power Spectral Density (PSD) shape descriptors. The extracted features are used to train and
evaluate SVM and Random Forest classifiers across varying Signal-to-Noise Ratio (SNR) conditions.
The system is designed without the use of any deep learning, operating entirely within classical signal
processing and machine learning paradigms.

Table of Contents
1. Introduction to Modulation
2. Types of Modulation — Complete Taxonomy
3. Digital Modulation in Detail
4. Signal Representation — IQ Samples and Complex Baseband
5. Problem Formulation — Automatic Modulation Classification
6. Feature Extraction Techniques
7. Machine Learning Classifiers
8. System Architecture and Pipeline
9. Dataset Generation
10. Performance Evaluation
11. Clarification: Modulations in DSP vs Communication Subjects
12. References
1. Introduction to Modulation
1.1 What is Modulation?
Modulation is the process of varying one or more properties of a high-frequency periodic waveform
— called the carrier signal — with a lower-frequency information-bearing signal called the message
or baseband signal. The carrier is typically a sinusoidal wave of the form:
c(t) = A_c * cos(2*pi*f_c*t + phi_c)
where A_c is the carrier amplitude, f_c is the carrier frequency, and phi_c is the carrier phase. The
three parameters that can be varied — amplitude, frequency, or phase — correspond to the three
fundamental classes of modulation.

1.2 Why is Modulation Necessary?


Without modulation, direct transmission of baseband signals (voice, data) over wireless channels
would be impractical for several critical reasons:
• Antenna size: Efficient radiation requires antenna length on the order of the wavelength
(lambda = c/f). At audio frequencies (3 kHz), the antenna would need to be 100 km long.
Modulating onto a carrier at, say, 900 MHz reduces this to about 8 cm.
• Frequency division multiplexing: Multiple users can transmit simultaneously on different
carrier frequencies — radio stations are a direct example.
• Channel matching: The channel (air, cable, fiber) has specific frequency ranges where it
operates with low loss. Modulation shifts the signal into that range.
• Noise immunity: Digital modulations are designed to be robust against channel noise and
interference.

2. Types of Modulation — Complete Taxonomy


2.1 Analog Modulation (Continuous Wave)
In analog modulation, the carrier parameters vary continuously in proportion to the analog message
signal m(t). These are the schemes you are already familiar with.

2.1.1 Amplitude Modulation (AM)


The amplitude of the carrier is varied in proportion to the message signal while frequency and phase
remain constant.
s_AM(t) = A_c * [1 + k_a * m(t)] * cos(2*pi*f_c*t)
Here k_a is the amplitude sensitivity. The term in brackets modulates the amplitude. The spectrum
of an AM signal contains the carrier frequency plus sidebands centered around it. AM is simple to
demodulate (envelope detector) but is not power-efficient — a large fraction of transmitted power
goes into the carrier, which carries no information.
• Variants: DSB-SC (Double Sideband Suppressed Carrier) — removes the carrier, more
power efficient. SSB (Single Sideband) — transmits only one sideband, halves bandwidth.
2.1.2 Frequency Modulation (FM)
The instantaneous frequency of the carrier is varied in proportion to the message signal. The
amplitude stays constant.
s_FM(t) = A_c * cos(2*pi*f_c*t + 2*pi*k_f * integral(m(tau)dtau))
k_f is the frequency deviation constant. FM is non-linear — its spectrum is more complex. FM is used
in broadcast radio (88–108 MHz) because of its excellent noise immunity (wideband FM). The
Carson's bandwidth rule gives the approximate bandwidth as BW = 2*(delta_f + f_m) where delta_f
is maximum frequency deviation and f_m is maximum message frequency.

2.1.3 Phase Modulation (PM)


The instantaneous phase of the carrier is varied in proportion to the message signal.
s_PM(t) = A_c * cos(2*pi*f_c*t + k_p * m(t))
PM and FM are closely related — FM is essentially PM of the integrated message. PM is less common
in analog systems but is the conceptual precursor to digital phase modulation (PSK).

2.2 Pulse Modulation


In pulse modulation, the message signal is sampled periodically and the resulting samples modulate
properties of a pulse train rather than a sinusoidal carrier. These exist in both analog and digital
variants.

2.2.1 Pulse Amplitude Modulation (PAM)


The amplitude of regularly spaced pulses is varied in accordance with the sampled values of the
message signal. PAM is the simplest form of pulse modulation and forms the theoretical basis for
PCM (Pulse Code Modulation). In PAM, the pulse train is:
s_PAM(t) = sum_n [ m(nTs) * p(t - nTs) ]
where p(t) is the pulse shape and Ts is the sampling period. PAM is used in Ethernet (PAM-4 is used
in 100G Ethernet — a 4-level PAM scheme).

2.2.2 Pulse Position Modulation (PPM)


The position (timing) of a fixed-amplitude pulse within a time slot is varied in accordance with the
message sample amplitude. PPM is used in optical communications and some radar systems
because it is power-efficient — the pulse amplitude does not vary, only its timing.

2.2.3 Pulse Width Modulation (PWM)


The width (duration) of pulses is varied while amplitude and position are fixed. PWM is widely used
in motor control, DC-DC converters, and audio amplifiers. It is the same PWM you use in your
microcontroller-based projects.
2.2.4 Pulse Code Modulation (PCM)
PCM is the bridge between analog and digital. The sampled analog values are quantized to discrete
levels and encoded as binary codes. PCM is the foundation of all digital audio (CDs, phone calls,
streaming). The three steps are: Sampling (Nyquist), Quantization (introduces quantization noise),
and Encoding (binary representation).

2.3 Digital Modulation Overview


In digital modulation, the message is a discrete (digital) bit stream, and it modulates the carrier
amplitude, frequency, phase, or a combination. This is the domain where AMC (our project) operates.
We cover digital modulation in complete detail in Chapter 3.

Modulation Property Varied Type Typical Use


AM Amplitude Analog AM broadcast radio
FM Frequency Analog FM broadcast, audio
PM Phase Analog Precursor to PSK
PAM Pulse amplitude Pulse (Analog) Ethernet (PAM-4)
PPM Pulse position Pulse (Analog) Optical, radar
PWM Pulse width Pulse (Analog) Motor control, ADC
PCM Amplitude -> code Pulse (Digital) Digital audio, telephony
ASK Carrier amplitude Digital Optical fiber, RFID
FSK Carrier frequency Digital Bluetooth, caller ID
PSK Carrier phase Digital Wi-Fi, satellite, GPS
QAM Amplitude + Phase Digital Cable TV, LTE, Wi-Fi
OFDM Multi-subcarrier Digital 4G/5G, Wi-Fi, DVB
3. Digital Modulation in Detail
Digital modulation maps a sequence of bits (or groups of bits) to specific signal waveforms. Each
distinct waveform is called a symbol. If each symbol carries k bits, the symbol alphabet size is M =
2^k. These are called M-ary modulation schemes.

3.1 Amplitude Shift Keying (ASK)


The carrier amplitude takes one of M discrete values depending on the input symbol. For Binary ASK
(BASK or OOK — On-Off Keying), the amplitude is either A or 0:
s_ASK(t) = A_m * cos(2*pi*f_c*t), m = 0, 1, ..., M-1
ASK is simple but highly susceptible to amplitude noise and fading. It is used in optical fiber systems
(light on/off = 1/0) and RFID tags. For our project, we classify ASK signals by detecting their amplitude
envelope characteristics.

3.2 Frequency Shift Keying (FSK)


The carrier frequency takes one of M discrete values. For Binary FSK (BFSK):
s_FSK(t) = A * cos(2*pi*f_m*t), f_m = f_c + (2m - 1 - M)*delta_f
FSK has constant amplitude, making it immune to amplitude fading. Minimum Shift Keying (MSK) is
a special form of FSK where the frequency separation is minimum (delta_f = 1/2T) which produces
continuous phase — used in GSM cellular. Gaussian MSK (GMSK) further filters the signal for
spectral efficiency.

3.3 Phase Shift Keying (PSK)


The carrier phase takes one of M equally spaced values on a circle of constant radius. This is the
most important class for our project.

3.3.1 BPSK — Binary Phase Shift Keying


Two phases: 0 degrees and 180 degrees (pi). One bit per symbol.
s_BPSK(t) = A * cos(2*pi*f_c*t + phi), phi in {0, pi}
Constellation: two points at (+1, 0) and (-1, 0) on the IQ plane. Most noise-robust PSK — maximum
distance between symbols. Used in GPS, satellite communications, deep-space probes. Bit Error
Rate: BER = Q(sqrt(2*Eb/N0)).

3.3.2 QPSK — Quadrature Phase Shift Keying


Four phases: 45, 135, 225, 315 degrees. Two bits per symbol. Also called 4-PSK.
phi in {pi/4, 3pi/4, 5pi/4, 7pi/4}
Constellation: four points at corners of a square on the unit circle. QPSK achieves twice the spectral
efficiency of BPSK with the same BER performance (since Euclidean distance is maintained). Used
in satellite TV, CDMA, LTE uplink. Differential QPSK (DQPSK) is used in Bluetooth.

3.3.3 8-PSK
Eight phases, three bits per symbol. Constellation: 8 points equally spaced on unit circle. Higher
spectral efficiency but reduced noise margin compared to QPSK. Used in DVB-S2 satellite standard.

3.3.4 16-PSK and Beyond


16-PSK: 4 bits per symbol. However, beyond 8-PSK, the points on the constellation get very close
together, reducing noise margin severely. This is why QAM is preferred over higher-order PSK.

3.4 Quadrature Amplitude Modulation (QAM)


QAM combines amplitude and phase modulation. Two carriers in quadrature (90 degrees apart) are
independently amplitude-modulated:
s_QAM(t) = A_I * cos(2*pi*f_c*t) - A_Q * sin(2*pi*f_c*t)
The in-phase (I) and quadrature (Q) components carry independent information. The constellation is
a rectangular grid of points rather than a circle.

3.4.1 16-QAM
16 constellation points arranged in a 4x4 grid. 4 bits per symbol. Used in Wi-Fi (802.11a/g), LTE. The
rectangular grid gives better noise performance than 16-PSK because the minimum distance
between symbols is larger.

3.4.2 64-QAM
64 points, 8x8 grid, 6 bits per symbol. Used in cable TV (DOCSIS), Wi-Fi (802.11n), LTE. Requires
higher SNR due to closer constellation points.

3.4.3 256-QAM and 1024-QAM


256-QAM: 8 bits per symbol. Used in DOCSIS 3.1, 5G NR, Wi-Fi 6 (802.11ax). 1024-QAM (10
bits/symbol) is used in Wi-Fi 6E. Higher-order QAM requires extremely clean channels (high SNR)
but achieves very high spectral efficiency.

Scheme Bits/Symbol M Spectral Noise Primary Use


(alphabet) Efficiency Robustness
BPSK 1 2 Low Very High GPS, deep-space
QPSK 2 4 Medium High LTE UL, satellite
8-PSK 3 8 Medium-High Medium DVB-S2
Scheme Bits/Symbol M Spectral Noise Primary Use
(alphabet) Efficiency Robustness
16-QAM 4 16 High Medium Wi-Fi, LTE
64-QAM 6 64 Higher Medium-Low Cable, Wi-Fi 5
256-QAM 8 256 Very High Low Wi-Fi 6, 5G
BFSK 1 2 Low High Bluetooth (GFSK)
MSK/GMSK 1 2 Low High GSM, Bluetooth LE
4. Signal Representation — IQ Samples and Complex Baseband
4.1 The IQ Representation
Any bandpass signal (a signal centered around a carrier frequency f_c) can be written as:
s(t) = I(t)*cos(2*pi*f_c*t) - Q(t)*sin(2*pi*f_c*t)
where I(t) is the In-phase component and Q(t) is the Quadrature component. This representation is
fundamental — the cosine and sine carriers are orthogonal (their inner product over one period is
zero), so I and Q are completely independent channels.

4.2 Complex Baseband Representation


We define the complex baseband signal (also called the analytic signal envelope) as:
s_tilde(t) = I(t) + j*Q(t) = A(t) * exp(j*phi(t))
where A(t) = sqrt(I^2(t) + Q^2(t)) is the instantaneous amplitude and phi(t) = arctan(Q(t)/I(t)) is the
instantaneous phase. The instantaneous frequency is the derivative of phase: f_inst(t) = (1/2pi) *
d(phi)/dt.
Working with the complex baseband eliminates the carrier frequency from computations, making
signal analysis much cleaner. Software-defined radios (SDRs) like HackRF, RTL-SDR, and USRP
output IQ samples directly at baseband.

4.3 Discrete IQ Samples


In practice, we work with discrete samples. The IQ data is a sequence of complex numbers: x[n] =
I[n] + j*Q[n]. A typical signal might have N = 1024 or 4096 complex samples captured at a sampling
rate f_s. For our machine learning pipeline, each signal instance is one such block of N complex
samples from which we extract a feature vector.

📌 Key insight: For BPSK, the IQ constellation has only two points on the real axis. For QPSK, four
points at 45-degree intervals. For QAM, a rectangular grid. The classifier learns to distinguish these
patterns through statistical features, not by looking at the constellation directly.
5. Problem Formulation — Automatic Modulation Classification
5.1 Problem Statement
Given a block of N received IQ samples r[n] = s[n] + w[n], where s[n] is the transmitted signal with
unknown modulation type M_unknown and w[n] is additive white Gaussian noise (AWGN), determine
M_unknown from a predefined set of possible modulations C = {BPSK, QPSK, 8PSK, 16QAM,
64QAM, BFSK, ...}.

5.2 Challenges
• Low SNR: At low SNR, all modulations start looking alike — noise dominates the
constellation.
• Unknown channel effects: Multipath fading, frequency offset, timing offset all distort the
received signal.
• Overlapping feature distributions: Some feature values overlap significantly between
modulation classes.
• Class imbalance: In real spectrum monitoring, some modulations appear more frequently
than others.

5.3 Two Approaches to AMC


5.3.1 Likelihood-Based Approach (LBA)
Computes the likelihood of the received signal under each hypothesized modulation and picks the
one with maximum likelihood. Optimal in theory but computationally expensive and requires
knowledge of channel parameters.

5.3.2 Feature-Based Approach (FBA) — Our Approach


Extract a set of discriminative features from the received signal, then use a trained classifier to decide
the modulation class. This is the practical approach and the one we implement using SVM and
Random Forest.
6. Feature Extraction Techniques
Feature extraction is the most critical step in the FBA pipeline. Good features are discriminative
(different values for different modulations), robust (consistent across different channel conditions),
and computationally efficient.

6.1 Instantaneous Features


These are derived from the instantaneous amplitude A[n], phase phi[n], and frequency f[n] of the
complex baseband signal.

6.1.1 Amplitude-Based Features


A[n] = |x[n]| = sqrt(I[n]^2 + Q[n]^2)
• sigma_aa: Standard deviation of the normalized amplitude |A[n]/A_mean - 1|. Very high for
ASK (amplitude varies), near zero for PSK and FSK (constant envelope).
• gamma_max: Maximum of PSD of the normalized amplitude. Captures periodicity in
amplitude fluctuations.
• sigma_a^2: Variance of A[n]. Useful for distinguishing QAM levels.

6.1.2 Phase-Based Features


phi[n] = angle(x[n]) = arctan(Q[n] / I[n])
• sigma_dp: Standard deviation of the non-linear component of the instantaneous phase. For
BPSK/QPSK, phase takes discrete values — this variance has a characteristic value. For
FM, phase varies continuously.
• sigma_ap: Standard deviation of the absolute value of the non-linear phase. Discriminates
between AM and FM/PM.

6.1.3 Frequency-Based Features


f_inst[n] = phi[n] - phi[n-1] (unwrapped phase difference)
• sigma_af: Standard deviation of instantaneous frequency. Very high for FSK, low for
PSK/QAM.
• mu_42_f: Higher-order moment of instantaneous frequency. Discriminates different FSK
orders.

6.2 Higher-Order Statistics — Cumulants


Higher-order cumulants (HOC) are the most powerful and widely-used features for AMC. They are
statistically defined for a zero-mean complex process x[n].

6.2.1 What are Cumulants?


Cumulants are related to moments but have the advantage of being zero for Gaussian noise
(cumulants of order > 2 are zero for Gaussian). This makes them inherently noise-robust — AWGN
does not contribute to cumulants of order > 2, though practically they degrade at very low SNR.

6.2.2 Second-Order Cumulants (Variance)


C20 = E[x^2] (not conjugated)
C21 = E[|x|^2] = E[x*x*] (conjugated)
C21 is simply the signal power. For PSK and QAM signals, C20 = 0 (due to symmetry). For AM
signals, C20 is non-zero.

6.2.3 Fourth-Order Cumulants


C40 = E[x^4] - 3*(E[x^2])^2
C41 = E[x^3 * x*] - 3*E[x^2]*E[|x|^2]
C42 = E[|x|^4] - |E[x^2]|^2 - 2*(E[|x|^2])^2
C42 is the most important feature. Its theoretical value depends only on the modulation type, not on
signal power or channel amplitude:

Modulation |C40| |C42| |C41|


BPSK 2.0 2.0 0.0
QPSK / 4QAM 0.0 -1.0 0.0
8-PSK 0.0 -0.172 0.0
16-QAM 0.0 -0.680 0.0
64-QAM 0.0 -0.619 0.0
256-QAM 0.0 -0.600 0.0
BFSK 0.0 -0.500 0.0
AM (DSB) <0 <0 non-zero

📌 C40 = 0 for all circular modulations (QAM, PSK) and non-zero for linear (AM, BPSK) — this alone
can separate AM/BPSK from QAM. C42 differentiates among QAM/PSK orders. These theoretical
values assume ideal noise-free conditions.

6.2.4 Sixth-Order Cumulants


C60 = E[x^6] - 15*E[x^4]*E[x^2] + 30*(E[x^2])^3
C63 = E[|x|^6] - 9*E[|x|^4]*E[|x|^2] + 12*(E[|x|^2])^3
Sixth-order cumulants provide additional discrimination especially between QAM orders (16-QAM vs
64-QAM vs 256-QAM) which have similar C42 values but differ in C63.
6.3 Power Spectral Density (PSD) Features
The PSD is obtained by taking the magnitude-squared FFT of the signal: S[k] = |FFT(x[n])|^2.
Features extracted from the PSD include:
• gamma_max: Maximum normalized value of the PSD — indicates spectral peakiness.
• sigma_f: Spectral spread (standard deviation of the frequency distribution).
• Symmetry measure: PSK and QAM have symmetric PSD around the carrier; AM has a
visible carrier line.
• Spectral flatness: Ratio of geometric mean to arithmetic mean of S[k]. FSK has multiple
spectral peaks; QAM has a more spread-out spectrum.

6.4 Constellation-Based Features


Although we do not use the full constellation image (that would be deep learning), we can extract
statistical descriptors of the constellation point distribution:
• Number of distinct phase clusters: k-means or DBSCAN on the phase histogram to count
clusters.
• Radial distribution: For constant-envelope signals (PSK), all points lie on a ring. For QAM,
points form a 2D distribution. The variance of |x[n]| distinguishes them.
• Kurtosis of I and Q separately: Non-Gaussian distributions indicate specific modulations.

6.5 Complete Feature Vector


The final feature vector for each signal instance is assembled by concatenating all extracted features:
f = [|C20|, |C21|, |C40|, |C41|, |C42|, |C60|, |C63|, sigma_aa, sigma_ap,
sigma_dp, sigma_af, gamma_max, sigma_f, skewness_A, kurtosis_I,
kurtosis_Q]
This gives a feature vector of approximately 16 to 20 dimensions per signal instance.
7. Machine Learning Classifiers
7.1 Support Vector Machine (SVM)
7.1.1 Binary SVM — Linear Case
SVM is a supervised learning algorithm that finds the optimal hyperplane separating two classes in
feature space. For two classes (+1 and -1), given training data (x_i, y_i):
Decision boundary: w^T * x + b = 0
The margin is the distance between the two parallel supporting hyperplanes: w^T*x + b = +1 and
w^T*x + b = -1. SVM maximizes this margin subject to the constraint that all training points are on the
correct side:
Minimize: (1/2)||w||^2
Subject to: y_i*(w^T*x_i + b) >= 1 for all i
This is a convex quadratic programming problem. The solution involves only the support vectors —
the training points closest to the decision boundary (those for which y_i*(w^T*x_i + b) = 1). All other
points are irrelevant once the model is trained.

7.1.2 Soft Margin SVM


Real data is rarely linearly separable. We introduce slack variables xi_i >= 0 to allow misclassification:
Minimize: (1/2)||w||^2 + C * sum(xi_i)
Subject to: y_i*(w^T*x_i + b) >= 1 - xi_i
C is the regularization parameter. Large C: penalizes misclassification heavily (may overfit). Small C:
allows more misclassification (more regularized). C is a hyperparameter tuned via cross-validation.

7.1.3 Kernel Trick


For non-linearly separable data, the kernel trick maps the input features to a higher-dimensional
space where they become separable, without explicitly computing the mapping. The kernel function
K(x_i, x_j) = phi(x_i)^T * phi(x_j) replaces the dot product.
• Linear kernel: K(x_i, x_j) = x_i^T * x_j. For linearly separable features.
• RBF (Radial Basis Function) / Gaussian kernel: K(x_i, x_j) = exp(-gamma*||x_i - x_j||^2).
Most commonly used for AMC. Creates spherical decision boundaries in feature space.
• Polynomial kernel: K(x_i, x_j) = (x_i^T*x_j + c)^d. Good for features with multiplicative
interactions.

7.1.4 Multi-class SVM


SVM is inherently binary. For multi-class classification (we have 7+ modulation classes), two
strategies are used:
• One-vs-Rest (OvR): Train K binary SVMs, each separating one class from all others. Predict
with the highest confidence score.
• One-vs-One (OvO): Train K*(K-1)/2 binary SVMs for every pair of classes. Predict by
majority voting. Often more accurate but slower to train.
7.2 Random Forest
7.2.1 Decision Trees
A decision tree partitions the feature space with axis-aligned splits. At each node, we select the
feature and threshold that maximizes information gain (using Gini impurity or Entropy). The tree grows
until leaves are pure or a stopping criterion is reached. Single decision trees overfit badly — this is
where Random Forest helps.

7.2.2 Ensemble and Bagging


Random Forest combines B decision trees, each trained on a bootstrap sample (random sample with
replacement) of the training data — this is called bagging (Bootstrap AGGregating). Each tree sees
a different subset of the data, introducing diversity.

7.2.3 Random Feature Subsets


At each node split in each tree, only a random subset of sqrt(p) features (where p = total features) is
considered for the split. This further decorrelates the trees. If all trees used all features, they would
be highly correlated and the ensemble wouldn't gain much.

7.2.4 Prediction
Predicted class = majority vote across B trees
Each tree gives a class vote. The class receiving the most votes wins. The class probability can be
estimated as the fraction of trees voting for each class.

7.2.5 Feature Importance


Random Forest naturally computes feature importance as the total reduction in Gini impurity (or
information gain) attributable to each feature across all trees and all splits. This allows us to identify
which cumulant or instantaneous feature is most discriminative for AMC — valuable for understanding
and for potentially reducing the feature set.

7.3 Comparison of SVM vs Random Forest for AMC

Aspect SVM (RBF) Random Forest


Training speed Slower (O(n^2) to O(n^3)) Faster, parallelizable
Prediction speed Fast Fast
Hyperparameters C, gamma (kernel) n_estimators, max_depth, max_features
High-dim features Excellent (kernel handles well) Good
Feature importance Not direct Built-in and reliable
Aspect SVM (RBF) Random Forest
Interpretability Low (black box) Moderate (via trees)
Overfitting risk Low (margin maximization) Low (bagging + random features)
AMC performance Very high at medium-high SNR High, more robust to noise
8. System Architecture and Pipeline
8.1 End-to-End Pipeline
The complete AMC system follows this pipeline:
1. Signal Generation: Simulate transmitted IQ samples for each modulation class (BPSK,
QPSK, 8PSK, 16QAM, 64QAM, BFSK, AM-DSB) at various SNR levels.
2. Channel Simulation: Add AWGN noise corresponding to the desired SNR. Optionally add
carrier frequency offset (CFO) and timing offset.
3. Preprocessing: Normalize signal power. Remove DC offset. Apply carrier frequency
correction if needed.
4. Feature Extraction: Compute the feature vector f for each signal block — cumulants,
instantaneous statistics, PSD features.
5. Dataset Assembly: Create dataset D = {(f_i, label_i)} for all signal instances across all SNR
levels.
6. Train/Test Split: 70% train, 15% validation, 15% test. Stratified split to ensure balanced
class representation.
7. Feature Scaling: Standardize features (zero mean, unit variance) — critical for SVM,
optional for RF.
8. Model Training: Train SVM (with grid search over C and gamma) and Random Forest
(tuning n_estimators, max_depth).
9. Evaluation: Compute confusion matrix, per-class accuracy, overall accuracy vs SNR curve.

8.2 SNR Definition


SNR_dB = 10 * log10(Signal_Power / Noise_Power) = 10 * log10(Eb/N0 *
log2(M))
We evaluate the classifier at SNR values from -10 dB to +30 dB in 2 dB steps. At -10 dB, the signal
is buried in noise. Beyond +20 dB, most classifiers achieve near-100% accuracy. The interesting
operating region is 0 to 15 dB.

8.3 Python Code Sketch


The following outlines the key code structure (Python, numpy, scipy, sklearn):
# Feature extraction core (simplified) def extract_features(samples): # Normalize
samples = samples / [Link](samples) I, Q = [Link], [Link] A =
[Link](samples) phi = [Link]([Link](samples)) f_inst = [Link](phi) #
Cumulants C21 = [Link](A**2) C40 = [Link](samples**4) -
3*[Link](samples**2)**2 C42 = [Link](A**4) - [Link]([Link](samples**2))**2 -
2*C21**2 # Instantaneous stats sigma_aa = [Link](A/[Link](A) - 1) sigma_af =
[Link](f_inst) sigma_dp = [Link](phi - [Link](phi)) return [[Link](C40),
[Link](C42), sigma_aa, sigma_af, sigma_dp, ...]
9. Dataset Generation
9.1 Synthetic Dataset
Since we do not have hardware (SDR) for data collection, we generate synthetic IQ samples. This is
standard practice in AMC research. The RadioML dataset (GNU Radio, DeepSig) is a popular
synthetic benchmark — however, we generate our own for complete control and understanding.

9.2 Signal Generation Parameters


Parameter Value
Carrier frequency (f_c) 1 MHz (normalized to baseband after mixing)
Sample rate (f_s) 8 samples/symbol
Samples per instance (N) 1024 complex samples
SNR range -10 dB to +30 dB (2 dB steps, 21 values)
Instances per class per SNR 500
Modulation classes 7 (BPSK, QPSK, 8PSK, 16QAM, 64QAM, BFSK, AM-DSB)
Total dataset size 7 x 21 x 500 = 73,500 instances
Channel model AWGN (baseline), optionally Rayleigh fading

9.3 Class Descriptions for Generation


• BPSK: Random bits mapped to {+1, -1}. IQ samples = {(+1, 0), (-1, 0)} per symbol, pulse-
shaped.
• QPSK: 2-bit groups mapped to 4 phases. Gray coded. Pulse shaping with Root Raised
Cosine (RRC) filter.
• 8PSK: 3-bit groups mapped to 8 equally spaced phases.
• 16-QAM: 4-bit groups mapped to 16 points in a 4x4 grid. Normalized to unit average power.
• 64-QAM: 6-bit groups mapped to 64 points in 8x8 grid.
• BFSK: Alternating between two frequencies f_c+delta_f and f_c-delta_f based on bit.
• AM-DSB: A sinusoidal message signal modulated onto the carrier: (1 +
m*cos(2*pi*f_m*t))*cos(2*pi*f_c*t).
10. Performance Evaluation
10.1 Confusion Matrix
The confusion matrix C is an M x M matrix where C[i][j] = number of instances of class i predicted as
class j. The diagonal entries are correct predictions. Off-diagonal entries are misclassifications. For
AMC, common confusions are QPSK vs 8PSK at low SNR, and 16-QAM vs 64-QAM at medium SNR.

10.2 Metrics
• Overall Accuracy = (sum of diagonal) / (total instances)
• Per-class Precision = TP / (TP + FP) — of all signals predicted as class X, what fraction
actually is X.
• Per-class Recall = TP / (TP + FN) — of all actual class X signals, what fraction is correctly
identified.
• F1 Score = 2 * Precision * Recall / (Precision + Recall) — harmonic mean, handles class
imbalance.
• Accuracy vs SNR curve: The primary performance plot. Shows how classification accuracy
improves as SNR increases.

10.3 Expected Results (Literature Benchmark)


SNR (dB) SVM Accuracy RF Accuracy Notes
-10 ~20% ~22% Near random (7 classes = 14.3%
baseline)
-5 ~35% ~38% Only BFSK/AM separable from
PSK/QAM
0 ~55% ~58% BPSK/QPSK separating well
5 ~75% ~78% Most classes separating
10 ~88% ~90% Main confusion: 16QAM vs 64QAM
15 ~93% ~95% Near-saturation
20+ ~97% ~98% Saturation — only ambiguous pairs
remain

10.4 Hyperparameter Tuning


For SVM, use GridSearchCV over C in {0.1, 1, 10, 100} and gamma in {0.001, 0.01, 0.1, 1} with 5-
fold cross validation. For Random Forest, tune n_estimators in {50, 100, 200} and max_depth in
{None, 10, 20}.
11. Clarification: Are Modulations Taught in DSP?
This is an excellent and important question. Here is the clear answer:

11.1 Short Answer


No — modulation techniques are not the primary content of a DSP course. They are primarily taught
in Principles of Communication / Communication Systems and advanced courses. However, DSP
and Communications courses are deeply interlinked.

11.2 What DSP Covers


• Discrete-time signals and systems
• Z-transform and DTFT
• FIR and IIR filter design
• DFT and FFT algorithms
• Multirate signal processing (downsampling, upsampling, polyphase)
• Spectral analysis and windowing
• Sampling theorem (Nyquist), aliasing

11.3 What Communication Systems / PoC Covers


• AM, FM, PM — analog modulation and demodulation
• PAM, PPM, PCM — pulse modulation
• Noise analysis in analog and digital systems
• SNR, BER calculations
• Bandwidth efficiency, Nyquist ISI criterion

11.4 What is Typically in Advanced Comm / Digital Comm (later semester)


• ASK, FSK, PSK, QAM — digital modulation and demodulation
• Constellation diagrams
• Matched filtering, Gram-Schmidt orthogonalization
• BER vs Eb/N0 performance curves
• Channel capacity, Shannon's theorem
• OFDM, CDMA, spread spectrum

11.5 The Overlap / Connection


DSP tools are used to implement and analyze communication systems. For example:
• FFT (DSP tool) is used to analyze the spectrum of modulated signals — used in our PSD
features.
• FIR filters (DSP tool) implement the pulse shaping (Root Raised Cosine) used in digital
modulations.
• Hilbert transform (DSP tool) is used to extract the instantaneous amplitude and phase —
used in our feature extraction.
• Multirate processing (DSP tool) is used in software-defined radio receivers for decimation.
📌 So: Modulation theory comes from your PoC / Digital Comm courses. DSP gives you the
mathematical tools to process and analyze those modulated signals. This project bridges both.

11.6 Relevance to Your Current Courses


Based on what you know from PoC (AM, FM, PAM, PPM), here is where this project extends that:
• AM, FM, PAM, PPM — you already understand these from PoC. Chapter 2 of this report
formalizes them mathematically.
• Digital modulations (PSK, QAM, FSK) — you will encounter these in your Digital
Communications course next year, or possibly in your 4th semester. This project gives you a
head start.
• IQ representation and complex baseband — this is covered in Digital Comm or Analog
Comm advanced topics. Chapter 4 of this report covers it fully.
• Cumulants and higher-order statistics — this may appear in your Signal Processing or
Statistical Signal Analysis course (EC202/EC204). You have already been studying
probability and statistics.
12. References
1. Azzouz, E. E., & Nandi, A. K. (1996). Automatic Modulation Recognition of Communication Signals.
Springer. — The foundational textbook for feature-based AMC.
2. O'Shea, T. J., & West, N. (2016). Radio Machine Learning Dataset Generation with GNU Radio.
Proceedings of the GNU Radio Conference. — The RadioML dataset paper.
3. Proakis, J. G. (2007). Digital Communications (5th ed.). McGraw-Hill. — Standard reference for
digital modulation theory.
4. Haykin, S. (2001). Communication Systems (4th ed.). Wiley. — Covers AM, FM, digital modulations
comprehensively.
5. Swami, A., & Sadler, B. M. (2000). Hierarchical Digital Modulation Classification Using Cumulants.
IEEE Transactions on Communications, 48(3), 416-429. — Key paper on cumulant-based features.
6. Vapnik, V. (1998). Statistical Learning Theory. Wiley. — Foundational SVM theory.
7. Breiman, L. (2001). Random Forests. Machine Learning, 45(1), 5-32. — Original Random Forest
paper.
8. Oppenheim, A. V., & Schafer, R. W. (2009). Discrete-Time Signal Processing (3rd ed.). Prentice
Hall. — DSP reference.

End of Report
SVNIT Surat | Minor in AI | 2025-2026

You might also like