Exp 8
Exp 8
where:
• X[k] is the data symbol for the k-th subcarrier,
• N is the number of subcarriers,
• x[n] is the time-domain signal after IFFT.
Binary Phase Shift Keying (BPSK): BPSK is a binary modulation scheme where each bit is
represented by one of two phases (0 or π), corresponding to symbols 1 or -1. BPSK is robust
to noise and is often used for its simplicity in modulating the subcarriers in OFDM systems.
Cyclic Prefix: A cyclic prefix is added at the beginning of each OFDM symbol to prevent inter-
symbol interference (ISI) caused by multipath propagation. The prefix is a copy of the last few
samples of the OFDM symbol and ensures that the cyclic nature of the OFDM symbol is
preserved even after time dispersion.
Orthogonality of Subcarriers: The subcarriers in OFDM are spaced by 1/T (where T is the
OFDM symbol duration), ensuring that each subcarrier's sinc function in the frequency domain
has zero crossings at the other subcarrier frequencies. This is achieved by selecting frequencies
fk such that:
% OFDM Modulation
ofdm_signal = ofdm_modulate(bits, N, CP_len);
subplot(2, 1, 2);
plot(imag(ofdm_signal));
title([title_str, ' (Imaginary Part)']);
xlabel('Sample Index');
ylabel('Amplitude');
end
function plot_subcarriers(N)
% N: Number of subcarriers
% Initialize figure
figure;
hold on;
% Plot each subcarrier as a sinc function (which represents the frequency domain
representation)
for k = -2:2 % Plot a few subcarriers around the center (adjust for visibility)
% Subcarrier as a sinc function centered at k
subcarrier = sinc(f - k);
plot(f, subcarrier, 'DisplayName', ['Subcarrier ', num2str(k)]);
end
Conclusion: