Professional Documents
Culture Documents
Thunghiemcodebtl
Thunghiemcodebtl
d = randint(3,2000,[0 1]); % T?o chu?i các bit ng?u nhiên t??ng ?ng v?i các ký hi?u
h = modem.pskmod('M', 8, 'InputType', 'Bit'); % ?i?u ch? 8PSK
y = modulate(h, d); % T?o chu?i 8 ký hi?u 8PSK t??ng ?ng
t = 0:ts:30e-5;
s1 = zeros(1, length(t));
for l=1:length(t)% Vong lap bat dau thuc hien dieu che
s=0;
for k=1:100
a(k)=(t(l)-0.5*tsym-(k-1)*tsym)/tsym;
s=s+y(k)*sqrt((2*Es)/tsym)*rect(a(k));
end
s1(l)=s*exp(j*phi0);%tin hieu phat tuong duong bang goc
end
%Bieu dien tin hieu phat tuong duong bang goc 8PSK
figure
plot(t,real(s1),'r')
title('Dang tin hieu bang goc 8PSK')
xlabel('Time')
ylabel('Bien do')
grid on
axis([0 6e-5 -1500 1500])