Bit Error Rate Performance of 64-PSK in AWGN Channel

advertisement
1
DIGITAL COMMUNICATION SYSTEM
Page | 1Page | 1
Bit Error Rate Performance of 64-PSK in AWGN
Channel
2015
2
COMSATS Institute of Information Technology
Project Report
BY
Mr. Danial Ali
(DDP-FA12-BTE-016)
Mr. Sheraz Saleem
(DDP-FA12-BTE-110)
Mr. Muhammad Junaid Khalid
(DDP-SP12-BTE-048)
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
Project Supervisor
Engr.Jaweria Amjad
Lecturer
EE-Department
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
3
Abstract
The increase in multimedia services on mobile wireless
communication has resulted in great advancement of the wireless
communication field in the recent times. One of the widely used
techniques is digital modulation technique which allows digitized
data to be carried or transmitted via the analog radio frequency
(RF) channels. The data transfer rate should be maximum for
uninterruptable communication. But with high rate there is
greater probability of error. We emphasize on the error
probability of Mary PSK modulation techniques in Additive
White Gaussian Noise (AWGN) Channel.
4
CONTENTS
1
INTRODUCTION
1.1
Background Information
5
1.1.1 M-ARY PSK
6
2
SOFTWARE IMPLEMENTATION
2.1
Message Signal Construction
7
2.2
64 – PSK Modulation
8
2.3
AWGN Channel Effect
9
2.4
Demodulation
10
2.5
Bit Error Rate (BER) Calculation
15
3
RESULTS
16
4
CONCLUSION
18
5
REFERENCES
18
6
APPENDIX
6.1
source code
19
5
INTRODUCTION
1.1 Background Information
In a digital communication system, the source information is normally represented as a
baseband (low-pass) signal. Because of signal attenuation, it is necessary to move the baseband
signal spectrum to reside at a much higher frequency band centered at fc, called the carrier
frequency, in the radio spectrum (Modulation). At the receiver end, the demodulation process
removes the carrier frequency to recover the baseband information signal. Block diagram of
digital communication system using AWGN channel is shown below:
Figure 1.Digital Communication System Block Diagram
Digital modulation techniques can be listed as:
Figure 2.Digital Modulation Techniques
In this project, we will examine Bit Error Rate performances of 64-PSK signals in AWGN
channels.
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
6
1.1.1 M-ARY PSK
In this modulation type, the information is encoded in the phase of the transmitted signal.
The motivation behind M-PSK is to increase the bandwidth efficiency of the PSK modulation
schemes. In BPSK, a data bit is represented by a symbol. In M-PSK, n = log2M data bits are
represented by a symbol, thus the bandwidth efficiency is increased to n times.
The M-PSK signal constellation is therefore two-dimensional. The constellation diagram
of 64-PSK is shown below:
Figure 3.Constellation Diagram of 64-PSK (General)
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
7
SOFTWARE IMPLEMENTATION
2.1) Message Signal Construction
Random Binary Bits:
Binary bits are converted to decimal and packaged 6 by 6 to simulate 64-ary modulation
schemes.
Function binary to decimal
%% Conversion from binary to decimal
function y=binarytodecimal(x)
y=zeros(length(x)/6,1);
for i=1:(length(x)/6)
m=6*i-5;
y(i)=32*x(m,1)+16*x(m+1,1)+8*x(m+2,1)+4*x(m+3,1)+2*x(m+4,1)+1*x(m+5,1);
end
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
8
2.2) 64 – PSK MODULATION
Modulated signals are obtained by constructing modpsk64 function:
Function Modulation
function m_psk=modpsk64(x)
%%modulation
M=64;
% Es/N0 range in dB for simulation , since M-PSK is a symbol modulation
we will use EsN0dB for generating proper AWGN noise
% I and Q branch
I = 1/sqrt(2)*cos((x-1)/M*2*pi);
Q = 1/sqrt(2)*sin((x-1)/M*2*pi);
% Mapping I and Q to one M-PSK symbol
m_psk = (I+1i*Q); %M-PSK Mapping
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
9
2.3) AWGN Channel Effect
Function Adding Noise
function noised=addnoise(x,EbN0dB)
EsN0dB = EbN0dB+10*log10(3);
%%noise
for a=EsN0dB,
%Adding noise
EsN0lin = 10.^(a/10)
%Converting Es/N0 dB value to linear scale
noiseSigma = 1/sqrt(2)*sqrt(1/(2*EsN0lin));%Standard deviation for
AWGN Noise
%Creating a complex noise for adding with M-PSK modulated signal
%Noise is complex since M-PSK is in complex representation
noise = noiseSigma*(randn(length(x),1)+1i*randn(length(x),1));
noised = x + noise;
end
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
10
2.4) Demodulation
function y=demodpsk64(x)
M=64;
%%demodulation
s_i=zeros(1,M);s_q=zeros(1,M);
for i=1:1:M
s_i(i)= 1/sqrt(2)*cos((i-1)/M*2*pi);
s_q(i)= 1/sqrt(2)*sin((i-1)/M*2*pi);
end
r_i = real(x);
r_q = imag(x);
% Decision
r_i_repmat = repmat(r_i,1,M);
r_q_repmat = repmat(r_q,1,M);
distance = zeros(length(r_i),M); %place holder for distance metric
minDistIndex=zeros(length(r_i),1);
for j=1:1:length(r_i)
% Distance computation
distance(j,:) = sqrt((r_i_repmat(j,:)-s_i).^2+(r_q_repmat(j,:)-s_q).^2);
%capture the index in the array where the minimum distance occurs
[temp,minDistIndex(j)]=min(distance(j,:));
end
y = minDistIndex; %The index becomes the demodulated symbol
end
Function Decimal to Binary
%% Conversion from decimal to binary
function y=decimaltobinary(x)
y=zeros(length(x),1);
for k=1:length(x)
m=6*k-5;
if x(k)==0
y(m:m+5)=[0 0 0 0 0 0];
end
if x(k)==1
y(m:m+5)=[0 0 0 0 0 1];
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
11
if x(k)==2
y(m:m+5)=[0
end
if x(k)==3
y(m:m+5)=[0
end
if x(k)==4
y(m:m+5)=[0
end
if x(k)==5
y(m:m+5)=[0
end
if x(k)==6
y(m:m+5)=[0
end
if x(k)==7
y(m:m+5)=[0
end
if x(k)==8
y(m:m+5)=[0
end
if x(k)==9
y(m:m+5)=[0
end
if x(k)==10
y(m:m+5)=[0
end
if x(k)==11
y(m:m+5)=[0
end
if x(k)==12
y(m:m+5)=[0
0 0 0 1 0];
0 0 0 1 1];
0 0 1 0 0];
0 0 1 0 1];
0 0 1 1 0];
0 0 1 1 1];
0 1 0 0 0];
0 1 0 0 1];
0 1 0 1 0];
0 1 0 1 1];
0 1 1 0 0];
end
if x(k)==13
y(m:m+5)=[0 0 1 1 0 1];
end
if x(k)==14
y(m:m+5)=[0 0 1 1 1 0];
end
if x(k)==15
y(m:m+5)=[0 0 1 1 1 1];
end
if x(k)==16
y(m:m+5)=[0 1 0 0 0 0];
end
if x(k)==17
y(m:m+5)=[0 1 0 0 0 1];
end
if x(k)==18
y(m:m+5)=[0 1 0 0 1 0];
end
if x(k)==19
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
12
y(m:m+5)=[0 1 0 0 1 1];
end
if x(k)==20
y(m:m+5)=[0 1 0 1 0 0];
end
if x(k)==21
y(m:m+5)=[0 1 0 1 0 1];
end
if x(k)==22
y(m:m+5)=[0 1 0 1 1 0];
end
if x(k)==23
y(m:m+5)=[0 1 0 1 1 1];
end
if x(k)==24
y(m:m+5)=[0 1 1 0 0 0];
end
if x(k)==25
y(m:m+5)=[0 1 1 0 0 1];
end
if x(k)==26
y(m:m+5)=[0 1 1 0 1 0];
end
if x(k)==27
y(m:m+5)=[0 1 1 0 1 1];
end
if x(k)==28
y(m:m+5)=[0 1 1 1 0 0];
end
if x(k)==29
y(m:m+5)=[0 1 1 1 0 1];
end
if x(k)==30
y(m:m+5)=[0 1 1 1 1 0];
end
if x(k)==31
y(m:m+5)=[0 1 1 1 1 1];
end
if x(k)==32
y(m:m+5)=[1 0 0 0 0 0];
end
if x(k)==33
y(m:m+5)=[1 0 0 0 0 1];
end
if x(k)==34
y(m:m+5)=[1 0 0 0 1 0];
end
if x(k)==35
y(m:m+5)=[1 0 0 0 1 1];
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
13
end
if x(k)==36
y(m:m+5)=[1 0 0 1 0 0];
end
if x(k)==37
y(m:m+5)=[1 0 0 1 0 1];
end
if x(k)==38
y(m:m+5)=[1 0 0 1 1 0];
end
if x(k)==39
y(m:m+5)=[1 0 0 1 1 1];
end
if x(k)==40
y(m:m+5)=[1 0 1 0 0 0];
end
if x(k)==41
y(m:m+5)=[1 0 1 0 0 1];
end
if x(k)==42
y(m:m+5)=[1 0 1 0 1 0];
end
if x(k)==43
y(m:m+5)=[1 0 1 0 1 1];
end
if x(k)==44
y(m:m+5)=[1 0 1 1 0 0];
end
if x(k)==45
y(m:m+5)=[1 0 1 1 0 1];
end
if x(k)==46
y(m:m+5)=[1 0 1 1 1 0];
end
if x(k)==47
y(m:m+5)=[1 0 1 1 1 1];
end
if x(k)==48
y(m:m+5)=[1 1 0 0 0 0];
end
if x(k)==49
y(m:m+5)=[1 1 0 0 0 1];
end
if x(k)==50
y(m:m+5)=[1 1 0 0 1 0];
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
14
end
if x(k)==51
y(m:m+5)=[1 1 0 0 1 1];
end
if x(k)==52
y(m:m+5)=[1 1 0 1 0 0];
end
if x(k)==53
y(m:m+5)=[1 1 0 1 0 1];
end
if x(k)==54
y(m:m+5)=[1 1 0 1 1 0];
end
if x(k)==55
y(m:m+5)=[1 1 0 1 1 1];
end
if x(k)==56
y(m:m+5)=[1 1 1 0 0 0];
end
if x(k)==57
y(m:m+5)=[1 1 1 0 0 1];
end
if x(k)==58
y(m:m+5)=[1 1 1 0 1 0];
end
if x(k)==59
y(m:m+5)=[1 1 1 0 1 1];
end
if x(k)==60
y(m:m+5)=[1 1 1 1 0 0];
end
if x(k)==61
y(m:m+5)=[1 1 1 1 0 1];
end
if x(k)==62
y(m:m+5)=[1 1 1 1 1 0];
end
if x(k)==63
y(m:m+5)=[1 1 1 1 1 1];
end
end
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
15
2.5 Bit Error Rate (BER) Calculation
As the name implies, a bit error rate is defined as the rate at which errors occur in a
transmission system. This can be directly translated into the number of errors that occur in a
string of a stated number of bits. The definition of bit error rate can be translated into a simple
formula:
Bit error rate (BER) is a parameter which gives an excellent indication of the
performance of a data link. It is necessary to balance all the available factors to achieve a
satisfactory bit error rate.
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
16
3 RESULTS
When adding noise in the channel we purpose the following Constellation diagram.
Figure 4.Constellation Diagram of 64-PSK (Initial)
Figure 5.Constellation Diagram of 64-PSK (Final)
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
17
Figure 6.BER performance
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
18
4 CONCLUSION
In this project, we examined BER performances of 64-PSK modulation. We learnt
theoretical background of M-PSK. Then we implement to MATLAB as well. BPSK has
following specification such as:
High data rate
High spectral efficiency (minimum bandwidth occupancy)
High power efficiency (minimum required transmit power)
Low power/cost implementation
5 REFERENCES
[1] Kangkan Thakuria, “Analysis of Bit Error Rate of different M-ary PSK
Modulation Schemes in AWGN Channel”
[2] Andrea Goldsmith, “Wireless Communications”, Cambridge University
[3] Vineet Sharma, “BER performance of OFDM-BPSK,-QPSK,- QAM over
AWGN channel using forward Error correcting code”
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
19
6
APPENDIX
6.1
source code
clear all;
close all;
clc;
%% Random Data Construction
N=100002;
% Number of binary bits
bindata = randi([0 1],N,1);
%% Encoding
decdata=binarytodecimal(bindata); % Data is converted to decimal
%%64 PSK Modulation
PSK=modpsk64(decdata);% PSK signal is obtained
%% AWGN Channel Effect
Z=34;
BE1=zeros(Z,1);
for k= 1:Z
EbNo=k/2;
noisypsk=addnoise(PSK,EbNo);
scatterplot(noisypsk);
%% Demodulation
demodulatedPSK=demodpsk64(noisypsk);
%% Decoding
decodedPSK=decimaltobinary(demodulatedPSK);
%% Bit Error Rate Calculation
for j=1:N
if (bindata(j)==decodedPSK(j))
BE1(k)=BE1(k);
else BE1(k)=BE1(k)+1;
end
end
end
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
20
%% BER Plotting
EBNO=0.5:0.5:Z/2;
% Matlab function berawgn is used to control our results.
ber1 = berawgn(EBNO,'psk',64,'nondiff');
figure;
%Plot simulated & Theoretical BER
semilogy(EBNO,BE1/N,'r-o');
hold on;
semilogy(EBNO,ber1,'b');
ylabel('Bit Error Rate');
xlabel('EbNo');
legend('Simulation','Theoretical',1);
hold off;
Department of Electrical Engineering
COMSATS Institute of Information Technology, Lahore Pakistan
Download