-
. z.
- 对应的波形信号
end
% 串并转换,将奇偶位数据分开
idata=datanrz(1:ml:(nb-1)); % 将奇偶位分开,因此间隔m1为2
qdata=datanrz(2:ml:nb);
% QPSK信号的调制
for i=1:nb/2
ich(2*((i-1)/delta_T+1):2*(i/delta_T))=idata(i);
end
for ii=1:N/T
a(ii)=(1/sqrt(2))*cos(2*pi*fc*t(ii));
end
idata1=ich.*a; % 奇数位数据与余弦函数相乘,得到一路的调制信号
for j=1:nb/2
qch(2*((j-1)/delta_T+1):2*(j/delta_T))=qdata(j);
end
for jj=1:N/T
b(jj)=(1/sqrt(2))*sin(2*pi*fc*t(jj));
end
qdata1=qch.*b;% 偶数位数据与余弦函数相乘,得到另一路的调制信号
st = idata1 - qdata1;
%%%%%%%%%%%%%%%%%%%%%%%%信道中
SNR=0; % 信噪比
stn = awgn(st,SNR);
%%%%%%%%%%%%%%%%%%%%%%%解调%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%设计滤波器%%%%%%%%
[B,A] = butter(3,,'low');
[h1,w] = freqz(B,A);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%相干解调
ist = stn .* a;
p =length(ist)
qst = stn .* (-b);
%%%%%%%%%%%%%%%%%%%%滤波
istl = filter(B,A,ist);
qstl = filter(B,A,qst);
%%%%%%%%%%%%%%%%%%%%%%%%%抽样判决%%%%%%%%%%
for i = 1 : nb/2
-
. z.
- - -
- z -
if istl(2*(p/nb)*(i-1)+(1*(p/nb))) >= 0
in(i) = 1;
else in(i) = 0;
end
if qstl(2*(p/nb)*(i-1)+(1*(p/nb))) >= 0
qn(i) = 1;
else qn(i) = 0;
end
end
%%%%%%%%%%%%%%%%%并串转换
for i = 1 : nb/2
y(2*i-1) = in(i);
y(2*i) = qn(i);
end
for i = 1 : nb
yy((i-1)/delta_T+1:i/delta_T) = y(i);
end
data
y
N
figure;
subplot(4,1,1)
plot(data0*),title('基带信号,4096维二进制序列,对应向量是data0');
subplot(4,1,2)
plot(data1*),title('双极性信号,4096维双极性序列,对应向量是data1');
subplot(4,1,3)
plot(ich*),title('I路数据,4096维双极性序列,对应向量是ich');
subplot(4,1,4)
plot(qch*),title('Q路数据,4096维双极性序列,对应向量是qch ');
figure;
subplot
太原理工大学无线网络通信技术实验报告 来自淘豆网m.daumloan.com转载请标明出处.