Skip to main content

Pulse Shaping using Raised Cosine Filter (with MATLAB + Simulator) | OFDM

 

MATLAB Code for Raised Cosine Filter Pulse Shaping

clc; clear; close all;
%% =====================================================
%% PARAMETERS
%% =====================================================
N = 64; % Number of OFDM subcarriers
cpLen = 16; % Cyclic prefix length
modOrder = 4; % QPSK
oversample = 8; % Oversampling factor
span = 10; % RRC filter span in symbols
rolloff = 0.25; % RRC roll-off factor
%% =====================================================
%% Generate Baseband OFDM Symbols
%% =====================================================
data = randi([0 modOrder-1], N, 1); % Random bits
txSymbols = pskmod(data, modOrder, pi/4); % QPSK modulation
% IFFT to get OFDM symbol
tx_ofdm = ifft(txSymbols, N);
% Add cyclic prefix
tx_cp = [tx_ofdm(end-cpLen+1:end); tx_ofdm];
%% =====================================================
%% Oversample the Baseband Signal
%% =====================================================
tx_oversampled = upsample(tx_cp, oversample);
%% =====================================================
%% Root Raised Cosine (RRC) Pulse Shaping
%% =====================================================
rrcFilter = rcosdesign(rolloff, span, oversample, 'sqrt'); % RRC filter
tx_shaped = conv(tx_oversampled, rrcFilter, 'same');
%% =====================================================
%% Visualize Time-Domain Waveform
%% =====================================================
figure;
subplot(2,1,1);
plot(real(tx_oversampled), 'b'); hold on;
plot(real(tx_shaped), 'r');
xlabel('Sample Index'); ylabel('Amplitude');
title('OFDM Time-Domain Waveform');
legend('Before RRC','After RRC');
grid on;
%% =====================================================
%% Visualize Spectrum
%% =====================================================
subplot(2,1,2);
nFFT = 1024;
f = linspace(-0.5,0.5,nFFT)*oversample; % Normalized freq axis
TX_OS_F = fftshift(abs(fft(tx_oversampled,nFFT)));
TX_SH_F = fftshift(abs(fft(tx_shaped,nFFT)));
plot(f, TX_OS_F/max(TX_OS_F), 'b'); hold on;
plot(f, TX_SH_F/max(TX_SH_F), 'r');
xlabel('Normalized Frequency'); ylabel('Normalized Magnitude');
title('OFDM Spectrum');
legend('Before RRC','After RRC');
grid on;
%% =====================================================

 

Output

 


Summary

In the above figure, it is shown that Root Raised Cosine (RRC) pulse shaping further band-limits the OFDM waveform. Band-limiting a signal allows it to pass more efficiently through a bandwidth-limited channel. The signal bandwidth should not exceed the coherence bandwidth of the channel to avoid frequency-selective distortion. Another important purpose of pulse shaping is to reduce spectral leakage, ensuring that critical frequency components are not lost during transmission.
 

Further Reading




Contact Us

Name

Email *

Message *

Popular Posts

Hybrid Beamforming | Page 1

Beamforming Techniques Hybrid Beamforming... Page 1 | Page 2 | Hybrid Beamforming: Hybrid beam formation was developed to address some of the limitations of digital pre-coding approaches. Every antenna element is connected to an RF chain in digital pre-coding (beam forming) method. We also know that each RF chain is in charge of providing a separate data stream between the transmitter and the receiver. We know that a larger number of independent data streams leads to higher data rates. It has a spatial multiplexing feature for MIMO. As a result, we may assume that switching from MIMO to massive MIMO will benefit us more in terms of spatial multiplexing in massive MIMO, where each antenna is coupled to a single RF chain. We'll proceed with a definition of hybrid beam forming. Overview of hybrid beam forming with example: Unlike digital beam forming, more than one antenna element is connected to a single RF chain in hybr...

UGC NET Electronic Science Previous Year Question Papers with Solutions

Home / Engineering & Other Exams / UGC NET 2026 PYQ ⬇️ Download Papers and Solutions 📋 Exam Pattern 💡 Preparation Tips ❓ FAQs 📊 Exam Highlights: Electronic Science (88) Feature Details Junior Research Fellowship (JRF) ₹37,000 + HRA per month Eligibility M.Sc/M.Tech in Electronics (55%) Validity of Certificate JRF (3 Years) | Lectureship (Lifetime) 📥 Download UGC NET Electronics PDFs Complete collection of previous year question papers, answer keys and explanations for Subject Code 88. Start Downloading 📂 View All Question Papers June 2025 - Question Paper Download PDF June 2025 - Solved Paper + Explanation ...

MATLAB Code for Rms Delay Spread

