首页 > 其他分享 >基于MATLAB的自适应调制解调通信系统的误码率仿真,对比BPSK,QPSK,16QAM,64QAM

基于MATLAB的自适应调制解调通信系统的误码率仿真,对比BPSK,QPSK,16QAM,64QAM

时间:2023-05-11 16:02:20浏览次数:39  
标签:误码率 QPSK SNRdB matrix ... 0.9 MATLAB SER

1.算法仿真效果

matlab2022a仿真结果如下:

 

 

 

 

2.算法涉及理论知识概要

BPSK:Binary Phase Shift Keying  二相相移键控,一个符号代表1bit

 

QPSK:Quadrature Phase Shift Keying   四相相移键控,一个符号代表2bit

 

8PSK:8 Phase Shift Keying   八相相移键控,一个符号代表3bit

 

16QAM:16 Quadrature Amplitude Modulation  16正交幅相调制,一个符号代表4bit

 

64QAM:64 Quadrature Amplitude Modulation   64正交幅相调制,一个符号代表6bitPSK是相移键控(Phase Shift Keying),是通过相位的变化代表“0”和“1”的。BPSK中的B是“Binary”的意思,也就是有两个变化状态,比如说相位上的“+90°(代表1)、-90°(代表0)”,一个状态代表的就是一个比特。QPSK的“Q”是“Quadrature”的意思,有四个变化状态,如相位上的“+45°(代表00)、-45°(代表11)、+135°(代表10)、-135°(代表01)”,那么一个状态就代表两个比特的信息,如图2所示。同理8PSK的一个状态代表三个比特。

 

        等到QAM调制方式的时候,由于要描述的状态多了,只靠相位区分状态就不够了(相互区别起来有些困难了),需要加入幅度的变化来表示一个状态。16QAM就是状态空间为16,每个状态是4个比特的信息;而64QAM的状态空间是64,每个状态是6个比特的信息.

 

 

 

 

 

 

3.MATLAB核心程序

 

load dat.mat
 
%传输
SNRdB = 0:5:30;   
SER_matrix = zeros(5,length(SNRdB));  
Ttotal_matrix = zeros(5,length(SNRdB));   
for i = 1:5
    for j = 1:length(SNRdB)
         [i,j]
        [temp1,temp2]      = TransmissionEffectFun(dats,SNRdB(j),i);
        SER_matrix(i,j)    = temp1;
        Ttotal_matrix(i,j) = temp2;
    end
end
 
 
figure
subplot(231)
semilogy(SNRdB,SER_matrix(1,:),'-bs',...
    'LineWidth',1,...
    'MarkerSize',8,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.9,0.0]);
legend('BPSK');
xlabel('SNR');
ylabel('误码率');
grid on
 
subplot(232)
 
semilogy(SNRdB,SER_matrix(2,:),'-mo',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.5,0.9,0.0]);
 
legend('QPSK');
xlabel('SNR');
ylabel('误码率');
grid on
 
subplot(233)
semilogy(SNRdB,SER_matrix(3,:),'-b^',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.2,0.9,0.5]);
 
legend('16QAM');
xlabel('SNR');
ylabel('误码率');
grid on
 
subplot(234)
semilogy(SNRdB,SER_matrix(4,:),'-r>',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.9,0.0]);
 
legend('64QAM');
xlabel('SNR');
ylabel('误码率');
grid on
 
 
subplot(235)
semilogy(SNRdB,SER_matrix(5,:),'-r<',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.3,0.3]);
grid on
legend('自适应调制');
xlabel('SNR');
ylabel('误码率');
 
 
figure
semilogy(SNRdB,SER_matrix(1,:),'-bs',...
    'LineWidth',1,...
    'MarkerSize',8,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.9,0.0]);
hold on
semilogy(SNRdB,SER_matrix(2,:),'-mo',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.5,0.9,0.0]);
hold on
semilogy(SNRdB,SER_matrix(3,:),'-b^',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.2,0.9,0.5]);
hold on
semilogy(SNRdB,SER_matrix(4,:),'-r>',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.9,0.0]);
hold on
semilogy(SNRdB,SER_matrix(5,:),'-r<',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.3,0.3]);
grid on
legend('BPSK','QPSK','16QAM','64QAM','自适应调制');
xlabel('SNR');
ylabel('误码率');
 
figure
plot(SNRdB,Ttotal_matrix(1,:),'-bs',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.0,0.0]);
hold on
plot(SNRdB,Ttotal_matrix(2,:),'-mo',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.5,0.9,0.0]);
hold on
plot(SNRdB,Ttotal_matrix(3,:),'-b^',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.2,0.9,0.5]);
hold on
plot(SNRdB,Ttotal_matrix(4,:),'-r>',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.9,0.0]);
hold on
plot(SNRdB,Ttotal_matrix(5,:),'-r<',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.9,0.3,0.3]);
grid on
legend('BPSK','QPSK','16QAM','64QAM','自适应调制');
xlabel('SNR');
ylabel('传输时间');

 

  

 

标签:误码率,QPSK,SNRdB,matrix,...,0.9,MATLAB,SER
From: https://www.cnblogs.com/51matlab/p/17391283.html

相关文章