16qam调制、接收、眼图、误码率曲线matlab仿真

  • Post author:
  • Post category:其他


MQAM (Multiple Quadrature Amplitude Modulation) 多进制正交幅度调制。4相相位键控信号其实也是一种二电平正交振幅键控。如果将二电平振幅键控进一步发展为多电平(例如4、8、16电平等)正交振幅键控,显然可以获得更高的频谱利用率。


效果展示



(1)调制星座图

(2)信噪比13db接收星座图

(3)16qam信号眼图

(4)13db信噪比下16qam信号眼图

(5)误码率曲线(15db内)




代码说明


1、M可改,16qam,4qam等,snr信噪比可改。mqam_count信号数量可改。

2、代码在MATLAB2018上通过。

clc
clear
M=16;%mqam的进制数
mqam_count =400;
snr=13;
%-------------------------------------&
bit_per_symbol=log2(M);
bit_length = mqam_count*bit_per_symbol;
bit_signal = round(rand(1,bit_length))';
bit_moded1 = qammod(bit_signal,M,'InputType','bit');
figure(1)
scatter(real(bit_moded1),imag(bit_moded1),'*y');
title('调制后的星座图');
%-------------------------------------%
signal_time_C_W_R=awgn(real(bit_moded1),snr);
signal_time_C_W_i=awgn(imag(bit_moded1),snr);
signal_time_C_W=complex(signal_time_C_W_R,signal_time_C_W_i);
figure(2)
scatter(1.5*real(signal_time_C_W),1.5*imag(signal_time_C_W),'.y');
title('接收的星座图');
%-------------------------------------%
eyediagram(bit_moded1,2)
eyediagram(signal_time_C_W,2)
%-------------------------------------%
snr_qq=0;
qq=zeros(150,1);
for i=0:149
bit_moded_qq = qammod(bit_signal,M,'InputType','bit');
snr_qq=snr_qq+0.1;
signal_time_C_W_R=awgn(real(bit_moded_qq),snr_qq);
signal_time_C_W_i=awgn(imag(bit_moded_qq),snr_qq);
signal_time_C_W=complex(signal_time_C_W_R,signal_time_C_W_i);
bit_demod_sig=qamdemod(signal_time_C_W,M,'OutputType','bit');
error_bit = sum(bit_demod_sig~=bit_signal);
error_rate = error_bit/length(bit_signal);
qq(i+1)=error_rate;
end
figure(5)
plot(0:0.1:14.9,qq)
title('误码率曲线16qam');
%-----------------------------------%
fs = 1000;
sps = 32;
txfilter = comm.RaisedCosineTransmitFilter('OutputSamplesPerSymbol',sps);
ed = comm.EyeDiagram('SampleRate',fs*sps,'SamplesPerSymbol',sps);
txSig = txfilter(signal_time_C_W);
ed(txSig)



版权声明:本文为pengchengIT原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。