ca1.m
上传用户:tzydjx
上传日期:2022-08-11
资源大小:3k
文件大小:3k
- %%%%%%%%%%瑞丽噪声%%%%%%%%%%
- sigma=2;
- u=rand(1,1000);
- rayleigh_noise=sqrt(2*log2(1./u))*sigma;
- %%%%%%%%%%参数设定%%%%%%%%%%
- fr=1000; %雷达发射信号重频
- a=1;
- fs=4e5; %采样频率
- ts=1/fs;
- RCS=140;
- k=8.6*10E-5 ;
- sigma0=10*log10(RCS); %杂波后散射系数
- thetaE=2; %天线3db海拔带宽
- thetaA=1; %天线3db方位角带宽
- SL=-20; %天线旁瓣水平
- range_n=200;
- range_obj1=50;
- range_obj2=75;
- range_obj3=100;
- range=linspace(1,range_n,1000);
- hr=3; %雷达高度
- ht=3; %目标高度
- pt=75; %雷达峰值功率
- rang_obj1=range_obj1*1000; %目标距离
- rang_obj2=range_obj2*1000;
- rang_obj3=range_obj3*1000;
- t0=290; %有效噪声温度
- l=10; %雷达损耗
- ant_id=1;
- clight=3.e8; %光速
- re=6371000; %地球半径
- t=1/fr;
- F=1;
- B=1e6;
- %%%%%%%%%%产生杂波回波%%%%%%%%%%
- lamda=clight/fr;
- thetaA_deg=thetaA;
- thetaE_deg=thetaE;
- thetaA=thetaA_deg*pi/180;
- thetaE=thetaE_deg*pi/180;
- rh=sqrt(8.0*hr*re/3.);
- SLv=10.0^(SL/10);
- sigma0v=10.0^(sigma0/10);
- tau=1/B;
- deltar=clight*tau/2.;
- range_m=1000.*range;
- thetar=asin(hr./range_m);
- thetae=asin((ht-hr)./range_m);
- propag_atten=1.+((range_m./rh).^4);
- Rg=range_m.*cos(thetar);
- deltaRg=deltar.*cos(thetar);
- theta_sum=thetae+thetar;
- if(ant_id==0)
- ant_arg=(2.78*theta_sum)./(pi*thetaE);
- gain=(sinc(ant_arg)).^2;
- else
- gain=exp(-2.776.*(theta_sum./thetaE).^2);
- end
- sigmac=(sigma0v.*Rg.*deltaRg).*(pi*SLv*SLv+thetaA.*gain.^2)./propag_atten;
- sigmac=10*log10(sigmac);
- %%%%%%%%%%回波幅度计算%%%%%%
- G=150;
- A1=sqrt(pt/(4*pi)^3*l)*G^2*lamda*sqrt(RCS)/rang_obj1^2;
- A2=sqrt(pt/(4*pi)^3*l)*G^2*lamda*sqrt(RCS)/rang_obj2^2;
- A3=sqrt(pt/(4*pi)^3*l)*G^2*lamda*sqrt(RCS)/rang_obj3^2;
- %%%%%%%%%%计算目标%%%%%%%%%%
- s_pc_1=[zeros(1,rang_obj1/range_n),A1,A1,A1,A1,A1,A1,A1,A1,A1,A1,zeros(1,((rang_obj2-rang_obj1)/range_n)-10),A2,A2,A2,A2,A2,A2,A2,A2,A2,A2,zeros(1,((rang_obj3-rang_obj2)/range_n)-10),A3,A3,A3,A3,A3,A3,A3,A3,A3,A3,zeros(1,(1000-rang_obj3/range_n)-10)];
- s_pc=rayleigh_noise+s_pc_1+sigmac;
- Pn=sum(sum((rayleigh_noise).^2));
- snr=pt/Pn;
- figure
- plot(s_pc)
- grid
- N=1000;
- %第1点恒虚警处理时噪声均值由其后面的n点的噪声决定
- cfar_ca_result=zeros(1,N);
- cfar_ca_result(1,1)=s_pc(1,1)/(sqrt(2)/pi*mean(s_pc(1,2:17)));%估计值要乘一个门限加权系数T?
- %第2点到第n点恒虚警处理时噪声均值由其前面和后面的n点的噪声共同决定
- for i=2:16
- noise_mean=sqrt(2)/pi*(mean(s_pc(1,1:i-1))+mean(s_pc(1,i+1:i+16)))/2;
- cfar_ca_result(1,i)=s_pc(1,i)/noise_mean;
- end
- %正常数据点恒虚警处理时噪声均值由其前面和后面各n点的噪声共同决定
- for i=17:N-17
- noise_mean=sqrt(2)/pi*(mean(s_pc(1,i-16:i-1))+mean(s_pc(1,i+1:i+16)))/2;
- cfar_ca_result(1,i)=s_pc(1,i)/noise_mean;
- end
- %倒数n点到倒数第2点恒虚警处理时噪声均值由其前面n点和后面点的噪声共同决定
- for i=N-16:N-1
- noise_mean=sqrt(2)/pi*(mean(s_pc(1,i-16:i-1))+mean(s_pc(1,i+1:N)))/2;
- cfar_ca_result(1,i)=s_pc(1,i)/noise_mean;
- end
- %最后一点的恒虚警处理的噪声均值由其前面的n点的噪声决定
- noise_mean=sqrt(2)/pi*mean(s_pc(1,N-16:N-1));
- cfar_ca_result(1,N)=s_pc(1,N)/noise_mean;
-
- figure
- plot(cfar_ca_result,'g');grid
- xlabel('N'),ylabel('信号幅度'),title('采用CA处理的结果');