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.
Application
A raised cosine filter is used for pulse shaping. You might have noticed in most of the diagrams of 'communication systems.' It is common to use this type of filter after the modulation module.
MATLAB code for raise-cosine filter
Result
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 transmission. A raised cosine filter facilitates this requirement.
For example, if the symbol rate is 100 symbols per second, the minimum bandwidth required for ISI-free transmission is: 100 / 2 = 50 Hz
In simple terms, the symbol rate indicates that symbols are changing 100 times per second. To recover the transmitted signal at the receiver end without ISI, the minimum transmission bandwidth required is 50 Hz.
The bandwidth of a raised cosine filter is given by the formula:
where α is the roll-off factor of the filter. If the roll-off factor α is 0.25, the bandwidth is calculated as:
This bandwidth (62.5 Hz) exceeds the minimum requirement of 50 Hz for transmitting a signal at a symbol rate of 100 symbols per second.
MATLAB Code for the example above
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
% Generate random data symbols
numSymbols = 100; % Number of symbols
data = randi([0 1], numSymbols, 1) * 2 - 1; % Generate random binary data (BPSK symbols: -1, 1)
% Upsample the data to match sampling rate
samplesPerSymbol = fs / symbolRate; % Samples per symbol based on fs and symbol rate
dataUpsampled = upsample(data, samplesPerSymbol);
% Create a raised cosine filter
rcFilter = rcosdesign(alpha, span, samplesPerSymbol, 'sqrt'); % Square root raised cosine filter
% Apply the filter to the upsampled data
txSignal = conv(dataUpsampled, rcFilter, 'same');
figure;
subplot(4,1,1)
stem(data);
title('Original Message signal');
grid on;
subplot(4,1,2)
plot(dataUpsampled);
title('Upsampled Message signal');
grid on;
subplot(4,1,3)
plot(rcFilter);
title('Raise Cosine Filter Coefficient');
grid on;
subplot(4,1,4)
plot(txSignal);
title('Transmitted Signal after Raised Cosine Filtering');
grid on;