Skip to main content

Posts

Showing posts with the label Raised cosine filter

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 %% ===============================================...

Trade-off Between Roll-off Factor and Time Bandwidth Product

🧮 Overview of Time-Bandwith Product 🧮 MATLAB Code for Trade-off Between Roll-off Factor and Time Bandwidth Product 🧮 Bandwidth Efficiency in Raised Cosine Filter 📚 Further Reading   MATLAB Code clc; clear; close all; % Parameters Rb = 1e6; % Bit rate (1 Mbps) SNR_dB = 0:2:20; % SNR range in dB beta_values = [0, 0.2, 0.5, 0.8, 1.0]; % Different roll-off factors numBits = 1e5; % Number of bits disp("For different roll-off (β) factors and a symbol rate of 1 MHz:"); % Simulation BER = zeros(length(beta_values), length(SNR_dB)); for b = 1:length(beta_values) beta = beta_values(b); bandwidth = (1 + beta) * (Rb / 2); % Bandwidth calculation timeBandwidthProduct = (1 + beta) / 2; % Time-bandwidth product calculation fprintf('Beta = %.1f, Bandwidth = %.2f MHz, Time-Bandwidth Product = %.2f\n', beta, bandwidth / 1e6, timeBandwidthProduct); for s = 1:length(SNR_dB) snr = 10^(SNR_dB(s) / 10); % Convert dB to linear EbN0 = snr * Rb / ban...

Raised Cosine Filter in MATLAB (with Simulator)

📘 Overview & Theory 🧮 MATLAB Codes 📚 Further Reading   MATLAB Code clc; clear all; close all; Data_sym = [0 1 1 0 1 0 0 1]; M = 4; Phase = 0; Sampling_rate = 48e3; Data_Rate = 100; Bandwidth = 400; Upsampling_factor = Sampling_rate/Data_Rate; Rolloff = 0.4; Upsampled_Data = upsample(pskmod(Data_sym,M,Phase),Upsampling_factor); Pulse_shape = firrcos(2*Upsampling_factor,Bandwidth/2,Rolloff,Sampling_rate,'rolloff','sqrt'); Output What if we change the roll-off roll-off = 0.01 roll-off = 0.99 What if we change the bandwidth Bandwidth = 100 Hz     Bandwidth = 1000 Hz    What if we change the sampling rate  Sampling rate = 10 KHz  Sampling rate = 100 KHz Another MATLAB Code % The code is developed by SalimWireless.Com clc; clear; close all; % Parameters fs = 1000; % Sampling frequency in Hz symbolRate = 100; % Symbol rate (baud) span = 6; % Filter span in symbols alpha = 0.25; % Roll-off factor for raised cosine filter % Genera...

Why is Time-bandwidth Product (TBP) Important?

📘 Theory 📏 Example 🧮 Filter Code 📈 Gaussian Code 📚 Further Reading Time-Bandwidth Product (TBP) The time-bandwidth product (TBP) is defined as: TBP = Δ f ⋅ Δ t Δf (Bandwidth) : The frequency bandwidth of the signal, representing the range of frequencies over which the signal is spread. Δt (Time duration) : The duration for which the signal is significant, i.e., the time interval during which the signal is non-zero. The TBP is a measure of the "spread" of the signal in both time and frequency domains. A higher TBP means the signal is both spread over a larger time period and occupies a wider frequency range. To calculate the period of a signal with finite bandwidth, Heisenberg’s uncertainty principle plays a vital role...

Applications of a Raise Cosine Filter

  For a typical wireless communication system, we use modulation schemes and filters before transmitting the signal. The main purpose of using it is to transmit a proper waveform so that we can recover the signal at the receiving end more accurately.  If the roll-off factor is α, then  Bandwidth (B) = (1 + α) / (2 * T) where T is the time interval. The filter response is zero outside that. The roll-off factor is a parameter used to shape the spectrum of a digital signal in communication systems, and it is not just the product of time and bandwidth. It affects both the time and frequency domain characteristics of the signal. Example According to the Nyquist criterion, the sampling frequency of a signal must be at least twice the highest frequency present in the message signal. Conversely, during signal transmission, the bandwidth of the transmitted signal must be at least half the symbol rate to ensure inter-symbol interference (ISI)-free t...


Contact Us

Name

Email *

Message *