# MATLAB代做|FPGA代做|Python代做--PTS算法

### 时间：2019-1-11 21:36:07 点击：

核心提示：MATLAB代做|FPGA代做|Python代做--PTS算法...
function papr=PTS(a,n,point,M)
%modulate a series of signals to QPSK signal with multicarrier (OMCM)

%ensure that the number of signals corresponds to the number of carriers
L=length(a);
for j=(L+1):2*n
a(j)=1;
end
a=a(1:2*n);
L=length(a);

%equivalent sequence
b=2*a-1;

%specify the phases of codes sequence
j=1;
for k=1:2:L
c(j)=(b(k)+b(k+1)*i);
j=j+1;
end

%partition into cluster
len=floor(n/M);
for j=1:M
cluster(j,:)=[zeros(1,(j-1)*len),c((j-1)*len+1:j*len),zeros(1,n-j*len)];
end

%modulation begins
d=zeros(M,point);
u=[];
for j=1:M
d(j,1)=0;
d(j,2:n+1)=cluster(j,1:n);
d(j,n+2:point-n)=0;
d(j,point-n+1:point)=conj(cluster(j,n:-1:1));
end
for j=1:size(d,1)
out_T=sqrt(point/4)*sqrt(point)*ifft(d(j,:),point);
u(j,:)=real(out_T);
end

%optimization begins
b=ones(1,M);
for j=1:M
output=b*u;
max_P=(max(abs(output)))^2;
papr1=max_P/(2*n);

b(j)=-1;
output=b*u;
max_P=(max(abs(output)))^2;
papr2=max_P/(2*n);
if papr1<papr2
b(j)=1;
papr=papr1;
else
papr=papr2;
end
end
%plot(0:1/point:(1-1/point),abs(u)),grid;

Tags:PTS算法

• 百度搜索