Académique Documents
Professionnel Documents
Culture Documents
2
OBJECT : To Simulate QAM Modulation and Demodulation
EQUIPMENTS:
THEORY :
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 (modulation) 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 (ASK), 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 carrier signal is constant.
Transmitter: The following block diagram shows the ideal structure of a QAM transmitter, with a
carrier frequency f0 and the frequency response of the transmitter’s filter Ht:
Receiver :The receiver simply performs the inverse process of the transmitter. If’s ideal
structure is shown in the picture below with Hr the receive filter’s frequency response:
Multiplying by a cosine (or a sine) and by a low pass filter it is possible to extract the component
in phase (or in quadrature). Then there is only an ASK demodulator and the two flows of data
are merged back.
PROCEDURE :
OBSERVATION :
MATLAB CODE :
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
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 M-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 M-array QAM modulation at transmitter');
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
end
disp('re-obtain binary information after M-array QAM demodulation');
disp(re_bi_in')
fprintf('\n\n');
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
figure(3)
subplot(2,1,2);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('receiving information as digital signal after M-array QAM
demoduation');
In BPSK we deal individually with each bit of duration Tb. In QAM we lump three bits
together to form a symbol .the symbol can have any one of eight possible values
corresponding to a three-bit sequence. We, therefore, arrange to make available for
transmission eight distinct signals. At the receiver, each signal represents one symbol and
correspondingly three bits. When Bits are transmitted, As BPSK, the signal changes occur
at the bit rate. When symbols are transmitted the changes occur at the symbol rate, which is
one- third, the bit rate, thus the symbol Time is ts = 3tb.