Sie sind auf Seite 1von 5

Experiment-1

Analysis of BER for M-ary PSK with Rayleigh fading channel with
AWGN
Aim: Analyze the BER for the M-ary PSK Using Matlab/Simulink for Rayleigh fading with
AWGN.
Software used: Matlab
Objective of the experiment:

To understand the effect of the fading environment for different M-ary PSK schemes with
different levels of AWGN.

Theory:
Modulation:
Modulation is a process by which a carrier signal is altered according to information in a
message signal. The carrier frequency, denoted F c, is the frequency of the carrier signal. The
sampling rate is the rate at which the message signal is sampled during the simulation. The frequency
of the carrier signal is usually much greater than the highest frequency of the input message signal.

Digital modulation Techniques:


Binary Phase Shift Keying signal (BPSK)

In carrier-phase modulation, the information that is transmitted over a communication


channel is impressed on the phase of the carrier. Since the range of the carrier phase is 0
2, the carrier phases used to transmit digital information via digital-phase modulation are
m=2m/M, for m=0,1,2..,M-1.Thus for binary phase modulation(M=2), the two carrier phase
are 0 =0 and 1 = radian. For M-array phase modulation=2k, where k is the number of
information bits per transmitted symbol.
The general representation of a set of M carrier-phase-modulated signal waveforms is
um (t) = AgT(t) cos(2fct+2m/M) , m=0,1,,M-1
Where, gT(t) is the transmitting filter pulse shape, which determines the spectral
characteristics of the transmitted signal, and A is the signal amplitude. This type of digital phase
modulation is called phase-shift-keying.

Quadrature Phase Shift Keying (QPSK) Modulation


Quadrature Phase Shift Keying (QPSK) is the digital modulation technique. Quadrature
Phase Shift Keying (QPSK) is a form of Phase Shift Keying in which two bits are modulated at
once, selecting one of four possible carrier phase shifts (0, /2, , and 3/2). QPSK perform by
changing the phase of the In-phase (I) carrier from 0 to 180 and the Quadrature-phase (Q)
carrier between 90 and 270. This is used to indicate the four states of a 2-bit binary code. Each
state of these carriers is referred to as a Symbol.
QPSK perform by changing the phase of the In-phase (I) carrier from 0 to 180 and the
Quadrature-phase (Q) carrier between 90 and 270. This is used to indicate the four states of a
2-bit binary code. Each state of these carriers is referred to as a Symbol. Quadrature Phase-shift
Keying (QPSK) is a widely used method of transferring digital data by changing or modulating
the phase of a carrier signal.
Signal point constellations for M=2, 4 and 8 are illustrated in figure.

Algorithm:
Generate the random sequence of numbers between 0 to M-1.
Modulate the random data
Generate Rayleigh fading channel

Pass the modulated data through the generated channel


Add AWGN with various SNR to the output of the channel
Demodulate the received data.
Find BER for all the SNR values and plot semi-log graph SNR vs BER for all SNR
values.

Matlab Program:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%Simulation of BPSK in rayleigh fading with AWGN%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all
clear all
clc
snr=-5:1:10;
lsn=length(snr);
M=2;
% Generating data
t_data=randi([0 M-1],100000,1);
% modulating data
mod_data = pskmod(t_data,M);
h=rayleighchan (1/100000,10);
changain1=filter(h,ones(size(t_data)));
a=max(max(abs(changain1)));
changain1=changain1./a;
chan_data = changain1.*mod_data;
%chan_data = filter(h,mod_data);
no_of_error=zeros(1,lsn);
ratio=zeros(1,lsn);
no_of_error_1=zeros(1,lsn);
ratio_1=zeros(1,lsn);
for ii=1:lsn

chan_awgn = awgn(chan_data,snr(ii),'measured'); % awgn addition


no_chan_awgn=awgn(mod_data,snr(ii),'measured');
chan_awgn =a*chan_awgn./changain1; % assuming ideal channel estimation
demod_Data = pskdemod(chan_awgn,M);

%demodulating the data

[no_of_error(ii),ratio(ii)]=biterr(t_data,demod_Data) ; % error rate


calculation
demod_Data_1 = pskdemod(no_chan_awgn,M);

%demodulating the data

[no_of_error_1(ii),ratio_1(ii)]=biterr(t_data,demod_Data_1) ; % error rate


calculation
End
% plotting the result
semilogy(snr,ratio,'--*b','linewidth',2);
hold on;
EbN0Lin = 10.^(snr/10);
theoryBer_rf = 0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1)));
theoryBer = 0.5*erfc(sqrt(10.^(snr/10)));
semilogy(snr,theoryBer_rf,'--or','linewidth',2);
semilogy(snr,theoryBer,'--og','linewidth',2);
semilogy(snr,ratio_1,'--om','linewidth',2);
legend('Rayleigh simulted','Rayleigh theoritical','Only AWGN Theoritical','
only AWGN simulated')
grid on
xlabel('SNR');
ylabel('BER')
title('Bit error probability curve for BPSK');

Plots:

Result:

Das könnte Ihnen auch gefallen