CFAR
CFAR方法实现
This commit is contained in:
86
SO_CFAR.m
Normal file
86
SO_CFAR.m
Normal file
@@ -0,0 +1,86 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% 干扰目标情况下SO-CAFR检测概率N=32,Pf=1e-6
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
clc;clear all;close all;
|
||||
N=36; %参考单元长度
|
||||
n=N/2; %半滑窗长度
|
||||
M=1e4; %蒙特卡洛仿真次数
|
||||
SNR_dB=5:1:35; %信噪比
|
||||
SNR=10.^(SNR_dB./10);
|
||||
Simul_len=length(SNR); %仿真长度
|
||||
T=1.2379;
|
||||
Pd_SO1=0;
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%1干扰目标%%%%%%%%%%%%%%%%%%%
|
||||
for i=1:length(SNR)
|
||||
count=0;
|
||||
for j=1:M
|
||||
%%%%%%%%%%%产生指数噪声%%%%%%%%%%%%%%%%%%%%%%%
|
||||
lambda=1;
|
||||
u=rand(1,N-1);
|
||||
exp_noise=log(u)*(-lambda);
|
||||
%%%%%%%%%%%%产生目标回波%%%%%%%%%%%%%%%%%%%
|
||||
lambda=SNR(i)+1;
|
||||
u=rand(1,2);
|
||||
exp_target=log(u(1))*(-lambda);
|
||||
exp_noise(N)=log(u(2))*(-lambda);
|
||||
cfar_k=exp_target/min(sum(exp_noise(1:N/2)),sum(exp_noise((N/2+1):N)));
|
||||
if (cfar_k>T)
|
||||
count=count+1;
|
||||
end
|
||||
end
|
||||
Pd_SO1(i)=count/M;
|
||||
end
|
||||
figure;
|
||||
plot(SNR_dB,Pd_SO1,'b--','LineWidth',1.5);
|
||||
hold on
|
||||
Pd_SO2=0;
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%后半参考滑窗包含2干扰目标%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
for i=1:length(SNR)
|
||||
count=0;
|
||||
for j=1:M
|
||||
%%%%%%%%%%%产生指数噪声%%%%%%%%%%%%%%%%%%%%%%%
|
||||
lambda=1;
|
||||
u=rand(1,N-2);
|
||||
exp_noise=log(u)*(-lambda);
|
||||
%%%%%%%%%%%%产生目标回波%%%%%%%%%%%%%%%%%%%
|
||||
lambda=SNR(i)+1;
|
||||
u=rand(1,3);
|
||||
exp_target=log(u(1))*(-lambda);
|
||||
exp_noise(N)=log(u(2))*(-lambda);
|
||||
exp_noise(N-1)=log(u(3))*(-lambda);
|
||||
cfar_k=exp_target/min(sum(exp_noise(1:N/2)),sum(exp_noise((N/2+1):N)));
|
||||
if (cfar_k>T)
|
||||
count=count+1;
|
||||
end
|
||||
end
|
||||
Pd_SO2(i)=count/M;
|
||||
end
|
||||
plot(SNR_dB,Pd_SO2,'r--*','LineWidth',1.5);
|
||||
hold on
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%前后半参考滑窗各包含1干扰目标%%%%%%%%%%%%%%
|
||||
Pd_SO3=0;
|
||||
for i=1:length(SNR)
|
||||
count=0;
|
||||
for j=1:M
|
||||
%%%%%%%%%%%产生指数噪声%%%%%%%%%%%%%%%%%%%%%%%
|
||||
lambda=1;
|
||||
u=rand(1,N-2);
|
||||
exp_noise=log(u)*(-lambda);
|
||||
%%%%%%%%%%%%产生目标回波%%%%%%%%%%%%%%%%%%%
|
||||
lambda=SNR(i)+1;
|
||||
u=rand(1,3);
|
||||
exp_target=log(u(1))*(-lambda);
|
||||
exp_noise(N)=log(u(2))*(-lambda);
|
||||
exp_noise(N-1)=log(u(3))*(-lambda);
|
||||
exp_noise=[exp_noise(1:n-1) exp_noise(N-1) exp_noise(n:N-1) exp_noise(N)];
|
||||
cfar_k=exp_target/min(sum(exp_noise(1:N/2)),sum(exp_noise((N/2+1):N)));
|
||||
if (cfar_k>T)
|
||||
count=count+1;
|
||||
end
|
||||
end
|
||||
Pd_SO3(i)=count/M;
|
||||
end
|
||||
plot(SNR_dB,Pd_SO3,'g-.','LineWidth',1.5);
|
||||
title('干扰目标情况下CA-CAFR检测概率N=36,Pf=1e-6');
|
||||
legend('r=(0,1)','r=(0,2)','r=(1,1)');
|
||||
xlabel('信噪比(dB)');ylabel('检测概率');
|
||||
Reference in New Issue
Block a user