8.1 Title: Design and Analysis of Quadrature Phase Shift Keying (QPSK) Modulator and its Bit Error Rate (BER) Performance
8.2 Aim of the experiment: To design a modulator using M-ary Phase Shift Keying (M-PSK) for a special case where 2 bits represent each symbol (QPSK) and analyze its bit error rate (BER) under given specifications.
8.3 Theoretical background for the experiment: Quadrature Phase Shift Keying (QPSK) is a digital modulation technique that encodes 2 bits per symbol by varying the phase of the carrier signal. The QPSK modulated signal is expressed as:
Where:
represents one of four possible phase shifts: .
Each phase corresponds to a unique pair of bits (00, 01, 10, 11).
BER Analysis: The theoretical BER for QPSK in an AWGN (Additive White Gaussian Noise) channel is given by:
Where:
: Q-function.
: Energy per bit to noise power spectral density ratio.
8.4 Design:
Input Data: Random binary sequence.
Symbol Mapping: Map 2 bits to one symbol (00 -> 0, 01 -> , 10 -> , 11 -> ).
Modulation: Generate QPSK modulated signal.
Demodulation: Recover the binary sequence from the received signal.
BER Calculation: Compare transmitted and received bits to compute BER.
8.5 Step by step procedure to carry out the experiment:
Generate a random binary data stream.
Divide the data into 2-bit groups and map each group to a phase.
Generate the QPSK signal using a carrier frequency.
Add AWGN noise to simulate the channel.
Demodulate the noisy signal and recover the binary data.
Calculate BER by comparing the transmitted and received data.
8.6 Code:
clc %for clearing the command window
close all %for closing all the window except command window
clear all %for deleting all the variables from the memory
nPSK=2; %BPSK
nbit=100000; %Number of Input Bit
Eb=1; %Energy Bit
itr=20; %Number of Itration
BER=1:itr; %Bit Error Rate
%Bit Error Rate Calculation
for SNRdb=1:1:itr
counter=0;
SNR=10.^(SNRdb/10);
No=1/SNR;
v=(No/Eb)/(2*nPSK); %Noise Equation
for n=1:1:nbit
x=rand(1); %Input Process
if(x>0.5)
x1=1;
else
x1=0;
end
x2=1-(2*x1); %Modulation Process
AWGN=sqrt(v)*randn(1); %Transmition Process
r=x2+AWGN; %Channel
if(r>0) %Detection Process
y1=1;
else
y1=-1;
end
y2=(1-y1)/2; %Demodulation Process
if(x1~=y2) %Number of Bit Error
counter=counter+1;
end
end
BER(SNRdb)=(counter/nbit); %Bit Error Rate Calculation
end
SNRdb=1:itr;
pe=0.5*erfc(sqrt(10.^(SNRdb/10))); %Theoretical Bit Error Rate
%Plot Bit Error Rate
figure('name','BER_BPSK','numbertitle','off');
semilogy(SNRdb,BER,'--g*','linewidth',1.5,'markersize',8);
axis([1 itr 10^(-4) 1]);
xlabel('SNR(dB)');
ylabel('BER');
grid on;
hold on;
semilogy(SNRdb,pe,'--bs','linewidth',1.5,'markersize',6);
axis([1 itr 10^(-4) 1]);
title(' curve for Bit Error Rate verses SNR for Binary PSK modulation');
xlabel(' SNR(dB)');
ylabel('BER');
legend('simulation','theorytical');
grid on;
hold on;
8.7 Observations and results:
The QPSK modulated signal showed distinct phase shifts corresponding to binary data pairs.
The BER decreased as increased, following the theoretical trend for QPSK in AWGN channels.
The experimental BER closely matched theoretical predictions.
8.8 Plotting of the graph:
8.9 Conclusion of the experiment:
The QPSK modulator and demodulator were successfully designed, and the BER performance was analyzed. The results demonstrate the robustness of QPSK modulation in AWGN channels, with BER decreasing significantly as the signal-to-noise ratio improves. This experiment validates the theoretical performance of QPSK in digital communication systems.