Professional Documents
Culture Documents
REPORT
FOUR LEVEL QUADRATURE AMPLITUDE
MODULATION (4-QAM)
HaNoi, 09/11/2016
1
Table of Contents
I. Introduction ..................................................................................................................................... .3
II. Definition............................................................................................................................................ 3
1. QAM ..................................................................................................................................................... 3
2. Four level QAM (4-QAM) ................................................................................................................... 3
III. 4-QAM Modulation ......................................................................................................................... 4
IV. 4-QAM Demodulation...................................................................................................................... 7
V. 4-QAM Modulation/Demodulation simulation (using Matlab) .................................................... 7
1.Code ....................................................................................................................................................... 7
2. Result .................................................................................................................................................. 10
VI. Bit error rate (BER) ...................................................................................................................... 11
1. BER theory ......................................................................................................................................... 11
2. BER simulation using Matlab and comparing with theory................................................................. 13
VII. Signal error rate ........................................................................................................................... 15
1. SER theory. ......................................................................................................................................... 15
2. SER simulation by using Matlab and comparing with theory ............................................................ 17
VIII. CONCLUSION ........................................................................................................................... 19
2
I. Introduction
With the fast development of modern communication techniques, the demand
for reliable high date rate transmission is increased significantly, which stimulate much
interest in modulation techniques. Different modulation techniques allow you to send
different bits per symbol and thus achieve different throughputs or efficiencies. QAM
is one of widely used modulation techniques because of its efficiency in power and
bandwidth. In QAM system, two amplitude-modulated (AM) signals are combined into
a single channel, there by doubling the effective bandwidth.
The QAM is one of the adaptive modulation techniques that are commonly used for
wireless communications. Different order modulations allow sending more bits per symbol
and thus achieving higher throughputs or better spectral efficiencies. This method of
modulation has the advantage of reducing or eliminating intermodulation interference
caused by a continuous carrier near the modulation sidebands.
II. Definition
1. QAM
Quadrature amplitude modulation (QAM) is both an analog and a digital
modulation scheme. It conveys two analog message signals, or two digital bit streams, by
changing the amplitudes of two carrier waves, using the amplitude-shift keying (ASK)
digital modulation scheme or amplitude modulation (AM) analog modulation scheme
These two 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 resulting waveform is a combination
of both phase-shift keying (PSK) and amplitude-shift keying, or in the analog case 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.
These combinations are shown as the white dots on the constellation plot in Figure
2.1.4 The red lines represent the phase and amplitude transitions from one symbol to
another. Labeled on the constellation plot is the digital bit pattern that each symbol
represents. Thus, a digital bit pattern can be sent over a carrier signal by generating
unique combinations of phase and amplitude.
The QAM modulation scheme encodes data by varying both amplitude and phase
of the carrier signal. Thus, it is sometimes viewed as a combination of ASK and PSK
modulation. A more fundamental way of viewing QAM thought is that it encodes data by
varying the amplitude of two carrier signals that are in-quadrature (phase difference of
90). Mathematically, 4-ary QAM is described by
( ) = cos(2 + )
20 20
( ) = cos(2 t) cos(2 t)
= cos(2 ) sin(2 )
20 20
Where = = cos() = = sin()
Using the complex In the case of a QAM square constellation, the pairs of
coordinates from a square matrix as shown by:
( + 1, 1) ( + 3, 1) . ( 1, 1)
( + 1, 3) ( + 3, 3) ( 1, 3)
. . .
{ , } =
. . .
. . .
[( + 1, + 1) ( + 3, + 1) ( 1, + 1)]
Where =
(1,1) (1,1)
{ , } = [ ]
(1, 1) (1, 1)
Using the complex envelope notation, a 4 level QAM constellation was used
to represent the combinational pairs of binary values.
5
Figure 3.1 4 level QAM constellation
First the flow of bits to be transmitted is split into two equal parts: this process
generates two independent signals to be transmitted. They are encoded separately just like
they were in an amplitude-shift keying (ASK) modulator. Then one channel (the one "in
phase") is multiplied by a cosine, while the other channel (in "Quadrature") is multiplied
by a sine. This way there is a phase of 90 between them. They are simply added one to the
other and sent through the real channel.
6
IV. 4-QAM Demodulation
clc;
clear all;
close all;
M=4;
%M=input(' enter the value of M array for QAM modulation : ');
fprintf('\n\n\n');
%XXXXXXXXXXXXXXXXXXXXXXXXXXX input chaking loop XXXXXXXXXXXXXXXXXXXXXXXXXX
Ld=log2(M);
ds=ceil(Ld);
dif=ds-Ld;
if(dif~=0)
error('the value of M is only acceptable if log2(M)is an integer');
end
7
x=msg;
bp=.000001; % bit period
bit=[];
for n=1:1:length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
figure(1)
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
% binary information convert into symbolic form for 4-array QAM modulation
M=M; % order of QAM modulation
msg_reshape=reshape(msg,log2(M),nbit/log2(M))';
disp(' information are reshaped for convert symbolic form');
disp(msg_reshape);
fprintf('\n\n');
size(msg_reshape);
for(j=1:1:nbit/log2(M))
for(i=1:1:log2(M))
a(j,i)=num2str(msg_reshape(j,i));
end
end
as=bin2dec(a);
ass=as';
figure(1)
subplot(3,1,2);
stem(ass,'Linewidth',2.0);
title('serial symbol for 4-array QAM modulation at transmitter');
xlabel('n(discrete time)');
ylabel(' magnitude');
ax=qamdemod(gt,M);
figure(3);
subplot(2,1,1);
stem(ax,'linewidth',2);
title(' re-obtain symbol after 4-array QAM demodulation ');
xlabel('n(discrete time)');
ylabel(' magnitude');
bi_in=dec2bin(ax);
[row col]=size(bi_in);
p=1;
for(i=1:1:row)
for(j=1:1:col)
re_bi_in(p)=str2num(bi_in(i,j));
p=p+1;
end
9
end
disp('re-obtain binary information after 4-array QAM demodulation');
disp(re_bi_in')
fprintf('\n\n');
10
Figure 5.2 4 level QAM Constellation
1 3
= 2 (1 ) ( )
1 0
So
= 1 (1 )2
The bit-error rate depends on the bit to symbol mapping, but for 1 and a
0
Gray-coded assignmentso that we can assume each symbol error causes only one
bit error- the bit-error rate is approximately
12
4 1 3
= (1 ) ( )
1
1 0
2
Since the carriers are independent, the overall bit error rate is the same as the
per-carrier error rate, just like BPSK and QPSK.
=
An exact and general closed-form expression of the Bit Error Rates (BER) for
rectangular type of Quadrature Amplitude Modulation (QAM) over AWGN and slow,
flat, Rician fading channels were derived analytically. Consider a (LM)-QAM
system with 2. 2 levels and 2. 2 levels in the I-channel and Q-channel,
respectively and a two-dimensional grey code mapping employed. The generalized
expression for the conditional BER on SNR over AWGN channel is
2 2
1
(|) = ( ( |) + ( |))
(
2 . )
=1 =1
Where
(121 )1
.21
2 |
| 21 1 6
( |) = (1) 1
. (2 [ + ]) [(2 + 1) 2 ]
2 ( + 2 2)
=0
13
rxsig = txsig*exp(1i*pi/180); % Static phase offset of 1 degree
% Step 5. Use the semianalytic function.
% Specify the receive filter as a pair of input arguments.
% In this case, num and den describe an ideal integrator.
num = ones(Nsamp,1)/Nsamp;
den = 1;
EbNo = 0:20; % Range of Eb/No values under study
ber = semianalytic(txsig,rxsig,'qam',M,Nsamp,num,den,EbNo);
Result
14
From figure, we see that the simulation results and calculation theory are almost
same.
symbols to 1, assuming that all the constellation points are equally likely.
(1 + ) (1 + )
2 2
(1 ) (1 )
2 2
Assuming that the additive noise follows the Gaussian probability distribution
function,
()2
1 0
() = 22 2 with = 0 and 2 =
2
2
( )
1 2
(|2 ) = 0
0
15
Figure 7.1 Probability density function for 4QAM modulation
As can be seen from the above figure, the symbol 2 is decoded correctly only if y
falls in the area in the hashed region i.e.
( |2 ) = (>0 |2 )(>0 |2 )
0
( )2
1 2 1
(>0 |2 ) = 1 0 = 1 ( )
0 2 20
2 2
Where the complementary error function, () =
0
( )2
1 2 1
(>0 |2 ) = 1 0 = 1 ( )
0 2 20
2
1
( |2 ) = [1 ( )]
2 20
16
2 1
= [1 ( ) + 2 ( )]
2 2 4 0 2 0
1
= 1 ( ) + 2 ( )
20 4 20
Hence, the total symbol error probability: the symbol will be in error, it at least one of the
symbol is decoded incorrectly. The probability of symbol error is,
= 1 ( |2 )
1
= 1- [1 ( ) + 2 ( )]
20 4 20
1
= ( ) 2 ( )
20 4 20
clear
N = 10^5; % number of symbols
Es_N0_dB = [-3:20]; % multiple Eb/N0 values
ipHat = zeros(1,N);
for ii = 1:length(Es_N0_dB)
ip = (2*(rand(1,N)>0.5)-1) + j*(2*(rand(1,N)>0.5)-1); %
s = (1/sqrt(2))*ip; % normalization of energy to 1
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white guassian noise, 0dB
variance
% demodulation
y_re = real(y); % real
y_im = imag(y); % imaginary
ipHat(find(y_re < 0 & y_im < 0)) = -1 + -1*j;
ipHat(find(y_re >= 0 & y_im > 0)) = 1 + 1*j;
ipHat(find(y_re < 0 & y_im >= 0)) = -1 + 1*j;
ipHat(find(y_re >= 0 & y_im < 0)) = 1 - 1*j;
17
nErr(ii) = size(find([ip- ipHat]),2); % couting the number of errors
end
simSer_4QAM = nErr/N;
theorySer_4QAM = erfc(sqrt(0.5*(10.^(Es_N0_dB/10)))) -
(1/4)*(erfc(sqrt(0.5*(10.^(Es_N0_dB/10))))).^2;
close all
figure
semilogy(Es_N0_dB,theorySer_4QAM,'b.-');
hold on
semilogy(Es_N0_dB,simSer_4QAM,'mx-');
axis([-3 15 10^-5 1])
grid on
legend('theory-4QAM', 'simulation-4QAM');
xlabel('Es/No, dB')
ylabel('Symbol Error Rate')
title('Symbol error probability curve for 4-QAM')
Result
VIII. CONCLUSION
This report has detailed our implementation of the complete Four Level
Quadrature Amplitude Modulation. We simulated 4-QAM modulation/demodulation
techniques by using Matlab. Also, Matlab is used to evaluate the performance of 4- QAM
technique through plotting the Bit Error Rate (BER) vs Signal Error Rate (SER). Our
results match the theoretical values exactly.
19
REFERENCES
20