Vous êtes sur la page 1sur 3

Université de Bordj Bou Arréridj Année Universitaire 2020/2021

Faculté ST
Département d’Electronique
Tp-03-04 CN L3-Télécommunications Pr. Khaled ROUABAH

Modulation MDP-4 (QPSK)


% Ce programme permet de moduler et de démoduler un signal informatif par une
modulation de phase MDP-4 / QPSK.

clc;
clear all;
close all;

% Génération d’une séquence binaire


x=randint(1,50);
% Bits impairs
x_imp=x(1:2:end);
% Bits pairs
x_pair=x(2:2:end);
% durée du bit
bp=1e-3;
% Mise en forme A pour le "0" et -A pour le "1"
A=1;
% Initialisation
Sig_inf=[];
Sig_inf_imp=[];
Sig_inf_pair=[];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Nombre d'échantillons par bit


N_1=100;
for n=1:length(x)
if x(n)==1;
niv_m=A*ones(1,N_1);
elseif x(n)==0;
niv_m=-A*ones(1,N_1);
end
Sig_inf=[Sig_inf niv_m];
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

N_1=100;
for n=1:length(x_imp)
if x_imp(n)==1;
niv_m=A*ones(1,N_1);
elseif x_imp(n)==0;
niv_m=-A*ones(1,N_1);
end
Sig_inf_imp=[Sig_inf_imp niv_m];
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Page 1 sur 3
Université de Bordj Bou Arréridj Année Universitaire 2020/2021
Faculté ST
Département d’Electronique
Tp-03-04 CN L3-Télécommunications Pr. Khaled ROUABAH

Modulation MDP-4 (QPSK)


N_1=100;
for n=1:length(x_pair)
if x_pair(n)==1;
niv_m=A*ones(1,N_1);
elseif x_pair(n)==0;
niv_m=-A*ones(1,N_1);
end
Sig_inf_pair=[Sig_inf_pair niv_m];
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Vecteur du temps
t1=(0:N_1*length(x)-1)*bp/N_1;
t=(0:N_1*length(x_pair)-1)*bp/N_1;

Sig_inf11=Sig_inf;

figure
subplot 311
% Représentation du signal codé NRZ,
stairs(t1,Sig_inf11,'LineWidth',2)
% ylabel('Amplitude (Volt)');
% xlabel('Temps en sec');
title('Signal émis','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');
axis([0 max(t1) -1.2 1.2])
grid

subplot 312
% Représentation des symboles impairs,
stairs(t,Sig_inf_imp,'LineWidth',2)
ylabel('Amplitude (Volt)','FontSize',12,'FontWeight','bold','FontName','Times
New Roman','Color','k');
% xlabel('Temps en sec');
title('Symboles b_k correspondant aux bits
impairs','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');
axis([0 max(t) -1.2 1.2])
grid

subplot 313
% Représentation des symboles pairs,
stairs(t,Sig_inf_pair,'LineWidth',2)
% ylabel('Amplitude (Volt)');
xlabel('Temps en sec','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');
title('Symboles a_k correspondant aux bits
pairs','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');

Page 2 sur 3
Université de Bordj Bou Arréridj Année Universitaire 2020/2021
Faculté ST
Département d’Electronique
Tp-03-04 CN L3-Télécommunications Pr. Khaled ROUABAH

Modulation MDP-4 (QPSK)


axis([0 max(t) -1.2 1.2])
grid

% taux de bit
Db=1/bp;
% Fréquence de la porteuse
fc=Db;

% Modulation
% Signal modulé
s_mod_imp_mod=Sig_inf_imp.*cos(2*pi*fc*t+pi/4);
s_mod_pair_mod=Sig_inf_pair.*sin(2*pi*fc*t+pi/4);

% Représentation du signal modulé


figure
subplot 311
% Résultat de la voie en phase
plot(t,s_mod_imp_mod,'r','lineWidth',2);
% ylabel('Amplitude (Volt)');
% xlabel('Temps en sec');
title('a(t)cos(w_0t+\phi_0)','FontSize',12,'FontWeight','bold','FontName','Tim
es New Roman','Color','k');
axis([0 max(t) -1.2 1.2])
grid

subplot 312
% Résultat de la voie en quadrature
plot(t,s_mod_pair_mod,'b','lineWidth',2);
ylabel('Amplitude (Volt)','FontSize',12,'FontWeight','bold','FontName','Times
New Roman','Color','k');
% xlabel('Temps en sec');
title('b(t)sin(w_0t+\phi_0)','FontSize',12,'FontWeight','bold','FontName','Tim
es New Roman','Color','k');
axis([0 max(t) -1.2 1.2])
grid

subplot 313
% Représentation du signal modulé
plot(t,(s_mod_pair_mod-s_mod_imp_mod),'k','lineWidth',2);
% ylabel('Amplitude (Volt)');
xlabel('Temps en sec','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');
title('Signal modulé MDP-
4','FontSize',12,'FontWeight','bold','FontName','Times New
Roman','Color','k');
axis([0 max(t) -1.7 1.7])
grid

Page 3 sur 3

Vous aimerez peut-être aussi