# MATLAB代做-python代做-FPGA代做-QPSK

### 时间：2019-5-6 21:58:05 点击：

核心提示：MATLAB代做-python代做-FPGA代做-QPSK ...
close all
clear all

global ack0 de sg dur

format short e;

l1=5000;
l2=7;
rate=1/2;
len=104;
EN_u2r=-10:5:20;
EN_u2b=0;
EN_r2b=20;
ber=zeros(1,l2);
per=ber;
throughput=ber;
for i=1:l2
i
er=0;
err=0;
dur=0;
for j=1:l1
ack0=0;
sg=0;
de=1;
u=round(rand(1,len));
ue=UE(u);
[h_u2b,noise_u2b]=rayleigh_channel(ue,EN_u2b);
[h_u2r,noise_u2r]=rayleigh_channel(ue,EN_u2r(i));
sr_u2r=ue*h_u2r+noise_u2r;
sr_u2b=ue*h_u2b+noise_u2b;
en=eNodeB(sr_u2b,0,h_u2b,0,rate);
if ack0==0
rn=RN(sr_u2r,h_u2r);
if de==1
sg=1;
[h_r2b,noise_r2b]=rayleigh_channel(rn,EN_r2b);
sr_r2b=rn*h_r2b+noise_r2b;
en=eNodeB(sr_u2b,sr_r2b,h_u2b,h_r2b,rate);
end
er=er+length(find(en(1:len)~=u));
c0=check_crc(en);
if c0==0
err=err+1;
end
end
end
ber(i)=er/(len*l1)
per(i)=err/l1
throughput(i)=2*(l1-err)/dur
end

figure(1)
semilogy(EN_u2r,ber,'g*-');
grid on;

figure(2)
semilogy(EN_u2r,per,'r*-');
grid on;

figure(3)
plot(EN_u2r,throughput,'b*-');
grid on;

QQ ：1224848052

Tags:QPSK

• 百度搜索