资源简介
ESPRIT DOA算法的稀疏表示求解,程序中使用了凸优化工具箱
代码片段和文件信息
clear all;
close all;
clc;
lambda=60;
dd=lambda/2; %阵元间距离,取为入射波长的一半
Kp=80; %采样快拍数
Nnum=9; %%阵列1阵元数量
fs=20*10^3;
theta=[626];
AA=[233];
SignalNum=length(theta);
Fc=[2*10^35*10^32*10^3]; %入射信号频率
SNR=10;
Aratio=sqrt(10^(SNR/10)); %信号幅度与噪声幅度比值,并假设信号幅度为1
% thetatest=(0*pi/180:1*pi/180:90*pi/180); %theta角度搜索范围
thetatest=[-60:1:60]*pi/180;
thetanum=length(thetatest);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SignalVector=zeros(SignalNumKp);
Xt=zeros(NnumKp);
M=Nnum;
T_Vector=(1:Kp)/fs;
d=dd*(0:M-1);
w=2*pi/lambda*sin(thetatest);
A=exp(-1j*d‘*w);
% % % for k2=1:thetanum
% % % for k1=1:M
% % % Att(k1)=exp(-j*(k1-1)*2*pi*dd*sin(thetatest(k2))/lambda);
% % % A(k1k2) =Att(k1);
% % % end
% % % end
%%构造观测矩阵Y
for k2=1:SignalNum
for k1=1:Nnum
At(k1)=exp(-j*(k1-1)*2*pi*dd*sin(theta(k2)*pi/180)/lambda);
Atemp(k1k2)=At(k1);
end
end
%%%构造信号矩阵和噪声矩阵
for k1=1:SignalNum
SignalVector(k1:)=exp(j*2*pi*Fc(k1).*T_Vector); %信号
end
Xtt=Atemp*SignalVector;
%NoiseVector=sqrt(0.5)*(randn(NnumK)+j*randn(NnumK));
%--------------------加噪声方法---1
for kk=1:Nnum
Xt(kk:)=awgn(Xtt(kk:)SNR‘measured‘);
end
%-------------------加噪声方法---2
% for k1=1:Nnum
% NoiseVector(k1:)=SignalNum/Aratio.*noisecg(Kp)‘;
% Xt(k1:)=Xtt(k1:)+NoiseVector(k1:);
% end
Rx=(Xt*Xt‘)./Kp;
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[V D] = eig(Rx); % X*V = V*D
DD = diag(D); % 对角阵变矢量
sigm_n=min(DD); %最小特征值^作为 的估计
I=eye(M);
W12=sqrt(Kp)*(kron((Rx^(-0.5)).‘Rx^(-0.5)));
Y=Rx-sigm_n*I;
y=W12*Y(:);
Fai=W12*kron(IA);
II=ones(1thetanum);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
belta=sqrt(chi2inv(0.99999M*M))
% % % cvx_begin
% % % variable B(thetanumM)
% % % variable b(thetanum1);
% % % minimize(norm(b1))
% % % % minimize (norm(sqrt(sum((B.^2)‘))1))
% % % subject to
% % % for kk=1:1:thetanum
% % % norm(B(kk:))<=b(kk1);
% % % end
% % % temp0=Rx-A*B-sigm_n*I;
% % % temp=W12*vec(temp0);
% % % norm(temp)<=belta ;
% % % % norm(y-Fai*B(:))<=23 ;
% % % cvx_end
% % %
% % % figure()
% % % plot(0:1:90b);
%%%%%%%%%%%%%%%%%%%%%%----BW*vec(R-AB-I)---%%%%%%%%%%%%%%%%%%%%
belta=sqrt(chi2inv(0.9999M*M));
AP=[];
for i=1:1:M
AP=blkdiag(APA);
end
% I2=eye(thetanum);
% APP=[];
% cvx_begin
% variable B(thetanum*M) complex;
% variable b(thetanum);
%
% minimize(norm(b1))
% % minimize (norm(sqrt(sum((B.^2)‘))1))
% subject to
% for i=1:1:thetanum
% for j=1:1:M
% APP=blkdiag(APPI2(i:));
% end
% b(i)>=norm(APP*B);
% APP=[];
% end
%
% temp0=
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4277 2020-09-14 14:43 L1_SRACV_Sparse_CVX.m
评论
共有 条评论