Question

In: Electrical Engineering

Understand the principles of Quadrature Phase Shift Keying (QPSK). Measure Bit Error Rate (BER). Understand the...

Understand the principles of Quadrature Phase Shift Keying (QPSK). Measure Bit Error Rate (BER). Understand the effects of having phase errors in the received signal.

i need matlab code for qpsk modulation and demodulation both

also bit rate error using of the recived signal

i repeat i need matklab code for all task  

1) qpsk modulation

2) qpsk demodulation

3) ber bit eroor rate matlab code

Solutions

Expert Solution

Qpsk Modulation and Demodulation

clc;
close all;
Bits=input('Enter bit stream to be modulated : '); % information
%Number_of_bit=1024;
%data=randint(Number_of_bit,1);
subplot(3,2,1)
stem(Bits, 'linewidth',2)
grid on;
title(' Information bits to be transmitted ');
data_NZR=2*Bits-1; % Data Represented at NZR form for QPSK modulation
s_p_data=reshape(data_NZR,2,length(Bits)/2); % S/P convertion of data
br=10.^6; %Let us transmission bit rate 1000000
f=br; % minimum carrier frequency
T=1/br; % bit duration
t=T/99:T/99:T; % Time vector for one bit information
% QPSK modulation
Y=[];
Y_in=[];
Y_qd=[];
for(i=1:length(Bits)/2)
Y1=s_p_data(1,i)*cos(2*pi*f*t); % in phase component
Y2=s_p_data(2,i)*sin(2*pi*f*t) ;% Quadrature component
Y_in=[Y_in Y1]; % inphase signal vector
Y_qd=[Y_qd Y2]; %quadrature signal vector
Y=[Y Y1+Y2]; % modulated signal vector
end
Tx_sig=Y; % transmitting signal after modulation
tt=T/99:T/99:(T*length(Bits))/2;
subplot(3,2,2)
plot(tt,Y_in,'r'), grid on;
title( 'Inphase component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt)');
subplot(3,2,3)
plot(tt,Y_qd,'g'), grid on;
title(' Quadrature component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt)');
subplot(3,2,4)
plot(tt,Tx_sig,'r'), grid on;
title('QPSK modulated signal');
xlabel('time(sec)');
ylabel(' amplitude(volt)');
% QPSK demodulation
Rx_data=[];
Rx_sig=Tx_sig; % Received signal\
for(i=1:1:length(Bits)/2)
%%XXXXXX inphase coherent dector XXXXXXX
Z_in=Rx_sig((i-1)*length(t)+1:i*length(t)).*cos(2*pi*f*t);
% above line indicat multiplication of received & inphase carred signal
  
Z_in_intg=(trapz(t,Z_in))*(2/T);% integration using trapezoidal rule
if(Z_in_intg>0) % Decision Maker
Rx_in_data=1;
else
Rx_in_data=0;
end
  
%%XXXXXX Quadrature coherent dector XXXXXX
Z_qd=Rx_sig((i-1)*length(t)+1:i*length(t)).*sin(2*pi*f*t);
%above line indicat multiplication ofreceived & Quadphase carred signal
  
Z_qd_intg=(trapz(t,Z_qd))*(2/T);% integration using trapezoidal rule
if (Z_qd_intg>0)% Decision Maker
Rx_qd_data=1;
else
Rx_qd_data=0;
end
  
  
Rx_data=[Rx_data Rx_in_data Rx_qd_data]; % Received Data vector
end
subplot(3,2,5)
stem(Rx_data,'r','linewidth',3)
title('Information after Receiveing ');
grid on;

Result:

Enter bit stream to be modulated : [1 0 1 1 0 1 1 0 0 1]

MATLAB CODE FOR BER

clc;
clear all;
close all;
%for the values of SNR in dB for 0 to 10
snr_db=0:10;
snr=10.^(snr_db/10);

qpsk = (1/2)*erfc(sqrt(snr));
%Plotting all the BER curves in semilog graph
semilogy(snr_db,qpsk);
xlabel('Eb/No in dB');
ylabel('SNR in dB');
title('BER Analysis QPSK ');


Related Solutions

we mentioned that different coherent modulations schemes, like amplitude shift keying(ASK), phase-shift keying(PSK), and quadrature amplitude...
we mentioned that different coherent modulations schemes, like amplitude shift keying(ASK), phase-shift keying(PSK), and quadrature amplitude modulation(QAM), can be used to modulate OFDM carriers. however, there is an exception: Why frequency-shift keying(FSK) can not be used inOFDM applications?
Define the meaning of the "Probability of error" and the "Bit Error Rate(BER). Briefly describe their...
Define the meaning of the "Probability of error" and the "Bit Error Rate(BER). Briefly describe their relationship.
Q3) The goal of this question is to explore the impact of bit error rate (BER)...
Q3) The goal of this question is to explore the impact of bit error rate (BER) on the packet error for multihop wireless networks. Assume a packet of size 512 bytes is transmitted across intermediate nodes until reaching its destination. Assume a communication channel has bit error rate (BER) = 10^-5. What is the probability of packet receiving incorrectly over 50 links?
a) Mobile industry opted to use PSK (phase shift keying) over FSK (frequency shift keying). Explain...
a) Mobile industry opted to use PSK (phase shift keying) over FSK (frequency shift keying). Explain the benefits of PSK over FSK. b) Mobile phones are using quadruple PSK or higher order(s) of PSK. Discuss their throughput capability with a case example of the latest model. c) Explain the differences between diffraction and refraction in electromagnetic wave propagations.
. A continuously operating coherent Binary Phase Shift Keying (BPSK) system is made by an engineer....
. A continuously operating coherent Binary Phase Shift Keying (BPSK) system is made by an engineer. He claims that it is having an average error probability of 10-5. The system produced 1000 errors in a day when tested with a data rate of 1000 bits/s and the single-sided noise power spectral density is No=10-10 W/Hz. He also claim that the system is capable of maintaining the error rate even if the received power is as low as 10-6 W. Do...
A continuously operating coherent Binary Phase Shift Keying (BPSK) system is made by an engineer. He...
A continuously operating coherent Binary Phase Shift Keying (BPSK) system is made by an engineer. He claims that it is having an average error probability of 10-5. The system produced 1000 errors in a day when tested with a data rate of 500 bits/s and the single-sided noise power spectral density is     No=10-10 W/Hz. He also claim that the system is capable of maintaining the error rate even if the received power is as low as 10-6 W. Do you...
make 4 bit universal shift register in vhdl plz include the test bench. I will rate
make 4 bit universal shift register in vhdl plz include the test bench. I will rate
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT