QPSK offers double the data rate of BPSK while maintaining a similar bit error rate at low SNR when Gray coding is used. It shares spectral efficiency with 4-QAM and can outperform 4-QAM or 16-QAM in very noisy channels. QPSK is widely used in practical wireless systems, often alongside QAM in adaptive modulation schemes [Read more...]
Gray code is a binary numeral system where two successive values differ in only one bit. This property is called the single-bit difference or unit distance code. It is also known as reflected binary code.
Let's convert binary 111 to Gray code:
Binary bits:
B = 1 1 1
Apply the rule:
G[0] = B[0] = 1
G[1] = B[1] XOR B[0] = 1 XOR 1 = 0
G[2] = B[2] XOR B[1] = 1 XOR 1 = 0
Gray code:
G = 1 0 0
MATLAB Code
clear all;
close all;
% Set parameters
EbNo_dB = -4:1:14; % Standard range for BER plots
EbNo_lin = 10.^(EbNo_dB/10);
qam_orders = [16, 64, 256]; % Higher order QAM
figure('Color', 'w');
% 1. Plot BPSK (Theoretical)
% Formula: Pb = Q(sqrt(2*Eb/No))
ber_bpsk = 0.5 * erfc(sqrt(EbNo_lin));
semilogy(EbNo_dB, ber_bpsk, 'k-','LineWidth', 2, 'DisplayName', 'BPSK & QPSK');
hold on;
% 2. Plot QPSK (Theoretical)
% Note: BER for QPSK is the same as BPSK when using Gray Coding
% We already plotted it above, but let's use berawgn to verify 4-QAM
ber_4qam = berawgn(EbNo_dB, 'qam', 4);
semilogy(EbNo_dB, ber_4qam, 'ko', 'DisplayName', '4-QAM (MATLAB)');
% 3. Loop through higher QAM orders using MATLAB's built-in berawgn
% These functions account for Gray coding and convert Eb/No correctly
colors = ['r', 'g', 'b'];
i = 1;
for qam_order = qam_orders
ber_qam = berawgn(EbNo_dB, 'qam', qam_order);
semilogy(EbNo_dB, ber_qam, [colors(i) 'o-'], 'LineWidth', 1.5, ...
'DisplayName', sprintf('%d-QAM', qam_order));
i = i + 1;
end
% Formatting the Plot
grid on;
box on;
xlabel('E_b/N_0 (dB)');
ylabel('Bit Error Rate (BER)');
title('Theoretical BER vs E_b/N_0 for Various Modulations');
legend('Location', 'southwest');
axis([min(EbNo_dB) max(EbNo_dB) 1e-6 1]);
% Add a note about Gray Coding
text(5, 1e-1, 'Assumes AWGN & Gray Coding', 'FontSize', 10, 'FontWeight', 'bold');
Copy the MATLAB Code from here
Output
Are QPSK and 4-PSK same?
QPSK (Quadrature Phase Shift Keying) and 4-PSK (4-Phase Shift Keying) are related but not exactly the same.
QPSK (Quadrature Phase Shift Keying): In QPSK, each symbol represents 2 bits of data. It modulates the carrier signal by changing its phase with four possible values (0°, 90°, 180°, 270°) corresponding to four different states. These four states can be represented in a constellation diagram with points at (1,1), (-1,1), (-1,-1), and (1,-1). Each symbol represents a combination of two bits, where one pair of bits represents the in-phase component and the other pair represents the quadrature component.
4-PSK (4-Phase Shift Keying): 4-PSK is a more general term that refers to any Phase Shift Keying modulation with 4 different phase shifts. This could include QPSK as a specific case. However, 4-PSK might also refer to modulation schemes where each symbol represents only one bit of data, unlike QPSK where each symbol represents 2 bits. In a 4-PSK constellation, there are still four points, but they might not correspond to the same bit combinations as in QPSK.
So, while QPSK is a specific form of 4-PSK, not all 4-PSK schemes are QPSK. The distinction lies in how many bits each symbol represents and how the phase shifts are utilized.