⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xiang_wei.m

📁 此为频偏校正程序,通过TD_GG算法得到的频偏值还存在几赫兹的残余频偏
💻 M
字号:
function [I5,Q5,theta1]=xiang_wei(I4,Q4,N1)
Pj=[];

sth3=0;
sth4=0;
W=[];
 for i=1:N1
  Pj(i)=I4(i).*I4(i)+Q4(i).*Q4(i);
  theta(i)=atan2(Q4(i),I4(i));
  W(i)=Pj(i)*exp(j*(16*theta(i)));
   sth3=sth3+imag(W(i));
   sth4=sth4+real(W(i));
end
theta1=((atan2(sth3,sth4)))/16;
%if(theta1<0)
 % theta1=-theta1;
 %end

%%%%%%%%%%%%%%theta11是最终的相位误差%%%%%%%%%%%%%%%%%
%%%%%%%%%%接下来程序是纠正相位误差
for i=1:N1
    I5(i)=I4(i)*cos(-theta1)-Q4(i)*sin(-theta1);
    Q5(i)=I4(i)*sin(-theta1)+Q4(i)*cos(theta1);
end
  return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -