Guruh talabasi Abdisalomov



Yüklə 98,63 Kb.
tarix07.01.2024
ölçüsü98,63 Kb.
#209917
8-9-matlab


MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI













811-20 guruh talabasi Abdisalomov

Avazbekning raqamli aloqa fanidan

8-9-amaliy ishi
















Tekshirdi: Tashmetov Shaxzod


Raqamli aloqa faza siljishini boshqarish. Kvadratik faza siljishi manipulyatsiyasi
Kvadratik faza siljishi manipulyatsiyasi (QPSK) fazani almashtirishning bir shakli bo'lib, unda ikkita bit bir vaqtning o'zida modulyatsiya qilinadi va to'rtta mumkin bo'lgan tashuvchining fazali siljishidan (0, 90, 180 yoki 270 daraja) birini tanlaydi. QPSK signalni bir xil tarmoqli kengligidan foydalangan holda oddiy PSKga qaraganda ikki baravar ko'p ma'lumot uzatish imkonini beradi.


  1. rasm. QPSK modulatori

Modulyatorning kirishida xabar signalining juft bitlari (ya'ni, 2-bit, 4-bit, 6-bit va boshqalar) va toq bitlar (ya'ni, 1-bit, 3-bit, 5-bit va boshqalar) bitlarni ajratuvchi va toq BPSK (PSKI deb ataladi) va hatto BPSK (PSKQ deb ataladi) hosil qilish uchun bir xil tashuvchi bilan ko'paytiriladi. PSKQ signali modulyatsiyadan oldin faza 90 ° ga siljiydi.
Ikki bitli kirish uchun QPSK to'lqin shakli quyidagicha bo'lib, u ikkilik kirishlarning turli misollari uchun modulyatsiyalangan natijani ko'rsatadi.

QPSK demodulyatori
QPSK Demodulyatori mahalliy osilator, ikkita tarmoqli o'tish filtri, ikkita integrator sxemasi va ketma-ket konvertorga parallel ravishda 2 bitli ikkita mahsulot demodulyatori sxemasidan foydalanadi. Quyida xuddi shunday diagramma keltirilgan.

Demodulyatorning kirish qismidagi ikkita mahsulot detektori bir vaqtning o'zida ikkita BPSK signalini demodulyatsiya qiladi. Bitlar juftligi bu erda asl ma'lumotlardan tiklanadi. Ushbu signallar qayta ishlangandan so'ng, parallel ravishda ketma-ket konvertorga uzatiladi.

Task (1-variant)


Matlab kodi (8-ish):


clear all
clf
char=double ('PENCIL')
Ac=1;
As=Ac
fc=1.5;
first_data=0
a (1:2)=first_data;
t1(1:2)=[0,1];
i=3;
for cc=1:length(char)
for n=0:2:7
bit_n=bitshift(char(cc),-n);
a(i:i+1) = bitand(bit_n,3);
t1(i) = (i-1)/2;
t1(i+1) = t1(i)+1;i=i+2;
end; end


for j=1:length(char)*20000+4999
t2(j)=j/5000;
i=floor(t2(j)*2+1);
c(j)=Ac*sin(2*pi*fc*t2(j));
s(j)=Ac*sin(2*pi*fc*t2(j)+a(i)*pi/2+pi/4);
end


subplot(4,1,1);
plot(t1,a);
subplot(4,1,2);
plot (t2,c);
subplot (4,1,3);
plot (t2,s,'.');


last_data=first_data;
buff_data=first_data
time_c=1;
rec_data(1:2)=first_data;
rec_time (1:2)=[first_data,1];
rec_c=3;
for j=4:length(s)
if t2(j)>time_c-0.2
if abs (s(j-1)-s(j-2))>Ac*0.1
change_point=t2(j-1)
buff_data=get_data(s(j-3:j),last_data);
else
if abs (s(j-2))s(j)||s(j-3)>s(j-2)&&s(j-1)
change_point=t2(j)
buff_data=get_data(s(j-3:j),last_data);
end; end; end


if t2(j)>time_c
last_data=buff_data
rec_data(rec_c:rec_c+1)=last_data;
rec_time(rec_c:rec_c+1)=[time_c, time_c+1];
time_c=time_c+1;
rec_c=rec_c+2;
end
end


subplot(4,1,4);
plot(rec_time,rec_data)
function res=get_data (s,last_data)
degree2=asin(double(s(2)))/pi*180;
degree3=asin(double(s(3)))/pi*180;
if s(2)>s(1)
if degree2<0 degree2=360+degree2; end
else
if degree2>0 degree2=180-degree2;
else degree2=abs (180-degree2); end
end
if s(4)>s(3)
if degree3<0 degree3=360+degree3;end
else
if degree3>0 degree3=180-degree3;
else degree3=abs (180-degree3); end
end
degree2=degree2-last_data*90;
degree3=mod(degree3-degree2,360);
res=round (degree3/90); end



Matlab kodi (9-ish):


clear all
char=double(input('Binary letter codes for the first letter of your name : '));
Ac=1;
As=Ac
fc=1.5;
first_data=0
a (1:2)=first_data;
t1(1:2)=[0,1];
i=3;
for cc=1:length(char)
for n=0:2:7
bit_n=bitshift(char(cc),-n);
a(i:i+1) = bitand(bit_n,3);
t1(i) = (i-1)/2;
t1(i+1) = t1(i)+1;i=i+2;
end; end


for j=1:length(char)*20000+4999
t2(j)=j/5000;
i=floor(t2(j)*2+1);
c(j)=Ac*sin(2*pi*fc*t2(j));
s(j)=Ac*sin(2*pi*fc*t2(j)+a(i)*pi/2+pi/4);
end


subplot(4,1,1);
plot(t1,a);
subplot(4,1,2);
plot (t2,c);
subplot (4,1,3);
plot(t2,s,'.');


last_data=first_data;
buff_data=first_data;
time_c=1;
rec_data(1:2)=first_data;
rec_time (1:2)=[first_data,1];
rec_c=3;
for j=4:length(s)
if t2(j)>time_c-0.2
if abs (s(j-1)-s(j-2))>Ac*0.1
change_point=t2(j-1);
buff_data=get_data(s(j-3:j),last_data);
else
if abs (s(j-2))s(j) || s(j-3)>s(j-2) && s(j-1)
change_point=t2(j);
buff_data=get_data(s(j-3:j),last_data);
end; end; end


if t2(j)>time_c
last_data=buff_data;
rec_data(rec_c:rec_c+1)=last_data;
rec_time(rec_c:rec_c+1)=[time_c, time_c+1];
time_c=time_c+1;
rec_c=rec_c+2;
end
end


subplot(4,1,4);
plot(rec_time,rec_data)
function res=get_data (s,last_data)
degree2=asin(double(s(2)))/pi*180;
degree3=asin(double(s(3)))/pi*180;
if s(2)>s(1)
if degree2<0 degree2=360+degree2; end
else
if degree2>0 degree2=180-degree2;
else degree2=abs (180-degree2); end
end
if s(4)>s(3)
if degree3<0 degree3=360+degree3;end
else
if degree3>0 degree3=180-degree3;
else degree3=abs(180-degree3); end
end
degree2=degree2-last_data*90;
degree3=mod(degree3-degree2,360);
res=round (degree3/90); end

Binary letter codes

A: 01000001.

Binary letter codes
A: 01000001.

Yüklə 98,63 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin