You are on page 1of 7

Q1

f1=20;
Um=1;
F=100;
fs=2000;
Ts=1/fs;
fc=F;
N=2000;
t=[0:Ts:(N-1)*Ts];
V1=1;
x=Um*cos(2*pi*f1*t);
V=V1*cos(2*pi*F*t);
k1p=1;
k2p=3;
k3p=5;
y1=pmmod(x,fc,fs,k1p);
y2=pmmod(x,fc,fs,k2p);
y3=pmmod(x,fc,fs,k3p);
figure(1);
plot(t,y1,'r',t,x);
axis([-0 0.1 0 1]);
grid;
legend('y1','x');

figure(2);
plot(t,y2,'r',t,x);
axis([-0 0.1 0 1]);
grid;
legend('y2','x');
figure(3);
plot(t,y3,'r',t,x)
axis([-0 0.1 0 1]);
grid;
legend('y3','x');
1

2
3

Q4
f1=20;
Um=1;
F=100;
fs=2000;
Ts=1/fs;
fc=F;
N=2000;
t=[0:Ts:(N-1)*Ts];
V1=1;
x=Um*cos(2*pi*f1*t);
V=V1*cos(2*pi*F*t);
k1p=1;
k2p=3;
k3p=5;
y1=pmmod(x,fc,fs,k1p);
y2=pmmod(x,fc,fs,k2p);
y3=pmmod(x,fc,fs,k3p);
Y1=fftshift(fft(y1)*Ts);
Y2=fftshift(fft(y2)*Ts);
Y3=fftshift(fft(y3)*Ts);
f=[-N/2:(N/2)-1];
figure(1);
plot(f,abs(Y1));
axis([-300 300 0 0.4]);
grid;
legend('Y1');
figure(2);
plot(f,abs(Y2));
axis([-300 300 0 0.25]);
grid;
legend('Y2');
figure(3);
plot(f,abs(Y3));
axis([-300 300 0 0.2]);
grid;
legend('Y3');
1

2
3

Q5
Ghalat*1/2

f1=20;
Um=1;
F=100;
fs=2000;
Ts=1/fs;
fc=F;
N=2000;
t=[0:Ts:(N-1)*Ts];
V1=1;
x=Um*cos(2*pi*f1*t);
V=V1*cos(2*pi*F*t);
k1p=1;
k2p=3;
k3p=5;
y1=pmmod(x,fc,fs,k1p);
y2=pmmod(x,fc,fs,k2p);
y3=pmmod(x,fc,fs,k3p);
Y1=fftshift(fft(y1)*Ts);
Y2=fftshift(fft(y2)*Ts);
Y3=fftshift(fft(y3)*Ts);
Z1=pmdemod(y1,fc,fs,k1p);
Z2=pmdemod(y2,fc,fs,k2p);
Z3=pmdemod(y3,fc,fs,k3p);

figure(1);
plot(t,Z1,'r',t,x);
axis([0 0.1 -2 2]);
grid;
legend('Z1','x')
figure(2);
plot(t,Z2,'r',t,x);
axis([0 0.1 -2 2]);
grid;
legend('Z2','x');
figure(3);
plot(t,Z3,'r',t,x);
axis([0 0.1 -2 2]);
grid;
legend('Z3','x')

1
2

PSK
t1=[0:0.0001:1];

f1=input('frequence de la porteuse=');

f2=input('frequence de modulant=');
A=input('amplitude de porteuse=');
x=A*sin(2*pi*f1*t1);
u=square(2*pi*f2*t1);
p=u .*x ;
plot(t1,p);
axis([0 0.1 -5 5]);
grid

frequence de la porteuse=100

frequence de modulant=50

amplitude de porteuse=5

You might also like