RMS delay spread is crucial when you need to know how much the signal is dispersed in time due to multipath propagation, the spread (variance) around the average. In high-data-rate systems like LTE, 5G, or Wi-Fi, even small time dispersions can cause ISI. RMS delay spread is directly related to the amount of ISI in such systems. RMS Delay Spread [↗] Delay Spread Calculator Enter delays (ns) separated by commas: Enter powers (dB) separated by commas: Calculate   The above calculator Converts Power to Linear Scale: It correctly converts the power values from decibels (dB) to a linear scale. Calculates Mean Delay: It accurately computes the mean excess delay, which is the first moment of the power delay profile. Calculates RMS Delay Spread: It correctly calculates the RMS delay spread, defined as the square root of the second central moment of the power delay profile.   MATLAB Code  clc...

Advanced M-ary Modulation Simulator: Constellation, min dist, Efficiency, SER, EVM (RMS)

Advanced M-ary Communication Lab Analytical & Statistical Performance of Digital Modulation Theoretical Probability of Error (\(P_s\)) \[ P_s = Q\left(\sqrt{\frac{2 E_b}{N_0}}\right) \] Modulation (M-ary) BPSK (M=2) QPSK (M=4) 8-PSK (M=8) 16-QAM (M=16) 64-QAM (M=64) 256-QAM (M=256) SNR (\(E_b/N_0\)): 12 dB Efficiency 2 bps/Hz Min Dist (\(d_{min}\)) 1.41 Symbol Error 1.2e-5 EVM (RMS) 0.0% Constellation Diagram Noise PDF & Decision Tail 1. Geometric Mapping ...

Amplitude Shift Keying (ASK) Modulation & Demodulation (with Simulation)

Amplitude Shift Keying (ASK): Signal Analysis and Characterization Theoretical Overview: Amplitude Shift Keying (ASK) represents a primary digital modulation technique wherein information is encoded through discrete variations in the carrier signal's instantaneous amplitude. In a Binary ASK (BASK) framework, the modulation process maps binary data onto two distinct amplitude levels. Specifically, the binary '1' (mark) is conveyed by a sinusoidal carrier with amplitude A c and frequency f c over a bit interval T b , while the binary '0' (space) is represented by a null signal state. This particular signaling method is widely recognized as On-Off Keying (OOK) . It is technically realized by gating a carrier oscillator with a unipolar baseband sequence, effectively performing a product modulation that shifts the baseband spectrum to the carrier frequency. ASK Transmitter Architecture: ...

Frequency Shift Keying (FSK) Modulation & Demodulation (with Simulation)

Frequency Shift Keying (FSK) Theoretical Foundations: Frequency Shift Keying (FSK) is a discrete frequency modulation scheme wherein the digital information is encoded via instantaneous shifts in the carrier signal's frequency. The fundamental implementation is Binary FSK (BFSK), which maps binary data onto two distinct, discrete spectral states. A binary '1' (the "mark" state) is represented by a carrier frequency \( f_1 \), while a binary '0' (the "space" state) corresponds to frequency \( f_2 \). Each symbol is sustained for a bit interval denoted by \( T_b \). FSK Transmitter Characterization: The mathematical model for the modulated BFSK output \( s(t) \) is defined as: \[ s(t) = \begin{cases} A_c \cos(2\pi f_1 t), & \text{for } m = 1 \\ A_c \cos(2\pi f_2 t), & \text{for } m = 0 \end{cases} \] ...

Comparisons among ASK, PSK, and FSK (with MATLAB + Simulator)

Modulation ASK, FSK & PSK Constellation MATLAB Simulink MATLAB Code Comparisons among ASK, PSK, and FSK 📘 Comparisons among ASK, FSK, and PSK 🧮 Online Simulator Bandwidth 🧮 MATLAB Code BER Analysis 📚 Further Reading 📂 View Other Topics on Comparisons among ASK, PSK, and FSK ... 🧮 Comparisons of Noise Sensitivity, Bandwidth, Complexity, etc. 🧮 MATLAB Code for Constellation Diagrams of ASK, FSK, and PSK 🧮 Online Simulator for ASK, FSK, and PSK Generation 🧮 Online Simulator for ASK, FSK, and PSK Constellation 🧮 Some Questions and Answers Comparisons among ASK, PSK, and FSK Comparison among ASK, FSK, and PSK Parameters ASK FSK PSK Variable Characteristics Amplitude ...

QPSK Online Simulator (Signal Generation)

Simulator for QPSK Modulation Quadrature (4-PSK) Bitstream (Even length) Carrier Freq (Hz) Samples Per Symbol Run QPSK Simulation The Math Behind QPSK Quadrature Phase Shift Keying (QPSK) is a form of digital modulation that transmits two bits per symbol by changing the phase of a carrier wave. s(t) = A cos(2Ï€f c t + θ n ) Phase (θ n ): Each pair of bits (dibit) corresponds to a specific phase shift. In Gray coding, we use: "00" → Ï€/4 (45°) "01" → 3Ï€/4 (135°) "11" → 5Ï€/4 (225°) "10" → 7Ï€/4 (315°) Efficiency: Since 4 phases are used, QPSK carries double the data of BPSK in the same bandwidth. ...