Professional Documents
Culture Documents
Comparison Study of M-Qam On Digital Radio Communication
Comparison Study of M-Qam On Digital Radio Communication
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
II
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Declaration
We hereby declare that we carried out the work reported in this report in the Department of
Electrical Engineering, Debre Berhan University, under the supervision of Mr. Feyiisa Endibu.
We solemnly declare that to the best of my knowledge, no part of this report has been submitted
here or elsewhere in a previous application for award of a degree. All sources of knowledge used
have been duly acknowledged.
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Approval
This is to certify that the project titled “comparison study of M-QAM digital modulation on radio
communication” carried out by give Tekalegn,Degnet,Gossa and Abel has been read and
approved for meeting part of the requirements and regulations governing the award of the
Bachelor of Science in Electrical and Computer Engineering (Communication).
Name of Advisor:- Feyissa Endebu
Signature Date
Name of Examiners: 1
Signature Date
2
Signature Date
3
Signature Date
I
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Acknowledgement
For our document and progress of the thesis to arrive at its final stage, many individuals give us
their forwarding contribution from the beginning.
We express our deep sense of gratitude and sincere thanks to school of Electrical and Computer
engineering for giving such an opportunity and for its contribution to specific implement
material.
We would like to express our special thanks of gratitude to Mr. Feyissa and Mr. Gebeyaw and all
of our instructors for their valuable recommendations and gave us the golden opportunity to do
this wonderful project on the topic comparison study of M-QAM digital modulation on radio
communication which also helped us in doing a lot of research and we came to know about so
many new things.
We express our sincere gratitude to our project guide Mr. Feyissa for sparing valuable time in
giving information and suggestions all through, for successful completion of the project the way
it is by now. Last but not least, we want to thank our communication class meat friends who
treasured us for our hard work and encouraged us and finally to God who made all the things
possible for giving help and patience in going such hard time.
II
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Abstract
All type of signal in air is analog in nature, so we have to analysis this signal. This means
message signal travels with carrier frequencies that are analog in nature. So we have to analysis
the carrier frequencies parameter like amplitude, phase, and carrier frequencies that are in analog
nature. Knowing this, for the signal to transfer from transmitter part to the receiver it has to be
modulated. QAM is a massive technology used for the transfer of data at high data rate. This
project concerns on the comparison of M-QAM for the digital radio application. We mainly
focus on digital QAM for high data transfer rate. We also want to see which type of QAM
modulation is applicable for a given area and conditions. This project presents a performance
evaluation approach using the BER Tool module provided under matlab or Simulink software
package. It compares different Quadrature Amplitude Modulation (QAM) techniques at different
bit rates (8, 16, 32, 64, 128, and 256) based on the Bit Error Rate (BER) versus the Ratio of Bit
Energy to Noise Power Spectral Density (Eb/No).
III
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Table of Contents
Declaration...................................................................................................................................................I
Approval.......................................................................................................................................................I
Acknowledgement.......................................................................................................................................II
Abstract......................................................................................................................................................III
List of figure................................................................................................................................................V
List of abbrivation......................................................................................................................................VI
CHAPTER ONE..........................................................................................................................................1
1. INTRODUCTION...............................................................................................................................1
1.1 Back ground......................................................................................................................................1
1.2 Statement of problem.....................................................................................................................1
1.3 Objective.......................................................................................................................................2
1.4 Methodology Used in this Project....................................................................................................2
1.5 Motivation.....................................................................................................................................3
1.6 Scope and Limitation of the Project...................................................................................................4
1.7 Organization of the Project............................................................................................................4
CHAPTER TWO.........................................................................................................................................5
LITERATURE REVIEW........................................................................................................................5
2. Introduction....................................................................................................................................5
2.1 Review of modulations......................................................................................................................5
2.2 Types of QAM................................................................................................................................8
2.3 Performance measurement of modulation techniques.................................................................9
2.3.1 Data rate.....................................................................................................................................9
2.3.2 Bit error rate (BER)..................................................................................................................10
2 .4 Application of QAM...................................................................................................................10
CHAPTER THREE...................................................................................................................................11
3. SYSTEM MODEL AND ANALYSIS..............................................................................................11
3.1 System model..............................................................................................................................11
3.2 QAM modulator basics................................................................................................................11
3.3 QAM demodulator basics............................................................................................................13
3.4 System analysis............................................................................................................................13
CHAPTER FOUR.....................................................................................................................................16
IV
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
List of figure
V
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
List of abbrivation
VI
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
VII
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
CHAPTER ONE
1. INTRODUCTION
1
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
1.3 Objective
Our methods of work are organized and accomplished through a sequence of stages. Prior to all,
we have reviewed related literatures.
Analysis and Interpretation of the results: which modulation technique has a high bit error
rate on the basis of noise will be explain based on the result.
2
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
1.5 Motivation
The main reason to drop our eye on the comparison study of M-QAM is the greatest concern of
transmission systems on data rate. Since we need high data rate at efficient conditions QAM is
the main advantageous modulation technique. We also know that now a day's band width
(frequency spectrum) is the main concern in communication system. So the motivation for the
use of quadrature amplitude modulation comes from the fact that a straight amplitude modulated
signal, i.e. double sideband even with a suppressed carrier occupies twice the bandwidth of the
modulating signal. This is very wasteful of the available frequency spectrum. QAM restores the
balance by placing two independent double sideband suppressed carrier signals in the same
spectrum as one ordinary double sideband suppressed carrier signal.
3
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
It is significant to know that this project is only compare based on BER and cannot be compared
on transmitting power and other else.
4
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
CHAPTER TWO
LITERATURE REVIEW
2. Introduction
A tremendous technological transformation during the last two decades has provided a potential
growth in the area of digital communication and lot of newer applications and technologies are
coming up every day due to these reasons. Restricting our self to the domain of modulation
techniques a brief overview over different analog and digital modulation techniques has been
provided in this article through extensive literature survey in graph enabling to analyze and
establish the superiority at a glance of a specific modulation technique for a particular
application[7].
The main objective of our work is to measure Bit Error Rate with different modulation schemes
and come to the best configuration to achieve better utilization of bandwidth. they studied
existing configurations with analog and digital modulation techniques and compared the results
and Propose a high BER digital radio communication technique.
5
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
the first form of modulation to be used to broadcast sound, and although other forms of
modulation are being increasingly used, amplitude modulation is still in widespread use.
Frequency modulation (FM): This form of modulation varies the frequency in line
with the modulating signal. Frequency modulation has the advantage that, as amplitude
variations do not carry any information on the signal, it can be limited within the receiver
to remove signal strength variations and noise. As a result is form of modulation has been
used for many applications including high quality analogue sound broadcasting.
Phase modulation,(PM): As the name indicates, phase modulation varies the phase of
the carrier in line with the modulating signal. Phase modulation and frequency modulation
have many similarities and are linked - one is the differential of the other. However phase
modulation lends itself to data transmissions, and as a result its use has grown rapidly over
recent years[5].
1. Binary phase shift keying (BPSK)- is also called 2-QAM in which the phase of the RF
carrier is shifted 180 degree in accordance with a digital bit stream. A “one” causes a phase
transition, and a “zero” does not produce a transition. In BPSK modulator, phase of carrier is
varied represent binary 1 or 0. Both peak amplitudes remain constant as phase changes. For
example, if we start a phase of o degree to represent binary „1‟, then we can change the phase to
180 degree to send binary ‘0’.
2. Quadrature phase shift keying (QPSK)- It is also called 4-QAM. In this type of
modulation the binary bit stream or massage signal is pass through line coding like bipolar NRZ
signal represent at binary values 0 and 1 respectively then multiplied with two term real
and imaginary carrier signal carry the information bit stream.
3. Amplitude shift keying (ASK)-In ASK modulator level of amplitude can be used to
represent binary logic 0s and 1s.Wecan think of carrier signal as an ON or OFF Switch. In
modulated signal logic 0 is represented by the absence of carrier, thus giving
6
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
OFF/ON keying operation and hence the name given mathematically equation of ASK.
4. Frequency shift keying (FSK) -In frequency shift keying, the frequency of carriers
shifted according to the binary symbol. The phase of carrier is unaffected. That is we have to
different frequency signals according to binary symbols. Let there be a frequency shift by ohms.
In this figure we show here the two frequencies are use carry the symbol or binary bit .
suppose, we consider here the one frequency that ids carry binary bit „1‟ and second frequency
carry the symbol the „0‟.input bits that in form of 0 and 1 carry the both frequencies without any
interference and get modulated .carrier signal carry the signals in phase.
QAM is also a special type of amplitude modulation ,i.e. double sideband even with a
suppressed carrier occupies twice the bandwidth of the modulating signal. This is very wasteful
of the available frequency spectrum. QAM restores the balance by placing two independent
double sideband suppressed carrier signals in the same spectrum as one ordinary double sideband
suppressed carrier signal. In digital communications this arrangement is popular. It is used
because of its bandwidth conserving (and other) properties.
QAM is a signal in which two carriers shifted in phase by 90 degrees are modulated and the
resultant output consists of both amplitude and phase variations. In view of the fact that both
amplitude and phase variations are present it may also be considered as a mixture of amplitude
and phase modulation.
It is not used for multiplexing two independent messages. Given an input binary sequence
(message) at the rate of n bit/s, two sequences may be obtained by splitting the bit stream into
two paths, each of n/2 bit/s. This is a kind to a serial-to-parallel conversion. Because of the
halved rate the bits in the I and Q paths are stretched to twice the input sequence bit clock period.
The two messages are recombined at the receiver, which uses a QAM-type demodulator. The
two bit streams would typically be band limited and/or pulse shaped before reaching the
modulator.
I. Analog QAM
7
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
QAM is both an analog and a digital modulation scheme. It conveys two analog message signals,
or two digital messages, by changing (modulating)the amplitudes of two carrier waves, using the
amplitude-shift keying (ASK) digital modulation scheme or amplitude modulation (AM) analog
modulation scheme. The two carrier waves, usually sinusoids, are out of phase with each other
by 90° and are thus called quadrature carriers or quadrature components, hence the name of the
scheme. The modulated waves are summed, and the final waveform is a combination of both
phase-shift keying (PSK) and amplitude-shift keying (ASK), or in the analog case is a
combination of phase modulation (PM) and amplitude modulation. In the digital QAM case, a
finite number of at least two phases and at least two amplitudes are used. PSK modulators are
often designed using the QAM principle, but are not considered as QAM since the amplitude of
the modulated carrier signal is constant. QAM is used extensively as a modulation scheme for
digital telecommunication systems. Arbitrarily high spectral efficiencies can be achieved with
QAM by setting a suitable constellation size, limited only by the noise level and linearity of the
communications channel.
1) Analog QAM
The analogue versions of QAM are typically used to allow multiple analogue signals to be
carried on a single carrier. For example it is used in PAL and NTSC television systems, where
the different channels provided by QAM enable it to carry the components of chromatic or color
information. Here the different channels enable the two channels required for stereo to be carried
on the single carrier.
2) Digital QAM
Digital formats of QAM are often referred to as "Quantized QAM" and they are being
increasingly used for data communications often within radio communications systems. when
used for digital transmission for radio communications applications is able to carry higher data
rates than ordinary amplitude modulated schemes and phase modulated schemes. As with phase
shift keying, etc, the number of points at which the signal can rest, i.e. the number of points on
the constellation is indicated in the modulation format description, e.g. 16QAM uses a 16 point
constellation. Radio communications systems ranging from cellular technology as in the case
8
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
of LTE through wireless systems including WiMAX, and Wifi use a variety of forms of QAM,
and the use of QAM will only increase within the field of radio communications.
When using QAM, the constellation points are normally arranged in a square grid with equal
vertical and horizontal spacing and as a result the most common forms of QAM use a
constellation with the number of points equal to a power of 2 i.e. 4, 16, 64. As there are
advantages and disadvantages of using QAM it is necessary to compare QAM with other
modulation techniques modes. Some radio communications systems dynamically change the
modulation scheme dependent upon the link conditions and requirements - signal level, noise,
data rate required, etc.
9
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
or synchronization errors. The BER can be estimated from following Equation. The BER gives
the upper limit for the signal because some degradation occurs at the receiver end [5].
2
−Q
exp ( )
1 Q 2
BER= ercf ( )≈
2 √2 Q √2 π
The bit error rate or bit error ratio (BER) is the number of bit errors divided by the total number
of transferred bits during a studied time interval. BER is a unit less performance measure, often
expressed as a percentage. The bit error probability (Pe) is the expectation value of the BER.The
BER can be considered as an approximate estimate of the bit error probability. This estimate is
accurate for a long time interval and a high number of bit errors. In a communication system, the
receiver side BER may be affected by transmission channel noise interference, distortion, bit
synchronization problems, attenuation, wireless multipath fading, etc. In a noisy channel, the
BER is often expressed as a function of the normalized carrier-to-noise ratio measure denoted
Eb/N0, (energy per bit to noise power spectral density ratio), or Es/N (energy per modulation
symbol to noise spectral density).
2 .4 Application of QAM
Quadrature Amplitude Modulation has been adopted by most wireless communication standards
such as WiMAX and LTE. It provides higher bit rates and consequently higher spectral
efficiencies. It is usually used in conjunction with Orthogonal Frequency Division Multiplexing
(OFDM) which provides a simple technique to overcome the time varying frequency selective
channel. Eg. 256 QAM is used in DVB(digital video broadcasting) and 4096 QAM may be used
as C2(cable two).
10
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
CHAPTER THREE
The two resultant signals are summed and then processed as required in the RF signal chain,
typically converting them in frequency to the required final frequency and amplifying them as
required. It is worth noting that as the amplitude of the signal varies any RF amplifiers must be
linear to preserve the integrity of the signal. Any non-linearity’s will alter the relative levels of
the signals and alter the phase difference, thereby distorting he signal and introducing the
possibility of data errors.
11
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Transmitter Receiver
12
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
The basic modulator assumes that the two quadrature signals remain exactly in quadrature. A
further requirement is to derive a local oscillator signal for the demodulation that is exactly on
the required frequency for the signal. Any frequency offset will be a change in the phase of the
local oscillator signal with respect to the two double sideband suppressed carrier constituents of
the overall signal.
Recovering the phase of the carrier is important otherwise the bit error rate for the data will be
compromised.
The Signal constellation parameter defines the constellation by listing its points in a length-M
vector of complex numbers. constellation diagram can be rectangular or non-rectangular.
13
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Note in the figures above, M represents the size of the Signal constellation.
14
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
15
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
CHAPTER FOUR
In moving to a higher order QAM constellation (higher data rate and mode) in hostile RF /micro
wave QAM application environments, such as in broadcasting or telecommunication, multipath
interference typically increases. There is a spreading of the spots in the constellation, decreasing
the separation between adjacent states, making it difficult for the receiver to decode the signal
appropriately. In other words, there is reduced noise immunity. There are several test parameter
measurements which help determine an optimal QAM mode for a specific operating
environment. The following three are most significant:
carrier/interference ratio
carrier to noise ratio
Threshold-to-noise ratio
So in using M-QAM choosing constellation points is a key concept in modulation under noisy
environment. choosing 'M' depends on the environment and data rate. Under air turbulence
environment using high order QAM will cause high interference because the constellation points
are close to each other. The closeness of the constellation points causes to the discarded frames
even if due to one bit error. So if the environment is highly turbulence using lower order QAM
will be profitable for digital radio communications. But if the medium is highly sustainable to
environment using high order QAM will give us a high data rate transmission with suitable BER.
Her is the BER compression of M-QAM.
As we can see from the above the BER increases with order(M) assuming minimum air
turbulence environment. Since Digital radio uses digital modulation using high order QAM will
give us a high data rate in a given EbNo.
16
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Let’s see the signal conselltation M-QAM for any value of M with (M=2^n) .
17
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
when we create a 32-QAM scatter plot for example the constellation points will increase to
32.Which is complex than the previous. But it will have higher data rate.
During constellation of M-QAM as the number of constellation points increases the error
probability will also increase under noisy environment.
Let's also have a random signal so that it computes the BER for integer values of EbNo between
0 and 7. BER Tool solves the problem by managing a series of simulations with different values
of Eb/N0, collecting the results, and creating a plot. You provide the core of the simulation, which
in this case is a minor modification of the example in .modulating random signal.
18
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
As declared above the two controversial ideas in modulation are noise and data rate. Let's have
the program to compute the BER of QAM in MATLAB. Since we are considering a noisy
environment as the number of constellation points increases the error probability also increases.
19
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
20
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
CHAPTER FIVE
Our results show that the throughput of the system is increased when transmitting more bits per
symbol.
This increase in throughput comes at the expense of higher BER which can be mitigated by
increasing the energy per bit to noise power spectral density ratio of the system. It is clear that
there has to be a compromise between higher throughput, higher BER, and the energy output.
(Although it requires signal processing in both domain, it has similar properties to the
conventional beam forming algorithms BER decrease with the number of constellation points,
data rate increases as number of symbol increases.
This project presents a performance evaluation approach using the BER Tool module provided
under matlab or Simulink software package. It compares different Quadrature Amplitude
Modulation (QAM) techniques at different bit rates (8, 16, 32, 64, 128, and 256) based on the Bit
Error Rate (BER) versus the Ratio of Bit Energy to Noise Power Spectral Density (Eb/No). The
paper provides a detailed model built in Simulink to simulate the QAM techniques along with
the results of the performance analysis. Analysis of the impact of variations in the different
model parameters on the resulting error rate in the transmitted data has been conducted as well.
The motivation for this paper is to review, model, and simulate the QAM technique at its various
bit rates using the Matlab/Simulink. Also, this paper serves an educational purpose for
researchers in the wireless communication field or related topics by illustrating a step-by-step
approach to build the model and simulate the system using the Matlab/Simulink in conjunction
with the BER Tool used for performance analysis to evaluate different QAM wireless
communication techniques. The resulting bit error rate from the simulation at the different QAM
transmission rates (8 to 256) showed the variation of the error values for each bit rate versus
different noise power spectral densities (Eb/No). Also, the results show a comparison between
the resulting transmission errors in the received signal at different noise or Eb/No levels. Since
Eb/N0 is defined as the ratio of bit energy per symbol to noise power spectral density, in decibels,
then increasing this ratio should result in less overall transmission errors and decreasing this ratio
should result in higher transmission error. This illustrates how the model captures the variation
21
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
of the signal power to the power of the applied noise during the transmission process. Also, the
model simulates the impact of changing the power of the transmitted signal on the generated
Noise Variance by the Additive White Gaussian Noise (AWGN) generator. The simulation
illustrates that as the power of the transmitted signal increases, the error rate increases too as a
result of the logic implemented in the AWGN generator which in turn increases the noise
component imposed to the transmitted signal.
Recommendation
Based on our results, it is important to further investigate the implementation of high order
QAM. Our results show that further investigation is needed to determine the practicality
implementing M-QAM in radio communication. In the future we will add empirical models to
the simulation. This will allow us to examine the performance of M-QAM in the presence of
intereference. Additionally, we will to add harwar implementation Of M-QAM in addition to
MATLAB.
22
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
REFERENCE
[1]. www.google .com
[2].Digital communication fundamentals second edition
[3].Bateman, A,,”Digital communications Design for the real world”,Addison
Weley(1999)
[4].Chan Kyu Kim, Kwangchun Lee and Yong Soo Cho(Vol. 46,
23
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
Appendax
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<
ANALOG MODULATION
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
M = 8;
x = [0:M-1];
y = modulate(modem.qammod('M',M,'SymbolOrder','Gray'),x);
24
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
M = 32;
x = [0:M-1];
y = modulate(modem.qammod(M),x);
scale = modnorm(y,'peakpow',1);
y = scale*y; % Scale the constellation.
scatterplot(y); % Plot the scaled constellation.
% Include text annotations that number the points.
hold on; % Make sure the annotations go in the same figure.
for jj=1:length(y)
text(real(y(jj)),imag(y(jj)),[' ' num2str(jj-1)]);
end
hold off;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
25
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
%% Bit-to-Symbol Mapping
% Convert the bits in x into k-bit symbols.
xsym = bi2de(reshape(x,k,length(x)/k).','left-msb');
%% Stem Plot of Symbols
% Plot first 10 symbols in a stem plot.
stem(x(1:10),'filled');
%% Channel
% Send signal over an AWGN channel.
EbNo = 10; % In dB
snr = EbNo + 10*log10(k) - 10*log10(nsamp);
ynoisy = awgn(ytx,snr,'noise');
%% Received Signal
yrx = ynoisy;
% Create a scatter plot;
% Create scatter plot of noisy signal and transmitted
% signal on the same axes.
h = scatterplot(yrx(1:nsamp*5e3),nsamp,0,'g.');
hold on;
scatterplot(ytx(1:5e3),1,0,'k*',h);
26
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
title('Received Signal');
legend('Received Signal','Signal Constellation');
axis([-5 5 -5 5]); % Set axis ranges.
hold off;
% Demodulate signal using 16-QAM.
zsym = demodulate(modem.qamdemod(M),yrx);
%% Symbol-to-Bit Mapping
% Undo the bit-to-symbol mapping performed earlier.
z = de2bi(zsym,'left-msb'); % Convert integers to bits.
% Convert z from a matrix to a vector.
z = reshape(z.',numel(z),1);
%% BER Computation
% Compare x and z to obtain the number of errors and
% the bit error rate.
[number_of_errors,bit_error_rate] = biterr(x,z);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Comparison of m-qams
EbN0dB=0:1:24;
EbN0lin=10.^(EbN0dB/10);
colors={'b-*','g-o','r-h','c-s','m-d','y-*','k-p','b-->','g:<','r-.d'};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),'b-*');
set(plotHandle,'LineWidth',1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
27
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),'g-o');
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),'r-h');
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b,1)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),'c-s');
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),'m-d');
set(plotHandle,'LineWidth',1.5);
index=index+1;
semilogy(EbN0dB,Pb);
28
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
legend('BPSK','QPSK','8-PSK','16-PSK','32-PSK','D-BPSK','D-QPSK','4-QAM','16-QAM','64-
QAM');
axis([0 25 -8 0]);
set(gca,'XTick',0:2:25);
%re-name axis accordingly
ylabel('Probability of BER Error - log10(Pb)');
xlabel('Eb/N0 (dB)');
title('Probability of BER Error log10(Pb) Vs Eb/N0');
grid on;
end
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<
FIGER 4.4
%% Range of variables
Mvec = [4 8 16 32];% the values of M to consider;
EbNovec=[0:7];% values of EbNo to consider
%% Preallocate space for results.
number_of_errors = zeros(length(Mvec),length(EbNovec));
bit_error_rate = zeros(lengtSh(Mvec),length(EbNovec));
%% Simulation loops
foridxM = 1:length(Mvec)
foridxEbNo = 1:length(EbNovec)
x=[4 8 16 32];
z=rand(1,6);%random error computation
Mvec=16;
EbNovec=7;
end % End of loop over EbNo values
end % End of loop over M values
M = Mvec(idxM); % Size of signal constellation
EbNo = EbNovec(idxEbNo); % In dB
%% BER Computation
29
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
EbN0dB=0:1:24;
30
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
EbN0lin=10.^(EbN0dB/10);
colors={'b-*','g-o','r-h','c-s','m-d','y-*','k-p','b--','g:<','r-.d'};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),'b-*');
set(plotHandle,'LineWidth',1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),'g-o');
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),'r-h');
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b,1)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),'c-s');
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
31
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),'m-d');
set(plotHandle,'LineWidth',1.5);
index=index+1;
semilogy(EbN0dB,Pb);
legend('BPSK','QPSK','8-PSK','16-PSK','32-PSK','D-BPSK','D-QPSK','4-QAM','16-QAM','64-
QAM');
axis([0 25 -8 0]);
set(gca,'XTick',-4:2:24);
%re-name axis accordingly
ylabel('Probability of BER Error - log10(Pb)');
xlabel('Eb/N0 (dB)');
title('Probability of BER Error log10(Pb) Vs Eb/N0');
grid on;
end
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
%BER probabikity of 16-QAM
M = 16; % M determine the size of signal constellation
k = log2(M); % k determine the number of bits per symbol
n = 3e4; % n determine the number of bits to process
nSyms = n/k; % nSyms represent the number of symbols
32
COMPARISON STUDY OF M-QAM ON DIGITAL RADIO COMMUNICATION
EbNo = 0:10; % In dB
SNR = EbNo + 10*log10(k);
rx = zeros(nSyms,length(SNR));
bit_error_rate = zeros(length(SNR),1);
for i=1:length(SNR)
rx(:,i) = awgn(tx,SNR(i),'measured');
end
rx_demod = demodulate(hDemod,rx);
for i=1:length(SNR)
bit_error_rate(i) = biterr(x,rx_demod(:,i));
end
theoryBer = 3/(2*k)*erfc(sqrt(0.1*k*(10.^(EbNo/10))));
figure;
semilogy(EbNo,theoryBer,'-',EbNo, bit_error_rate, '^-');
grid on;
legend('Theory BER', 'simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('Bit error probability curve for 16-QAM modulation');
33