找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3338|回复: 1
收起左侧

恒虚警处理算法MATLAB源码

[复制链接]
ID:316363 发表于 2018-4-25 16:45 | 显示全部楼层 |阅读模式
雷达恒虚警检测算法处理程序,可以直接使用

单片机源程序如下:
  1. function OCor=CFAR(data)
  2. %edit by yaochen 2016/12/19 SOCA CFAR detection
  3. %解决CA CFAR方法中目标遮蔽效应问题,SOCA CFAR对于杂波边缘处理不好
  4. %-------------------------------------
  5. %1-D CFAR detection,
  6. %input data format:1*N
  7. NGC=400;%Num Guard Cells
  8. NTC=800;%Num Training Cells
  9. exp_pfa = 1e-8;%expection of Pfa
  10. nPoint = length(data);
  11. n=0;
  12. OCor=[];
  13. x = abs(data).^2;%signal after a square law detector

  14. Odata=zeros(nPoint,1);

  15. T=zeros(1,nPoint);

  16. for iPoint=1:nPoint
  17.     CI=iPoint;%cell under test
  18.     CIF=CI-NGC/2-1;%cell index forward
  19.     CIB=CI+NGC/2+1;%cell index backward
  20.     if CIF>=1
  21.         if CIF-NTC/2+1>=1
  22.             FIdx=[(CIF-NTC/2+1):CIF];
  23.         else
  24.             FIdx=[1:CIF];
  25.         end
  26.     else
  27.         FIdx=[];
  28.     end
  29.    
  30.     if CIB<=nPoint
  31.         if CIB+NTC/2-1<=nPoint
  32.             BIdx=[CIB:(CIB+NTC/2-1)];
  33.         else
  34.             BIdx=[CIB:nPoint];
  35.         end
  36.     else
  37.         BIdx=[];
  38.     end
  39.    
  40.     N1=size(BIdx,2);
  41.     N2=size(FIdx,2);
  42.     if N1>0 && N2>0
  43.         np_e1=sum(x(BIdx))/N1;
  44.         alpha1=N1*(exp_pfa^(-1/N1)-1);
  45.         T1=alpha1*np_e1;
  46.    
  47.         np_e2=sum(x(FIdx))/N2;
  48.         alpha2=N2*(exp_pfa^(-1/N2)-1);
  49.         T2=alpha2*np_e2;
  50.         T(iPoint)=min(T1,T2);
  51.     else
  52.         N=(size(BIdx,2)+size(FIdx,2));
  53.         np_e=(sum(x(BIdx))+sum(x(FIdx)))/N;
  54.         alpha=N*(exp_pfa^(-1/N)-1);
  55.         T(iPoint)=alpha*np_e;
  56.     end
  57.     if(x(iPoint)>T(iPoint))%here must be >;consider >=,when there is no noise, x =T
  58.         n=n+1;
  59.         OCor(1,n)=1;
  60.         OCor(2,n)=iPoint;
  61.         Odata(iPoint)=1;
  62.     else
  63.         Odata(iPoint)=0;
  64.     end
  65.    
  66. end

  67. % figure(2)
  68. % plot(abs(Odata*max(tempData)),'r')
  69. % hold on;
  70. % plot(abs(tempData));
  71. %
  72. % hold off;
  73. % pause(0.1);

  74. % if isempty(oCor)
  75. %     OCor=[];
  76. % end
  77. end

复制代码

所有资料51hei提供下载:
CFAR.zip (986 Bytes, 下载次数: 7)
回复

使用道具 举报

ID:317318 发表于 2018-4-26 20:15 | 显示全部楼层
您好,请问您有恒虚警性质的雷达检测目标的Matlab程序吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表