• 大小: 4KB
    文件类型: .m
    金币: 2
    下载: 0 次
    发布日期: 2024-01-27
  • 语言: Matlab
  • 标签: TCT算法  

资源简介

TCT算法功率谱 通过调用该函数 可以自己给定快拍数 信噪比 信源间距等画出算法的功率谱曲线图

资源截图

代码片段和文件信息

function [ doa ] = TctSpectrum(SensorLd_Xanglesnr )
bw1=1e7;                                    % 信号带宽
f0=1e8;                                     %固定频率
T1=1e-5;                                    %采样长度
dt1=T1/L;                                 %采样间隔
gc = 3e+8;                                 %光速
snr=5;                                  %信噪比
degrad=pi/180;
p=1;                                       % 信号源个数
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%构造采样序列
t1=(0:L-1)*dt1;                           %时域采样点
sig1=exp(j*pi*bw1*t1.*t1/T1+j*2*pi*f0*t1);                   %产生线性调频信号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%线性调频信号频率
F0=f0+bw1/(T1)*t1;
le=L/8;                         %宽带信号分为8个窄频段
for  i=1:8
    f(i)=F0(i*le);
    F(1i)=f(i);
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%构造采样数据矩阵
Lambda=gc/f(8);                               % 波长
d=d_X*Lambda;                               %阵元间距离
tmp2=d*[0:Sensor-1 ]‘;
       for  i=1:8
           v1i=sig1(le*(i-1)+1:le*i);
           s(i:)=v1i;
       end
       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
       %构造方向矩阵
       A=[exp(-j*2*pi*tmp2*F/gc*sin(angle*degrad))];   %参考频率点的阵列流型信号源决定列数,阵元数决定行数8行8列(信号分为8段)
       
       % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       %信号接收
       S=zeros(8Sensor);
       P=zeros(SensorSensor*8);
 
       for i=1:8
           xi=A(:i)*s(i:);
           xi=awgn(xisnr);              %接收信号
           Xi=fft(xi.‘);
           Xi=Xi.‘;                      %FFT
           Ri=Xi*Xi‘;                  %计算协方差矩阵
   
           temp=eig(Ri);
           temp=sort(temp);
           Pi=Ri-[sum(temp)-sum(temp(Sensor-p+1:Sensor))]/(Sensor-p)*eye(SensorSensor);   %计算协方差矩阵
           [UiSiVi]=svd(Pi);              %奇异值分解
           S(i:)=sum(Si);
           P(:Sensor*(i-1)+1:Sensor*i)=Pi;
           X(Sensor*(i-1)+1:Sensor*i:)=Xi;
       end
       
       % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

评论

共有 条评论