资源简介

16QAM 升余弦 高频载波 AWGN信道 最佳接收

资源截图

代码片段和文件信息

%% 16QAM接收端,先运行发送程序
clc;
%% AWGN信道

ebn0=3;                                                        % Eb/N0
spow=sum(transmit.*transmit)/length(transmit);                  
attn=0.5*spow*10.^(-ebn0/10);
attn=sqrt(attn);
inoise=randn(1length(transmit)).*attn;                         % 白噪声

receive=transmit+inoise;                                        %通过AWGN信道的接收信号

%% 分两路乘正交高频载波

%载波调制
rc_length=length(receive);

t=0:rc_length-1;
rc_Q=receive .* sin(2*pi*fc*t/f);
rc_I=receive .* cos(2*pi*fc*t/f);

%减采样后根升余弦匹配滤波,注意对齐采样点
down_Q=downsample([0 rc_Q]f/fs);
down_I=downsample(rc_If/fs);
low_Q_rcos=conv(down_Qflt);
low_I_rcos=conv(down_Iflt);

%两次根升余弦滤波延迟,定位初始信号位置
%delay+1:end-delay-1
delay=3*R*2;
rc_Q_seq=(downsample(low_Q_rcos(delay+1:end-delay-1)R));
rc_I_seq=(downsample(low_I_rcos(delay+1:end-delay-1)R));       %类型转换

%两路信号输出
%IQ>2               3
%0%-2%IQ<=-2            -3
dec_Q=(rc_Q_seq>2)*3+((rc_Q_seq<=2).*(rc_Q_seq>0))-((rc_Q_seq<=0).*(rc_Q_seq>-2))-(rc_Q_seq<=-2)*3;
dec_I=(rc_I_seq>2)*3+((rc_I_seq<=2).*(rc_I_seq>0))-((rc_I_seq<=0).*(rc_I_seq>-2))-(rc_I_seq<=-2)*3;

%% 并串转换

%最高位为1情况是Q=1 && Q==3,余类似
b1=(dec_Q==1)+(dec_Q==3);
b2=(dec_Q==1)+(dec_Q==-1);
b3=(dec_I==1)+(dec_I==3);
b4=(dec_I==1)+(dec_I==-1);

%译码输出
decode=reshape([b1;b2;b3;b4]1data_len);

%星座图
plot(seq_Qseq_I‘.‘);
axis([-5 5 -5 5]);
hold;
plot([-5:5]zeros(111));
xlabel(‘Q‘)ylabel(‘I‘);
title(‘发送星座图‘);
figure;
plot(rc_Q_seqrc_I_seq‘.‘);
axis([-5 5 -5 5]);
hold;
plot([-5:5]zeros(111));
xlabel(‘Q‘)ylabel(‘I‘);
title(‘接收星座图‘);

%误码
error=sum(abs(decode-seq));
errorrate=error/data_len;
fprintf(‘误比特数\t\t%d\t\n‘error);
fprintf(‘误比特率\t\t%e\t\n‘errorrate);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      70312  2009-12-15 21:25  16_QAM\fft.jpg

     文件       1904  2009-12-15 20:59  16_QAM\QAM_RX.m

     文件       1433  2009-12-15 21:20  16_QAM\QAM_TX.m

     文件     141147  2009-12-15 21:25  16_QAM\wave-local.jpg

     文件      82512  2009-12-15 21:25  16_QAM\wave-total.jpg

     文件      32924  2009-12-15 20:54  16_QAM\发送星座图.jpg

     文件     223900  2009-12-15 20:54  16_QAM\接收星座图.jpg

     文件      80384  2009-12-15 15:39  16_QAM\系统框图.vsd

     目录          0  2009-12-29 22:52  16_QAM

----------- ---------  ---------- -----  ----

               634516                    9


评论

共有 条评论