目录
1.算法仿真效果
2.MATLAB核心程序
3.算法涉及理论知识概要
4.完整MATLAB
1.算法仿真效果
matlaba仿真结果如下:
2.MATLAB核心程序
.......................................................................load dat.mat%传输SNRdB = 0:5:30; SER_matrix = zeros(5,length(SNRdB)); Ttotal_matrix = zeros(5,length(SNRdB)); for i = 1:5for j = 1:length(SNRdB)[i,j][temp1,temp2]= TransmissionEffectFun(dats,SNRdB(j),i);SER_matrix(i,j) = temp1;Ttotal_matrix(i,j) = temp2;endendfiguresubplot(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 onsubplot(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 onsubplot(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 onsubplot(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 onsubplot(235)semilogy(SNRdB,SER_matrix(5,:),'-r<',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.3,0.3]);grid onlegend('自适应调制');xlabel('SNR');ylabel('误码率');figuresemilogy(SNRdB,SER_matrix(1,:),'-bs',...'LineWidth',1,...'MarkerSize',8,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.9,0.0]);hold onsemilogy(SNRdB,SER_matrix(2,:),'-mo',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.5,0.9,0.0]);hold onsemilogy(SNRdB,SER_matrix(3,:),'-b^',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.2,0.9,0.5]);hold onsemilogy(SNRdB,SER_matrix(4,:),'-r>',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.9,0.0]);hold onsemilogy(SNRdB,SER_matrix(5,:),'-r<',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.3,0.3]);grid onlegend('BPSK','QPSK','16QAM','64QAM','自适应调制');xlabel('SNR');ylabel('误码率');figureplot(SNRdB,Ttotal_matrix(1,:),'-bs',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.0,0.0]);hold onplot(SNRdB,Ttotal_matrix(2,:),'-mo',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.5,0.9,0.0]);hold onplot(SNRdB,Ttotal_matrix(3,:),'-b^',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.2,0.9,0.5]);hold onplot(SNRdB,Ttotal_matrix(4,:),'-r>',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.9,0.0]);hold onplot(SNRdB,Ttotal_matrix(5,:),'-r<',...'LineWidth',1,...'MarkerSize',6,...'MarkerEdgeColor','k',...'MarkerFaceColor',[0.9,0.3,0.3]);grid onlegend('BPSK','QPSK','16QAM','64QAM','自适应调制');xlabel('SNR');ylabel('传输时间');A416
3.算法涉及理论知识概要
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个比特的信息.
4.完整MATLAB
V