雷达检测及MATLAB仿真(一)https://developer.aliyun.com/article/1472358
5、起伏目标检测概率
①、Swerling V 型目标的检测
检测概率 P D P_DPD:
n p = 1 , 10 n_p=1,10np=1,10 时检测概率相对于 SNR 的曲线
1)MATLAB 源码
pd_swerling5.m
function pd = pd_swerling5 (input1, indicator, np, snrbar) % This function is used to calculate the probability of detection % for Swerling 5 or 0 targets for np>1. if(np == 1) 'Stop, np must be greater than 1' return end format long snrbar = 10.0.^(snrbar./10.); eps = 0.00000001; delmax = .00001; delta =10000.; % Calculate the threshold Vt if (indicator ~=1) nfa = input1; pfa = np * log(2) / nfa; else pfa = input1; nfa = np * log(2) / pfa; end sqrtpfa = sqrt(-log10(pfa)); sqrtnp = sqrt(np); vt0 = np - sqrtnp + 2.3 * sqrtpfa * (sqrtpfa + sqrtnp - 1.0); vt = vt0; while (abs(delta) >= vt0) igf = incomplete_gamma(vt0,np); num = 0.5^(np/nfa) - igf; temp = (np-1) * log(vt0+eps) - vt0 - factor(np-1); deno = exp(temp); vt = vt0 + (num / (deno+eps)); delta = abs(vt - vt0) * 10000.0; vt0 = vt; end % Calculate the Gram-Chrlier coeffcients temp1 = 2.0 .* snrbar + 1.0; omegabar = sqrt(np .* temp1); c3 = -(snrbar + 1.0 / 3.0) ./ (sqrt(np) .* temp1.^1.5); c4 = (snrbar + 0.25) ./ (np .* temp1.^2.); c6 = c3 .* c3 ./2.0; V = (vt - np .* (1.0 + snrbar)) ./ omegabar; Vsqr = V .*V; val1 = exp(-Vsqr ./ 2.0) ./ sqrt( 2.0 * pi); val2 = c3 .* (V.^2 -1.0) + c4 .* V .* (3.0 - V.^2) -... c6 .* V .* (V.^4 - 10. .* V.^2 + 15.0); q = 0.5 .* erfc (V./sqrt(2.0)); pd = q - val1 .* val2;
fig2_9.m
close all clear all pfa = 1e-9; nfa = log(2) / pfa; b = sqrt(-2.0 * log(pfa)); index = 0; for snr = 0:.1:20 index = index +1; a = sqrt(2.0 * 10^(.1*snr)); pro(index) = marcumsq(a,b); prob205(index) = pd_swerling5 (pfa, 1, 10, snr); end x = 0:.1:20; plot(x, pro,'k',x,prob205,'k:'); axis([0 20 0 1]) xlabel ('SNR - dB') ylabel ('Probability of detection') legend('np = 1','np = 10') grid
2)仿真
n p = 1 , 10 n_p=1,10np=1,10 时检测概率相对于 SNR 的曲线
注意到为了获得同样的检概率,10 个脉冲非相干积累比单个脉冲需要更少的 SNR。
②、Swerling Ⅰ 型目标的检测
检测概率 P D P_DPD:
1)MATLAB 源码
pd_swerling2.m
function pd = pd_swerling2 (nfa, np, snrbar) % This function is used to calculate the probability of detection % for Swerling 2 targets. format long snrbar = 10.0^(snrbar/10.); eps = 0.00000001; delmax = .00001; delta =10000.; % Calculate the threshold Vt pfa = np * log(2) / nfa; sqrtpfa = sqrt(-log10(pfa)); sqrtnp = sqrt(np); vt0 = np - sqrtnp + 2.3 * sqrtpfa * (sqrtpfa + sqrtnp - 1.0); vt = vt0; while (abs(delta) >= vt0) igf = incomplete_gamma(vt0,np); num = 0.5^(np/nfa) - igf; temp = (np-1) * log(vt0+eps) - vt0 - factor(np-1); deno = exp(temp); vt = vt0 + (num / (deno+eps)); delta = abs(vt - vt0) * 10000.0; vt0 = vt; end if (np <= 50) temp = vt / (1.0 + snrbar); pd = 1.0 - incomplete_gamma(temp,np); return else temp1 = snrbar + 1.0; omegabar = sqrt(np) * temp1; c3 = -1.0 / sqrt(9.0 * np); c4 = 0.25 / np; c6 = c3 * c3 /2.0; V = (vt - np * temp1) / omegabar; Vsqr = V *V; val1 = exp(-Vsqr / 2.0) / sqrt( 2.0 * pi); val2 = c3 * (V^2 -1.0) + c4 * V * (3.0 - V^2) - ... c6 * V * (V^4 - 10. * V^2 + 15.0); q = 0.5 * erfc (V/sqrt(2.0)); pd = q - val1 * val2; end
fig2_10.m
clear all pfa = 1e-9; nfa = log(2) / pfa; b = sqrt(-2.0 * log(pfa)); index = 0; for snr = 0:.01:22 index = index +1; a = sqrt(2.0 * 10^(.1*snr)); pro(index) = marcumsq(a,b); prob(index) = pd_swerling2 (nfa, 1, snr); end x = 0:.01:22; %figure(10) plot(x, pro,'k',x,prob,'k:'); axis([2 22 0 1]) xlabel ('SNR - dB') ylabel ('Probability of detection') legend('Swerling V','Swerling I') grid
2)仿真
检测概率相对于 SNR,单个脉冲,P f a = 1 0 − 9 P_{fa}=10^{-9}Pfa=10−9:
可以看出为了获得与无起伏情况相同的 P D P_DPD,在有起伏时,需要更高的 SNR。
3)MATLAB 源码
pd_swerling1.m
function pd = pd_swerling1 (nfa, np, snrbar) % This function is used to calculate the probability of detection % for Swerling 1 targets. format long snrbar = 10.0^(snrbar/10.); eps = 0.00000001; delmax = .00001; delta =10000.; % Calculate the threshold Vt pfa = np * log(2) / nfa; sqrtpfa = sqrt(-log10(pfa)); sqrtnp = sqrt(np); vt0 = np - sqrtnp + 2.3 * sqrtpfa * (sqrtpfa + sqrtnp - 1.0); vt = vt0; while (abs(delta) >= vt0) igf = incomplete_gamma(vt0,np); num = 0.5^(np/nfa) - igf; temp = (np-1) * log(vt0+eps) - vt0 - factor(np-1); deno = exp(temp); vt = vt0 + (num / (deno+eps)); delta = abs(vt - vt0) * 10000.0; vt0 = vt; end if (np == 1) temp = -vt / (1.0 + snrbar); pd = exp(temp); return end temp1 = 1.0 + np * snrbar; temp2 = 1.0 / (np *snrbar); temp = 1.0 + temp2; val1 = temp^(np-1.); igf1 = incomplete_gamma(vt,np-1); igf2 = incomplete_gamma(vt/temp,np-1); pd = 1.0 - igf1 + val1 * igf2 * exp(-vt/temp1);
fig2_11ab.m
clear all pfa = 1e-11; nfa = log(2) / pfa; index = 0; for snr = -10:.5:30 index = index +1; prob1(index) = pd_swerling1 (nfa, 1, snr); prob10(index) = pd_swerling1 (nfa, 10, snr); prob50(index) = pd_swerling1 (nfa, 50, snr); prob100(index) = pd_swerling1 (nfa, 100, snr); end x = -10:.5:30; plot(x, prob1,'k',x,prob10,'k:',x,prob50,'k--', ... x, prob100,'k-.'); axis([-10 30 0 1]) xlabel ('SNR - dB') ylabel ('Probability of detection') legend('np = 1','np = 10','np = 50','np = 100') grid
4)仿真
检测概率相对于 SNR,Swerling Ⅰ,P f a = 1 0 − 8 P_{fa}=10^{-8}Pfa=10−8
上图显示了 n p = 1 , 10 , 50 , 100 n_p=1,10,50,100np=1,10,50,100 时,检测概率相对于 SNR 的曲线,其中 P f a = 1 0 − 8 P_{fa}=10^{-8}Pfa=10−8,可以看到 n p n_pnp 越大,那么达到同一检测概率的 SNR 越小。
雷达检测及MATLAB仿真(三)https://developer.aliyun.com/article/1472360