function PAPR_16QAM_Clipping2 Num_Loop=10000;%总共模拟10000个点,数字越大越精确 Num_Subcarrier=64;%子载波个数 Mapper=[3+3i 1+3i -1+3i -3+3i 3+1i 1+1i -1+1i -3+1i 3-1i 1-1i -1-1i -3-1i 3-3i 1-3i -1-3i -3-3i]/sqrt(4);%QPSK J=5;0%Oversampling factor过采样因子 CR=1;%Clipping Ratio裁剪比 PAPR_Original=zeros( 1,Num_Loop); PAPR_Clipping=zeros(1,Num_Loop); for n=1:Num_Loop InputSymbolIndex=randi([1 16],1,Num_Subcarrier); OFDM_Freq=Mapper(InputSymbolIndex); OFDM_Time=sqrt(J*Num_Subcarrier)*ifft([OFDM_Freq(1:Num_Subcarrier/2) zeros(1,(J-1)*Num_Subcarrier) OFDM_Freq(Num_Subcarrier/2+1:Num_Subcarrier)]); PAPR_Original(n)=10*log10(max(abs(OFDM_Time))^2./mean(abs(OFDM_Time).^2)); for p=1:J*Num_Subcarrier if abs(OFDM_Time(p))>CR OFDM_Time(p)=CR*cos(angle(OFDM_Time(p)))+1i*CR*sin(angle(OFDM_Time(p))); end end PAPR_Clipping(n)=10*log10(max(abs(OFDM_Time)).^2./mean(abs(OFDM_Time).^2)); end Pr_Ori=[]; Pr_Clip=[]; PAPRO_Start=2; PAPRO_End=12; step=0.2; count=1; for m=PAPRO_Start:step:PAPRO_End temp_Ori=sum(PAPR_Original(:)>m)/Num_Loop; temp_Clip=sum(PAPR_Clipping(:)>m)/Num_Loop; Pr_Ori(count)=temp_Ori; Pr_Clip(count)=temp_Clip; count=count+1; end semilogy(PAPRO_Start:step:PAPRO_End,Pr_Ori, '-b*',PAPRO_Start:step:PAPRO_End,Pr_Clip, '-r*'); axis([PAPRO_Start PAPRO_End 10^-4 1]); grid on; hold on:
时间: 2024-01-30 19:02:36 浏览: 77
PAPR-QAM.rar_PAPR_PAPR matlab QAM_lte advance matlab_qam papr_ti
5星 · 资源好评率100%
这段代码是一个用MATLAB编写的仿真程序,用于比较原始OFDM信号的峰均功率比(PAPR)和经过裁剪后的OFDM信号的PAPR。程序分为两个主要部分:第一部分是生成随机的OFDM符号,计算原始OFDM信号的PAPR;第二部分是对每个OFDM符号进行裁剪,并计算裁剪后的OFDM信号的PAPR。最后,程序将原始OFDM信号和裁剪后的OFDM信号的PAPR与一系列阈值进行比较,并绘制两个PAPR曲线的图像,以便比较它们在不同的PAPR阈值下的性能。
阅读全文