function [LPG,PSL,PAF] = LPG_PSL(Sig_ref,Sig_real,U)
% 衡量信号性能
s = Sig_ref.';
q = conj(Sig_real.');
LPG = 10*log10((q.'*s)*(q.'*s)'/(q'*q)/(s'*s));
if(U==0)
PAF = abs(xcorr(Sig_ref,Sig_real));
elseif(U==1)
PAF = fft(Sig_real,8*length(Sig_real));
else
PAF = fftshift(fft(Sig_real,8*length(Sig_real)));
end
PAF = PAF/max(abs(PAF));
PSL = PSLR(abs(PAF));
end